@@ -68,7 +68,7 @@ def log_wallet_timestamp_comparison(self, old, new):
68
68
result = 'unchanged' if new == old else 'increased!'
69
69
self .log .debug ('Wallet file timestamp {}' .format (result ))
70
70
71
- def get_expected_info_output (self , name = "" , transactions = 0 , keypool = 2 , address = 0 ):
71
+ def get_expected_info_output (self , name = "" , transactions = 0 , keypool = 2 , address = 0 , imported_privs = 0 ):
72
72
wallet_name = self .default_wallet_name if name == "" else name
73
73
if self .options .descriptors :
74
74
output_types = 4 # p2pkh, p2sh, segwit, bech32m
@@ -83,7 +83,7 @@ def get_expected_info_output(self, name="", transactions=0, keypool=2, address=0
83
83
Keypool Size: %d
84
84
Transactions: %d
85
85
Address Book: %d
86
- ''' % (wallet_name , keypool * output_types , transactions , address ))
86
+ ''' % (wallet_name , keypool * output_types , transactions , imported_privs * 3 + address ))
87
87
else :
88
88
output_types = 3 # p2pkh, p2sh, segwit. Legacy wallets do not support bech32m.
89
89
return textwrap .dedent ('''\
@@ -97,7 +97,7 @@ def get_expected_info_output(self, name="", transactions=0, keypool=2, address=0
97
97
Keypool Size: %d
98
98
Transactions: %d
99
99
Address Book: %d
100
- ''' % (wallet_name , keypool , transactions , address * output_types ))
100
+ ''' % (wallet_name , keypool , transactions , ( address + imported_privs ) * output_types ))
101
101
102
102
def read_dump (self , filename ):
103
103
dump = OrderedDict ()
@@ -219,7 +219,7 @@ def test_tool_wallet_info(self):
219
219
# shasum_before = self.wallet_shasum()
220
220
timestamp_before = self .wallet_timestamp ()
221
221
self .log .debug ('Wallet file timestamp before calling info: {}' .format (timestamp_before ))
222
- out = self .get_expected_info_output (address = 1 )
222
+ out = self .get_expected_info_output (imported_privs = 1 )
223
223
self .assert_tool_output (out , '-wallet=' + self .default_wallet_name , 'info' )
224
224
timestamp_after = self .wallet_timestamp ()
225
225
self .log .debug ('Wallet file timestamp after calling info: {}' .format (timestamp_after ))
@@ -250,7 +250,7 @@ def test_tool_wallet_info_after_transaction(self):
250
250
shasum_before = self .wallet_shasum ()
251
251
timestamp_before = self .wallet_timestamp ()
252
252
self .log .debug ('Wallet file timestamp before calling info: {}' .format (timestamp_before ))
253
- out = self .get_expected_info_output (transactions = 1 , address = 1 )
253
+ out = self .get_expected_info_output (transactions = 1 , imported_privs = 1 )
254
254
self .assert_tool_output (out , '-wallet=' + self .default_wallet_name , 'info' )
255
255
shasum_after = self .wallet_shasum ()
256
256
timestamp_after = self .wallet_timestamp ()
0 commit comments