mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-27 22:42:34 +01:00
test: add logging to wallet_avoidreuse.py
This commit is contained in:
@@ -87,6 +87,8 @@ class AvoidReuseTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
def test_persistence(self):
|
def test_persistence(self):
|
||||||
'''Test that wallet files persist the avoid_reuse flag.'''
|
'''Test that wallet files persist the avoid_reuse flag.'''
|
||||||
|
self.log.info("Test wallet files persist avoid_reuse flag")
|
||||||
|
|
||||||
# Configure node 1 to use avoid_reuse
|
# Configure node 1 to use avoid_reuse
|
||||||
self.nodes[1].setwalletflag('avoid_reuse')
|
self.nodes[1].setwalletflag('avoid_reuse')
|
||||||
|
|
||||||
@@ -109,6 +111,8 @@ class AvoidReuseTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
def test_immutable(self):
|
def test_immutable(self):
|
||||||
'''Test immutable wallet flags'''
|
'''Test immutable wallet flags'''
|
||||||
|
self.log.info("Test immutable wallet flags")
|
||||||
|
|
||||||
# Attempt to set the disable_private_keys flag; this should not work
|
# Attempt to set the disable_private_keys flag; this should not work
|
||||||
assert_raises_rpc_error(-8, "Wallet flag is immutable", self.nodes[1].setwalletflag, 'disable_private_keys')
|
assert_raises_rpc_error(-8, "Wallet flag is immutable", self.nodes[1].setwalletflag, 'disable_private_keys')
|
||||||
|
|
||||||
@@ -130,6 +134,7 @@ class AvoidReuseTest(BitcoinTestFramework):
|
|||||||
the avoid_reuse flag set to false. This means the 10 BTC send should succeed,
|
the avoid_reuse flag set to false. This means the 10 BTC send should succeed,
|
||||||
where it fails in test_fund_send_fund_send.
|
where it fails in test_fund_send_fund_send.
|
||||||
'''
|
'''
|
||||||
|
self.log.info("Test fund send fund send dirty")
|
||||||
|
|
||||||
fundaddr = self.nodes[1].getnewaddress()
|
fundaddr = self.nodes[1].getnewaddress()
|
||||||
retaddr = self.nodes[0].getnewaddress()
|
retaddr = self.nodes[0].getnewaddress()
|
||||||
@@ -183,6 +188,7 @@ class AvoidReuseTest(BitcoinTestFramework):
|
|||||||
[1] tries to spend 10 BTC (fails; dirty).
|
[1] tries to spend 10 BTC (fails; dirty).
|
||||||
[1] tries to spend 4 BTC (succeeds; change address sufficient)
|
[1] tries to spend 4 BTC (succeeds; change address sufficient)
|
||||||
'''
|
'''
|
||||||
|
self.log.info("Test fund send fund send")
|
||||||
|
|
||||||
fundaddr = self.nodes[1].getnewaddress()
|
fundaddr = self.nodes[1].getnewaddress()
|
||||||
retaddr = self.nodes[0].getnewaddress()
|
retaddr = self.nodes[0].getnewaddress()
|
||||||
|
|||||||
Reference in New Issue
Block a user