@@ -71,8 +71,11 @@ def test_invalid_tool_commands_and_args(self):
71
71
self .assert_raises_tool_error ('Error: two methods provided (info and create). Only one method should be provided.' , 'info' , 'create' )
72
72
self .assert_raises_tool_error ('Error parsing command line arguments: Invalid parameter -foo' , '-foo' )
73
73
locked_dir = os .path .join (self .options .tmpdir , "node0" , "regtest" , "wallets" )
74
+ error = 'Error initializing wallet database environment "{}"!' .format (locked_dir )
75
+ if self .options .descriptors :
76
+ error = "SQLiteDatabase: Unable to obtain an exclusive lock on the database, is it being used by another bitcoind?"
74
77
self .assert_raises_tool_error (
75
- 'Error initializing wallet database environment "{}"!' . format ( locked_dir ) ,
78
+ error ,
76
79
'-wallet=' + self .default_wallet_name ,
77
80
'info' ,
78
81
)
@@ -95,19 +98,33 @@ def test_tool_wallet_info(self):
95
98
# shasum_before = self.wallet_shasum()
96
99
timestamp_before = self .wallet_timestamp ()
97
100
self .log .debug ('Wallet file timestamp before calling info: {}' .format (timestamp_before ))
98
- out = textwrap .dedent ('''\
99
- Wallet info
100
- ===========
101
- Name: \
101
+ if self .options .descriptors :
102
+ out = textwrap .dedent ('''\
103
+ Wallet info
104
+ ===========
105
+ Name: default_wallet
106
+ Format: sqlite
107
+ Descriptors: yes
108
+ Encrypted: no
109
+ HD (hd seed available): yes
110
+ Keypool Size: 6
111
+ Transactions: 0
112
+ Address Book: 1
113
+ ''' )
114
+ else :
115
+ out = textwrap .dedent ('''\
116
+ Wallet info
117
+ ===========
118
+ Name: \
102
119
103
- Format: bdb
104
- Descriptors: no
105
- Encrypted: no
106
- HD (hd seed available): yes
107
- Keypool Size: 2
108
- Transactions: 0
109
- Address Book: 3
110
- ''' )
120
+ Format: bdb
121
+ Descriptors: no
122
+ Encrypted: no
123
+ HD (hd seed available): yes
124
+ Keypool Size: 2
125
+ Transactions: 0
126
+ Address Book: 3
127
+ ''' )
111
128
self .assert_tool_output (out , '-wallet=' + self .default_wallet_name , 'info' )
112
129
timestamp_after = self .wallet_timestamp ()
113
130
self .log .debug ('Wallet file timestamp after calling info: {}' .format (timestamp_after ))
@@ -138,19 +155,33 @@ def test_tool_wallet_info_after_transaction(self):
138
155
shasum_before = self .wallet_shasum ()
139
156
timestamp_before = self .wallet_timestamp ()
140
157
self .log .debug ('Wallet file timestamp before calling info: {}' .format (timestamp_before ))
141
- out = textwrap .dedent ('''\
142
- Wallet info
143
- ===========
144
- Name: \
158
+ if self .options .descriptors :
159
+ out = textwrap .dedent ('''\
160
+ Wallet info
161
+ ===========
162
+ Name: default_wallet
163
+ Format: sqlite
164
+ Descriptors: yes
165
+ Encrypted: no
166
+ HD (hd seed available): yes
167
+ Keypool Size: 6
168
+ Transactions: 1
169
+ Address Book: 1
170
+ ''' )
171
+ else :
172
+ out = textwrap .dedent ('''\
173
+ Wallet info
174
+ ===========
175
+ Name: \
145
176
146
- Format: bdb
147
- Descriptors: no
148
- Encrypted: no
149
- HD (hd seed available): yes
150
- Keypool Size: 2
151
- Transactions: 1
152
- Address Book: 3
153
- ''' )
177
+ Format: bdb
178
+ Descriptors: no
179
+ Encrypted: no
180
+ HD (hd seed available): yes
181
+ Keypool Size: 2
182
+ Transactions: 1
183
+ Address Book: 3
184
+ ''' )
154
185
self .assert_tool_output (out , '-wallet=' + self .default_wallet_name , 'info' )
155
186
shasum_after = self .wallet_shasum ()
156
187
timestamp_after = self .wallet_timestamp ()
0 commit comments