@@ -33,11 +33,13 @@ def run_test(self):
33
33
self .test_no_address (node , wallet )
34
34
35
35
def test_no_activity (self , node ):
36
+ self .log .info ("Test that no activity is found for an unused address" )
36
37
_ , _ , addr_1 = getnewdestination ()
37
38
result = node .getdescriptoractivity ([], [f"addr({ addr_1 } )" ], True )
38
39
assert_equal (len (result ['activity' ]), 0 )
39
40
40
41
def test_activity_in_block (self , node , wallet ):
42
+ self .log .info ("Test that receive activity is correctly reported in a mined block" )
41
43
_ , spk_1 , addr_1 = getnewdestination (address_type = 'bech32m' )
42
44
txid = wallet .send_to (from_node = node , scriptPubKey = spk_1 , amount = 1 * COIN )['txid' ]
43
45
blockhash = self .generate (node , 1 )[0 ]
@@ -67,6 +69,7 @@ def test_activity_in_block(self, node, wallet):
67
69
68
70
69
71
def test_no_mempool_inclusion (self , node , wallet ):
72
+ self .log .info ("Test that mempool transactions are not included when include_mempool argument is False" )
70
73
_ , spk_1 , addr_1 = getnewdestination ()
71
74
wallet .send_to (from_node = node , scriptPubKey = spk_1 , amount = 1 * COIN )
72
75
@@ -81,6 +84,7 @@ def test_no_mempool_inclusion(self, node, wallet):
81
84
assert_equal (len (result ['activity' ]), 0 )
82
85
83
86
def test_multiple_addresses (self , node , wallet ):
87
+ self .log .info ("Test querying multiple addresses returns all activity correctly" )
84
88
_ , spk_1 , addr_1 = getnewdestination ()
85
89
_ , spk_2 , addr_2 = getnewdestination ()
86
90
wallet .send_to (from_node = node , scriptPubKey = spk_1 , amount = 1 * COIN )
@@ -113,6 +117,7 @@ def test_multiple_addresses(self, node, wallet):
113
117
assert a2 ['amount' ] == 2.0
114
118
115
119
def test_invalid_blockhash (self , node , wallet ):
120
+ self .log .info ("Test that passing an invalid blockhash raises appropriate RPC error" )
116
121
self .generate (node , 20 ) # Generate to get more fees
117
122
118
123
_ , spk_1 , addr_1 = getnewdestination ()
@@ -125,6 +130,7 @@ def test_invalid_blockhash(self, node, wallet):
125
130
node .getdescriptoractivity , [invalid_blockhash ], [f"addr({ addr_1 } )" ], True )
126
131
127
132
def test_invalid_descriptor (self , node , wallet ):
133
+ self .log .info ("Test that an invalid descriptor raises the correct RPC error" )
128
134
blockhash = self .generate (node , 1 )[0 ]
129
135
_ , _ , addr_1 = getnewdestination ()
130
136
@@ -133,6 +139,7 @@ def test_invalid_descriptor(self, node, wallet):
133
139
node .getdescriptoractivity , [blockhash ], [f"addrx({ addr_1 } )" ], True )
134
140
135
141
def test_confirmed_and_unconfirmed (self , node , wallet ):
142
+ self .log .info ("Test that both confirmed and unconfirmed transactions are reported correctly" )
136
143
self .generate (node , 20 ) # Generate to get more fees
137
144
138
145
_ , spk_1 , addr_1 = getnewdestination ()
@@ -162,6 +169,7 @@ def test_confirmed_and_unconfirmed(self, node, wallet):
162
169
163
170
def test_receive_then_spend (self , node , wallet ):
164
171
"""Also important because this tests multiple blockhashes."""
172
+ self .log .info ("Test receive and spend activities across different blocks are reported consistently" )
165
173
self .generate (node , 20 ) # Generate to get more fees
166
174
167
175
sent1 = wallet .send_self_transfer (from_node = node )
@@ -189,11 +197,13 @@ def test_receive_then_spend(self, node, wallet):
189
197
assert_equal (result , node .getdescriptoractivity (
190
198
[blockhash_1 , blockhash_2 ], [wallet .get_descriptor ()], True ))
191
199
200
+ self .log .info ("Test that duplicated blockhash request does not report duplicated results" )
192
201
# Test that duplicating a blockhash yields the same result.
193
202
assert_equal (result , node .getdescriptoractivity (
194
203
[blockhash_1 , blockhash_2 , blockhash_2 ], [wallet .get_descriptor ()], True ))
195
204
196
205
def test_no_address (self , node , wallet ):
206
+ self .log .info ("Test that activity is still reported for scripts without an associated address" )
197
207
raw_wallet = MiniWallet (self .nodes [0 ], mode = MiniWalletMode .RAW_P2PK )
198
208
self .generate (raw_wallet , 100 )
199
209
0 commit comments