mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
wallet, bugfix: allow send to take string fee rate values
This commit is contained in:
@@ -4089,7 +4089,7 @@ static RPCHelpMan send()
|
|||||||
UniValueType(), // outputs (ARR or OBJ, checked later)
|
UniValueType(), // outputs (ARR or OBJ, checked later)
|
||||||
UniValue::VNUM, // conf_target
|
UniValue::VNUM, // conf_target
|
||||||
UniValue::VSTR, // estimate_mode
|
UniValue::VSTR, // estimate_mode
|
||||||
UniValue::VNUM, // fee_rate
|
UniValueType(), // fee_rate, will be checked by AmountFromValue() in SetFeeEstimateMode()
|
||||||
UniValue::VOBJ, // options
|
UniValue::VOBJ, // options
|
||||||
}, true
|
}, true
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -256,8 +256,8 @@ class WalletSendTest(BitcoinTestFramework):
|
|||||||
assert res["complete"]
|
assert res["complete"]
|
||||||
|
|
||||||
self.log.info("Test setting explicit fee rate")
|
self.log.info("Test setting explicit fee rate")
|
||||||
res1 = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, arg_fee_rate=1, add_to_wallet=False)
|
res1 = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, arg_fee_rate="1", add_to_wallet=False)
|
||||||
res2 = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, fee_rate=1, add_to_wallet=False)
|
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"])
|
assert_equal(self.nodes[1].decodepsbt(res1["psbt"])["fee"], self.nodes[1].decodepsbt(res2["psbt"])["fee"])
|
||||||
|
|
||||||
res = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user