mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
contrib/linearize: Guarantee that output is generated in-order
This was typically ensured implicitly by virtue of normal bitcoind operation. Adding an explicit check provides a stronger guarantee, and it is cheap to add.
This commit is contained in:
parent
087eb43cff
commit
75400a2a41
@ -125,6 +125,12 @@ def copydata(settings, blkindex, blkset):
|
||||
print("Skipping unknown block " + hash_str)
|
||||
continue
|
||||
|
||||
if blkindex[blkCount] != hash_str:
|
||||
print("Out of order block.")
|
||||
print("Expected " + blkindex[blkCount])
|
||||
print("Got " + hash_str)
|
||||
sys.exit(1)
|
||||
|
||||
if not fileOutput and ((outsz + inLen) > maxOutSz):
|
||||
outF.close()
|
||||
outF = None
|
||||
|
Loading…
Reference in New Issue
Block a user