aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_send.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-11-25 08:02:11 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-11-25 08:02:19 +0100
commitca4a7849420ebb60f2bfb5ef628d5ffa51de15ee (patch)
treeb883fd9fbd6ed6a6453779c14b984bab7c4b3ff8 /test/functional/wallet_send.py
parent31c9987976af8ac5ad40091256ac41a2ccb078cd (diff)
parentfa69c2c78455fd0dc436018fece9ff7fc83a180d (diff)
downloadbitcoin-ca4a7849420ebb60f2bfb5ef628d5ffa51de15ee.tar.xz
Merge #20410: wallet: Do not treat default constructed types as None-type
fa69c2c78455fd0dc436018fece9ff7fc83a180d wallet: Do not treat default constructed types as None-type (MarcoFalke) fac4e136fa3d0fab7fde900a6be921313e16e7a6 refactor: Change pointer to reference because it can not be null (MarcoFalke) Pull request description: Equating `0==None` and `""==None` is confusing, unneeded and undocumented ACKs for top commit: jonatack: ACK fa69c2c78455fd0dc436018fece9ff7fc83a180d achow101: ACK fa69c2c78455fd0dc436018fece9ff7fc83a180d Sjors: tACK fa69c2c78455fd0dc436018fece9ff7fc83a180d modulo `unset` Tree-SHA512: c4c8d0ad80c6697621d356a9545caf28ca2facc82bb2fa8e70eceb52372d25f0685237c73688c4b01da0e75d213c77c0d45011a8bdfe81ea783d85f045786dac
Diffstat (limited to 'test/functional/wallet_send.py')
-rwxr-xr-xtest/functional/wallet_send.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py
index 685e805877..192e9065e6 100755
--- a/test/functional/wallet_send.py
+++ b/test/functional/wallet_send.py
@@ -260,17 +260,16 @@ class WalletSendTest(BitcoinTestFramework):
res2 = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, fee_rate=1, add_to_wallet=False)
assert_equal(self.nodes[1].decodepsbt(res1["psbt"])["fee"], self.nodes[1].decodepsbt(res2["psbt"])["fee"])
- # Passing conf_target 0, estimate_mode "" as placeholder arguments should allow fee_rate to apply.
- res = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, conf_target=0, estimate_mode="", fee_rate=7, add_to_wallet=False)
+ res = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, fee_rate=7, add_to_wallet=False)
fee = self.nodes[1].decodepsbt(res["psbt"])["fee"]
assert_fee_amount(fee, Decimal(len(res["hex"]) / 2), Decimal("0.00007"))
- res = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, fee_rate=2, add_to_wallet=False)
+ # "unset" and None are treated the same for estimate_mode
+ res = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, fee_rate=2, estimate_mode="unset", add_to_wallet=False)
fee = self.nodes[1].decodepsbt(res["psbt"])["fee"]
assert_fee_amount(fee, Decimal(len(res["hex"]) / 2), Decimal("0.00002"))
- # Passing conf_target 0, estimate_mode "" as placeholder arguments should allow fee_rate to apply.
- res = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, arg_conf_target=0, arg_estimate_mode="", arg_fee_rate=4.531, add_to_wallet=False)
+ res = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, arg_fee_rate=4.531, add_to_wallet=False)
fee = self.nodes[1].decodepsbt(res["psbt"])["fee"]
assert_fee_amount(fee, Decimal(len(res["hex"]) / 2), Decimal("0.00004531"))