Skip to content

Commit cdd955e

Browse files
committed
Add basic test for bitcoin-wallet salvage
1 parent c877709 commit cdd955e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/functional/tool_wallet.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ def test_getwalletinfo_on_different_wallet(self):
203203
assert_equal(shasum_after, shasum_before)
204204
self.log.debug('Wallet file shasum unchanged\n')
205205

206+
def test_salvage(self):
207+
# TODO: Check salvage actually salvages and doesn't break things. https://github.com/bitcoin/bitcoin/issues/7463
208+
self.log.info('Check salvage')
209+
self.start_node(0, ['-wallet=salvage'])
210+
self.stop_node(0)
211+
212+
self.assert_tool_output('', '-wallet=salvage', 'salvage')
213+
206214
def run_test(self):
207215
self.wallet_path = os.path.join(self.nodes[0].datadir, self.chain, 'wallets', 'wallet.dat')
208216
self.test_invalid_tool_commands_and_args()
@@ -211,7 +219,7 @@ def run_test(self):
211219
self.test_tool_wallet_info_after_transaction()
212220
self.test_tool_wallet_create_on_existing_wallet()
213221
self.test_getwalletinfo_on_different_wallet()
214-
222+
self.test_salvage()
215223

216224
if __name__ == '__main__':
217225
ToolWalletTest().main()

0 commit comments

Comments
 (0)