mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 11:33:46 +02:00
Create a tr() descriptor bech32m DescriptorScriptPubKeyMan by default
This commit is contained in:
@@ -108,12 +108,24 @@ class WalletGroupTest(BitcoinTestFramework):
|
||||
assert_equal(input_addrs[0], input_addrs[1])
|
||||
# Node 2 enforces avoidpartialspends so needs no checking here
|
||||
|
||||
if self.options.descriptors:
|
||||
# Descriptor wallets will use Taproot change by default which has different fees
|
||||
tx4_ungrouped_fee = 3060
|
||||
tx4_grouped_fee = 4400
|
||||
tx5_6_ungrouped_fee = 5760
|
||||
tx5_6_grouped_fee = 8480
|
||||
else:
|
||||
tx4_ungrouped_fee = 2820
|
||||
tx4_grouped_fee = 4160
|
||||
tx5_6_ungrouped_fee = 5520
|
||||
tx5_6_grouped_fee = 8240
|
||||
|
||||
self.log.info("Test wallet option maxapsfee")
|
||||
addr_aps = self.nodes[3].getnewaddress()
|
||||
self.nodes[0].sendtoaddress(addr_aps, 1.0)
|
||||
self.nodes[0].sendtoaddress(addr_aps, 1.0)
|
||||
self.generate(self.nodes[0], 1)
|
||||
with self.nodes[3].assert_debug_log(['Fee non-grouped = 2820, grouped = 4160, using grouped']):
|
||||
with self.nodes[3].assert_debug_log([f'Fee non-grouped = {tx4_ungrouped_fee}, grouped = {tx4_grouped_fee}, using grouped']):
|
||||
txid4 = self.nodes[3].sendtoaddress(self.nodes[0].getnewaddress(), 0.1)
|
||||
tx4 = self.nodes[3].getrawtransaction(txid4, True)
|
||||
# tx4 should have 2 inputs and 2 outputs although one output would
|
||||
@@ -124,7 +136,7 @@ class WalletGroupTest(BitcoinTestFramework):
|
||||
addr_aps2 = self.nodes[3].getnewaddress()
|
||||
[self.nodes[0].sendtoaddress(addr_aps2, 1.0) for _ in range(5)]
|
||||
self.generate(self.nodes[0], 1)
|
||||
with self.nodes[3].assert_debug_log(['Fee non-grouped = 5520, grouped = 8240, using non-grouped']):
|
||||
with self.nodes[3].assert_debug_log([f'Fee non-grouped = {tx5_6_ungrouped_fee}, grouped = {tx5_6_grouped_fee}, using non-grouped']):
|
||||
txid5 = self.nodes[3].sendtoaddress(self.nodes[0].getnewaddress(), 2.95)
|
||||
tx5 = self.nodes[3].getrawtransaction(txid5, True)
|
||||
# tx5 should have 3 inputs (1.0, 1.0, 1.0) and 2 outputs
|
||||
@@ -137,7 +149,7 @@ class WalletGroupTest(BitcoinTestFramework):
|
||||
addr_aps3 = self.nodes[4].getnewaddress()
|
||||
[self.nodes[0].sendtoaddress(addr_aps3, 1.0) for _ in range(5)]
|
||||
self.generate(self.nodes[0], 1)
|
||||
with self.nodes[4].assert_debug_log(['Fee non-grouped = 5520, grouped = 8240, using grouped']):
|
||||
with self.nodes[4].assert_debug_log([f'Fee non-grouped = {tx5_6_ungrouped_fee}, grouped = {tx5_6_grouped_fee}, using grouped']):
|
||||
txid6 = self.nodes[4].sendtoaddress(self.nodes[0].getnewaddress(), 2.95)
|
||||
tx6 = self.nodes[4].getrawtransaction(txid6, True)
|
||||
# tx6 should have 5 inputs and 2 outputs
|
||||
|
Reference in New Issue
Block a user