Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc_rpc_buildavalancheproof.py
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
check_buildavalancheproof_error(-8, | check_buildavalancheproof_error(-8, | ||||
"Duplicated stake", | "Duplicated stake", | ||||
duplicate_stake, | duplicate_stake, | ||||
) | ) | ||||
self.log.info("Happy path") | self.log.info("Happy path") | ||||
assert node.buildavalancheproof(0, 0, wif_privkey, [good_stake]) | assert node.buildavalancheproof(0, 0, wif_privkey, [good_stake]) | ||||
self.log.info("Check the payout address") | |||||
self.restart_node( | |||||
0, | |||||
extra_args=self.extra_args[0] + | |||||
['-legacyavaproof=0']) | |||||
# FIXME The buildavalancheproof does not support a payout script | |||||
# parameter yet, so it builds an invalid proof with an empty script | |||||
invalid_payout = node.buildavalancheproof( | |||||
0, 0, wif_privkey, [good_stake]) | |||||
assert_raises_rpc_error(-8, | |||||
"The proof is invalid: payout-script-non-standard", | |||||
node.verifyavalancheproof, | |||||
invalid_payout) | |||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
BuildAvalancheProofTest().main() | BuildAvalancheProofTest().main() |