Skip to content

Commit 3a16b5e

Browse files
committed
test: add missing logging to wallet_groups.py
1 parent 1a4a930 commit 3a16b5e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/functional/wallet_groups.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def skip_test_if_missing_module(self):
2929
self.skip_if_no_wallet()
3030

3131
def run_test(self):
32+
self.log.info("Setting up")
3233
# Mine some coins
3334
self.nodes[0].generate(110)
3435

@@ -48,6 +49,7 @@ def run_test(self):
4849
# - node[1] should pick one 0.5 UTXO and leave the rest
4950
# - node[2] should pick one (1.0 + 0.5) UTXO group corresponding to a
5051
# given address, and leave the rest
52+
self.log.info("Test sending transactions picks one UTXO group and leaves the rest")
5153
txid1 = self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 0.2)
5254
tx1 = self.nodes[1].getrawtransaction(txid1, True)
5355
# txid1 should have 1 input and 2 outputs
@@ -70,7 +72,7 @@ def run_test(self):
7072
assert_approx(v[0], vexp=0.2, vspan=0.0001)
7173
assert_approx(v[1], vexp=1.3, vspan=0.0001)
7274

73-
# Test 'avoid partial if warranted, even if disabled'
75+
self.log.info("Test avoiding partial spends if warranted, even if avoidpartialspends is disabled")
7476
self.sync_all()
7577
self.nodes[0].generate(1)
7678
# Nodes 1-2 now have confirmed UTXOs (letters denote destinations):
@@ -104,7 +106,7 @@ def run_test(self):
104106
assert_equal(input_addrs[0], input_addrs[1])
105107
# Node 2 enforces avoidpartialspends so needs no checking here
106108

107-
# Test wallet option maxapsfee with Node 3
109+
self.log.info("Test wallet option maxapsfee")
108110
addr_aps = self.nodes[3].getnewaddress()
109111
self.nodes[0].sendtoaddress(addr_aps, 1.0)
110112
self.nodes[0].sendtoaddress(addr_aps, 1.0)
@@ -131,6 +133,7 @@ def run_test(self):
131133

132134
# Test wallet option maxapsfee with node 4, which sets maxapsfee
133135
# 1 sat higher, crossing the threshold from non-grouped to grouped.
136+
self.log.info("Test wallet option maxapsfee threshold from non-grouped to grouped")
134137
addr_aps3 = self.nodes[4].getnewaddress()
135138
[self.nodes[0].sendtoaddress(addr_aps3, 1.0) for _ in range(5)]
136139
self.nodes[0].generate(1)
@@ -147,8 +150,7 @@ def run_test(self):
147150
self.sync_all()
148151
self.nodes[0].generate(1)
149152

150-
# Fill node2's wallet with 10000 outputs corresponding to the same
151-
# scriptPubKey
153+
self.log.info("Fill a wallet with 10,000 outputs corresponding to the same scriptPubKey")
152154
for _ in range(5):
153155
raw_tx = self.nodes[0].createrawtransaction([{"txid":"0"*64, "vout":0}], [{addr2[0]: 0.05}])
154156
tx = FromHex(CTransaction(), raw_tx)
@@ -164,6 +166,7 @@ def run_test(self):
164166
# Check that we can create a transaction that only requires ~100 of our
165167
# utxos, without pulling in all outputs and creating a transaction that
166168
# is way too big.
169+
self.log.info("Test creating txn that only requires ~100 of our UTXOs without pulling in all outputs")
167170
assert self.nodes[2].sendtoaddress(address=addr2[0], amount=5)
168171

169172

0 commit comments

Comments
 (0)