Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_fundrawtransaction.py
Show First 20 Lines • Show All 703 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
assert(changeaddress != "") | assert(changeaddress != "") | ||||
nextaddr = self.nodes[4].getrawchangeaddress() | nextaddr = self.nodes[4].getrawchangeaddress() | ||||
# frt should not have removed the key from the keypool | # frt should not have removed the key from the keypool | ||||
assert(changeaddress == nextaddr) | assert(changeaddress == nextaddr) | ||||
# | # | ||||
# DEPRECATED, should be removed in v0.20 | # DEPRECATED, should be removed in v0.20 | ||||
# Test address reuse option does # | # Test address reuse option does # | ||||
# not work in regular use # | # throws an rpc error when not deprecated # | ||||
# | # | ||||
assert_raises_rpc_error(-32, "fundrawtransaction -reserveChangeKey is deprecated and will be fully removed in v0.20. To use the -reserveChangeKey option in v0.19, restart bitcoind with -deprecatedrpc=fundrawtransaction.\nProjects should transition to expecting change addresses removed from the keypool before upgrading to v0.20", | assert_raises_rpc_error(-32, "fundrawtransaction -reserveChangeKey " | ||||
+ "is deprecated and will be fully removed " | |||||
+ "in v0.20. To use the -reserveChangeKey " | |||||
+ "option in v0.19, restart bitcoind with " | |||||
+ "-deprecatedrpc=fundrawtransaction.\n" | |||||
+ "Projects should transition to expecting " | |||||
+ "change addresses removed from the keypool " | |||||
+ "before upgrading to v0.20", | |||||
self.nodes[3].fundrawtransaction, rawTx, | self.nodes[3].fundrawtransaction, rawTx, | ||||
{"reserveChangeKey": False}) | {"reserveChangeKey": False}) | ||||
# | # | ||||
# Test no address reuse occurs # | # Test no address reuse occurs # | ||||
# | # | ||||
result3 = self.nodes[3].fundrawtransaction(rawTx) | result3 = self.nodes[3].fundrawtransaction(rawTx) | ||||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |