Pārlūkot izejas kodu

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.
tags/v0.15.1
Jeff Garzik pirms 7 gadiem
vecāks
revīzija
75400a2a41
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6
    0
      contrib/linearize/linearize-data.py

+ 6
- 0
contrib/linearize/linearize-data.py Parādīt failu

@@ -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

Notiek ielāde…
Atcelt
Saglabāt