Merge bitcoin/bitcoin#30607: contrib: support reading XORed blocks in linearize-data.py script

77ff0ec1f1 contrib: support reading XORed blocks in linearize-data.py script (Sebastian Falbesoner)

Pull request description:

  This PR is a small follow-up for #28052, adding support for the block linearization script to handle XORed blocksdir *.dat files. Note that if no xor.dat file exists, the XOR pattern is set to all-zeros, in order to still support blockdirs that have been created with versions earlier than 28.x.

  Partly fixes issue #30599.

ACKs for top commit:
  achow101:
    ACK 77ff0ec1f1
  tdb3:
    ACK 77ff0ec1f1
  hodlinator:
    ACK 77ff0ec1f1

Tree-SHA512: 011eb02e2411de373cbbf4b26db4640fc693a20be8c2430529fba6e36a3a3abfdfdc3b005d330f9ec2846bfad9bfbf34231c574ba99289ef37dd51a68e6e7f3d
This commit is contained in:
Ava Chow
2024-08-12 15:03:35 -04:00
2 changed files with 23 additions and 9 deletions

View File

@@ -26,10 +26,6 @@ class LoadblockTest(BitcoinTestFramework):
self.setup_clean_chain = True
self.num_nodes = 2
self.supports_cli = False
self.extra_args = [
["-blocksxor=0"], # TODO: The linearize scripts should be adjusted to apply any XOR
[],
]
def run_test(self):
self.nodes[1].setnetworkactive(state=False)