From 810899f59c0d47b69f8631d7f076fafae701ff66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Tue, 10 Jan 2023 09:14:30 +0100 Subject: [PATCH] fixed input object differences between old / new version and lookup of transaction in the governance pool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Eckel --- planetmint/commands/planetmint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planetmint/commands/planetmint.py b/planetmint/commands/planetmint.py index 733341b..5ad6030 100644 --- a/planetmint/commands/planetmint.py +++ b/planetmint/commands/planetmint.py @@ -195,7 +195,7 @@ def run_election_approve(args, planet): """ key = load_node_key(args.sk) - tx = planet.get_transaction(args.election_id) + tx = planet.get_transaction(args.election_id,TARANT_TABLE_GOVERNANCE) voting_powers = [v.amount for v in tx.outputs if key.public_key in v.public_keys] if len(voting_powers) > 0: voting_power = voting_powers[0] @@ -203,7 +203,7 @@ def run_election_approve(args, planet): logger.error("The key you provided does not match any of the eligible voters in this election.") return False - inputs = [i for i in tx.to_inputs() if key.public_key in i.owners_before] + inputs = [i for i in tx.inputs if key.public_key in i.owners_before] election_pub_key = election_id_to_public_key(tx.id) approval = Vote.generate(inputs, [([election_pub_key], voting_power)], [tx.id]).sign([key.private_key]) planet.validate_transaction(approval)