mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: Upsert validator 'approve' command not transfering vote to election
public key Solution: Transfer vote to the election public key
This commit is contained in:
parent
d31ab9fb40
commit
dbcc7e538f
@ -168,8 +168,10 @@ def run_upsert_validator_approve(args, bigchain):
|
|||||||
)
|
)
|
||||||
|
|
||||||
inputs = [i for i in tx.to_inputs() if key.public_key in i.owners_before]
|
inputs = [i for i in tx.to_inputs() if key.public_key in i.owners_before]
|
||||||
approval = ValidatorElectionVote.generate(inputs, [
|
election_pub_key = ValidatorElection.to_public_key(tx.id)
|
||||||
([key.public_key], voting_power)], tx.id).sign([key.private_key])
|
approval = ValidatorElectionVote.generate(inputs,
|
||||||
|
[([election_pub_key], voting_power)],
|
||||||
|
tx.id).sign([key.private_key])
|
||||||
approval.validate(bigchain)
|
approval.validate(bigchain)
|
||||||
|
|
||||||
resp = bigchain.write_transaction(approval, 'broadcast_tx_commit')
|
resp = bigchain.write_transaction(approval, 'broadcast_tx_commit')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user