mirror of
https://github.com/planetmint/planetmint.git
synced 2025-03-30 15:08:31 +00:00
fixed func parameter passing of generic methods
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
2a14c707d2
commit
4977ed0729
@ -112,9 +112,12 @@ def run_election(args):
|
||||
|
||||
b = Validator()
|
||||
abci_rpc = ABCI_RPC()
|
||||
|
||||
# Call the function specified by args.action, as defined above
|
||||
globals()[f"run_election_{args.action}"](args, b, abci_rpc)
|
||||
|
||||
if args.action == "show":
|
||||
run_election_show(args, b)
|
||||
else:
|
||||
# Call the function specified by args.action, as defined above
|
||||
globals()[f"run_election_{args.action}"](args, b, abci_rpc)
|
||||
|
||||
|
||||
def run_election_new(args, planet, abci_rpc):
|
||||
@ -187,7 +190,7 @@ def run_election_new_chain_migration(args, planet, abci_rpc):
|
||||
return create_new_election(args.sk, planet, ChainMigrationElection, [{"data": {}}], abci_rpc)
|
||||
|
||||
|
||||
def run_election_approve(args, validator: Validator, abci_rpc):
|
||||
def run_election_approve(args, validator: Validator, abci_rpc : ABCI_RPC):
|
||||
"""Approve an election
|
||||
|
||||
:param args: dict
|
||||
@ -226,7 +229,7 @@ def run_election_approve(args, validator: Validator, abci_rpc):
|
||||
return False
|
||||
|
||||
|
||||
def run_election_show(args, validator: Validator, abci_rpc: ABCI_RPC):
|
||||
def run_election_show(args, validator: Validator):
|
||||
"""Retrieves information about an election
|
||||
|
||||
:param args: dict
|
||||
|
@ -118,7 +118,7 @@ class Config(metaclass=Singleton):
|
||||
self._private_real_config = config
|
||||
|
||||
def get_db_key_map(self, db):
|
||||
return sefl.__private_database_keys_map[db]
|
||||
return self.__private_database_keys_map[db]
|
||||
|
||||
def get_db_map(sefl, db):
|
||||
return sefl.__private_database_map[db]
|
||||
|
Loading…
x
Reference in New Issue
Block a user