mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
test: check xor.dat recreated when missing
This commit is contained in:
parent
d1610962bf
commit
e1d5dd732d
1 changed files with 6 additions and 1 deletions
|
@ -5,7 +5,10 @@
|
||||||
"""Test support for XORed block data and undo files (`-blocksxor` option)."""
|
"""Test support for XORed block data and undo files (`-blocksxor` option)."""
|
||||||
|
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.test_node import ErrorMatch
|
from test_framework.test_node import (
|
||||||
|
ErrorMatch,
|
||||||
|
NULL_BLK_XOR_KEY,
|
||||||
|
)
|
||||||
from test_framework.util import (
|
from test_framework.util import (
|
||||||
assert_equal,
|
assert_equal,
|
||||||
assert_greater_than,
|
assert_greater_than,
|
||||||
|
@ -57,6 +60,8 @@ class BlocksXORTest(BitcoinTestFramework):
|
||||||
# checklevel=2 -> verify block validity + undo data
|
# checklevel=2 -> verify block validity + undo data
|
||||||
# nblocks=0 -> verify all blocks
|
# nblocks=0 -> verify all blocks
|
||||||
node.verifychain(checklevel=2, nblocks=0)
|
node.verifychain(checklevel=2, nblocks=0)
|
||||||
|
self.log.info("Check that blocks XOR key is recreated")
|
||||||
|
assert_equal(node.read_xor_key(), NULL_BLK_XOR_KEY)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Reference in a new issue