Add a simple test for payoutAddress reuse in protx update_registrar (#3183)

This commit is contained in:
UdjinM6 2019-10-31 20:31:08 +03:00 committed by GitHub
parent 372389d231
commit 1bbe1adb4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,12 +194,14 @@ class DIP3Test(BitcoinTestFramework):
assert(old_voting_address != new_voting_address) assert(old_voting_address != new_voting_address)
# also check if funds from payout address are used when no fee source address is specified # also check if funds from payout address are used when no fee source address is specified
node.sendtoaddress(mn.rewards_address, 0.001) node.sendtoaddress(mn.rewards_address, 0.001)
node.protx('update_registrar', mn.protx_hash, "", new_voting_address, mn.rewards_address) node.protx('update_registrar', mn.protx_hash, "", new_voting_address, "")
node.generate(1) node.generate(1)
self.sync_all() self.sync_all()
new_dmnState = mn.node.masternode("status")["dmnState"] new_dmnState = mn.node.masternode("status")["dmnState"]
new_voting_address_from_rpc = new_dmnState["votingAddress"] new_voting_address_from_rpc = new_dmnState["votingAddress"]
assert(new_voting_address_from_rpc == new_voting_address) assert(new_voting_address_from_rpc == new_voting_address)
# make sure payoutAddress is the same as before
assert(old_dmnState["payoutAddress"] == new_dmnState["payoutAddress"])
def prepare_mn(self, node, idx, alias): def prepare_mn(self, node, idx, alias):
mn = Masternode() mn = Masternode()