diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2018-06-26 16:45:13 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2018-06-26 16:46:49 -0700 |
commit | f54f3738c8ce839c413d7b6b719be2ff341536ca (patch) | |
tree | e2115f4932d31764920922fd66219ef1883e7f05 /test | |
parent | ee02debb25675542d13a03b65ed49832b79b0db9 (diff) | |
parent | df10f07db178d84b3def9f0b99d9b7c92e4227a9 (diff) |
Merge #13498: [wallet] Fixups from account API deprecation
df10f07db1 [wallet] Don't use accounts when checking balance in sendmany (John Newbery)
e209184101 [wallet] deprecate sendfrom RPC method. (John Newbery)
Pull request description:
A couple of fixups from the accounts API deprecation PR (#12953):
- properly deprecate `sendfrom`
- don't use accounts when calculating balance in `sendmany` (unless the `-deprecatedrpc=accounts` flag is being used)
Tree-SHA512: 1befde055067438c4c3391bbff1aaed0e6249efd708c567db3f1faad40a0f28e64f95e5bad0679ae826d24a0239e4bc8a1c392dc93e2e7502343a7f6b1d1845c
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/wallet_fallbackfee.py | 1 | ||||
-rwxr-xr-x | test/functional/wallet_labels.py | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/test/functional/wallet_fallbackfee.py b/test/functional/wallet_fallbackfee.py index e9cd052344..cc0a5175d5 100755 --- a/test/functional/wallet_fallbackfee.py +++ b/test/functional/wallet_fallbackfee.py @@ -21,7 +21,6 @@ class WalletRBFTest(BitcoinTestFramework): self.restart_node(0, extra_args=["-fallbackfee=0"]) assert_raises_rpc_error(-4, "Fee estimation failed", lambda: self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)) assert_raises_rpc_error(-4, "Fee estimation failed", lambda: self.nodes[0].fundrawtransaction(self.nodes[0].createrawtransaction([], {self.nodes[0].getnewaddress(): 1}))) - assert_raises_rpc_error(-4, "Fee estimation failed", lambda: self.nodes[0].sendfrom("", self.nodes[0].getnewaddress(), 1)) assert_raises_rpc_error(-6, "Fee estimation failed", lambda: self.nodes[0].sendmany("", {self.nodes[0].getnewaddress(): 1})) if __name__ == '__main__': diff --git a/test/functional/wallet_labels.py b/test/functional/wallet_labels.py index f5d7830fca..8d961fb34a 100755 --- a/test/functional/wallet_labels.py +++ b/test/functional/wallet_labels.py @@ -85,7 +85,8 @@ class WalletLabelsTest(BitcoinTestFramework): # we want to reset so that the "" label has what's expected. # otherwise we're off by exactly the fee amount as that's mined # and matures in the next 100 blocks - node.sendfrom("", common_address, fee) + if accounts_api: + node.sendfrom("", common_address, fee) amount_to_send = 1.0 # Create labels and make sure subsequent label API calls @@ -125,7 +126,7 @@ class WalletLabelsTest(BitcoinTestFramework): if accounts_api: node.sendfrom(label.name, to_label.receive_address, amount_to_send) else: - node.sendfrom(label.name, to_label.addresses[0], amount_to_send) + node.sendtoaddress(to_label.addresses[0], amount_to_send) node.generate(1) for label in labels: if accounts_api: @@ -166,7 +167,8 @@ class WalletLabelsTest(BitcoinTestFramework): label.add_address(multisig_address) label.purpose[multisig_address] = "send" label.verify(node) - node.sendfrom("", multisig_address, 50) + if accounts_api: + node.sendfrom("", multisig_address, 50) node.generate(101) if accounts_api: for label in labels: |