protocol: set type of max_tx_fee after it’s set from cfg file
This commit is contained in:
parent
2ad20df8ad
commit
dc7f256270
2 changed files with 5 additions and 4 deletions
|
|
@ -113,15 +113,15 @@ class CoinProtocol(MMGenObject):
|
|||
from .util2 import get_keccak
|
||||
self.keccak_256 = get_keccak(cfg)
|
||||
|
||||
if need_amt and self.coin_amt:
|
||||
self.set_cfg_opts() # a) could reset max_tx_fee
|
||||
|
||||
if need_amt and self.coin_amt: # b) set type of max_tx_fee _after_ possible reset
|
||||
from . import amt
|
||||
from decimal import getcontext
|
||||
self.coin_amt = getattr(amt, self.coin_amt)
|
||||
self.max_tx_fee = self.coin_amt(str(self.max_tx_fee)) if self.max_tx_fee else None
|
||||
getcontext().prec = self.decimal_prec
|
||||
|
||||
self.set_cfg_opts()
|
||||
|
||||
def set_cfg_opts(self):
|
||||
pass
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,8 @@ class CmdGroupMgr:
|
|||
return cls
|
||||
|
||||
def gm_init_group(self, cfg, trunner, gname, sg_name, spawn_prog):
|
||||
write_to_cfgfile([])
|
||||
if not (cfg.resuming or cfg.skipping_deps):
|
||||
write_to_cfgfile([])
|
||||
cls = self.create_group(gname, sg_name, **self.cmd_groups[gname].params)
|
||||
cls.group_name = gname
|
||||
return cls(cfg, trunner, cfgs, spawn_prog)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue