override_globals_from_cfg_file(): set class, not instance, attr in proto
Fixes a critical bug that led to coin-specific vars in cfg file being ignored.
This commit is contained in:
parent
ffa49545e4
commit
fef1d509a5
1 changed files with 2 additions and 2 deletions
|
|
@ -130,10 +130,10 @@ def override_globals_from_cfg_file(ucfg):
|
|||
ns = d.name.split('_')
|
||||
if ns[0] in CoinProtocol.coins:
|
||||
nse,tn = (ns[2:],True) if len(ns) > 2 and ns[1] == 'testnet' else (ns[1:],False)
|
||||
cls = init_proto(ns[0],tn)
|
||||
cls = type(init_proto(ns[0],tn)) # no instance yet, so override _class_ attr
|
||||
attr = '_'.join(nse)
|
||||
else:
|
||||
cls = g
|
||||
cls = g # g is "singleton" instance, so override _instance_ attr
|
||||
attr = d.name
|
||||
refval = getattr(cls,attr)
|
||||
if type(refval) is dict and type(val) is str: # hack - catch single colon-separated value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue