mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-19 14:45:08 +01:00
refactor: use unlink rather than os.remove
This commit is contained in:
parent
c8176f758b
commit
d43948c3ef
@ -3,7 +3,6 @@
|
|||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
"""Test support for XORed block data and undo files (`-blocksxor` option)."""
|
"""Test support for XORed block data and undo files (`-blocksxor` option)."""
|
||||||
import os
|
|
||||||
|
|
||||||
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
|
||||||
@ -54,7 +53,7 @@ class BlocksXORTest(BitcoinTestFramework):
|
|||||||
match=ErrorMatch.PARTIAL_REGEX)
|
match=ErrorMatch.PARTIAL_REGEX)
|
||||||
|
|
||||||
self.log.info("Delete XOR key, restart node with '-blocksxor=0', check blk*.dat/rev*.dat file integrity")
|
self.log.info("Delete XOR key, restart node with '-blocksxor=0', check blk*.dat/rev*.dat file integrity")
|
||||||
os.remove(node.blocks_key_path)
|
node.blocks_key_path.unlink()
|
||||||
self.start_node(0, extra_args=['-blocksxor=0'])
|
self.start_node(0, extra_args=['-blocksxor=0'])
|
||||||
# checklevel=2 -> verify block validity + undo data
|
# checklevel=2 -> verify block validity + undo data
|
||||||
# nblocks=0 -> verify all blocks
|
# nblocks=0 -> verify all blocks
|
||||||
|
Loading…
Reference in New Issue
Block a user