Skip to content

Commit e1d5dd7

Browse files
committed
test: check xor.dat recreated when missing
1 parent d161096 commit e1d5dd7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/functional/feature_blocksxor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"""Test support for XORed block data and undo files (`-blocksxor` option)."""
66

77
from test_framework.test_framework import BitcoinTestFramework
8-
from test_framework.test_node import ErrorMatch
8+
from test_framework.test_node import (
9+
ErrorMatch,
10+
NULL_BLK_XOR_KEY,
11+
)
912
from test_framework.util import (
1013
assert_equal,
1114
assert_greater_than,
@@ -57,6 +60,8 @@ def run_test(self):
5760
# checklevel=2 -> verify block validity + undo data
5861
# nblocks=0 -> verify all blocks
5962
node.verifychain(checklevel=2, nblocks=0)
63+
self.log.info("Check that blocks XOR key is recreated")
64+
assert_equal(node.read_xor_key(), NULL_BLK_XOR_KEY)
6065

6166

6267
if __name__ == '__main__':

0 commit comments

Comments
 (0)