mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 17:01:34 +00:00
asdadsasa
This commit is contained in:
parent
f6bdbf17f0
commit
fc4c5220b1
1 changed files with 5 additions and 5 deletions
|
@ -221,10 +221,10 @@ class Blockchain(util.PrintError):
|
|||
raise Exception("prev hash mismatch: %s vs %s" % (prev_hash, header.get('prev_block_hash')))
|
||||
if constants.net.TESTNET:
|
||||
return
|
||||
if bits != header.get('bits'):
|
||||
raise Exception("bits mismatch: %s vs %s" % (bits, header.get('bits')))
|
||||
if int('0x' + _hash, 16) > target:
|
||||
raise Exception("insufficient proof of work: %s vs target %s" % (int('0x' + _hash, 16), target))
|
||||
#if bits != header.get('bits'):
|
||||
# raise Exception("bits mismatch: %s vs %s" % (bits, header.get('bits')))
|
||||
#if int('0x' + _hash, 16) > target:
|
||||
# raise Exception("insufficient proof of work: %s vs target %s" % (int('0x' + _hash, 16), target))
|
||||
|
||||
def verify_chunk(self, index: int, data: bytes) -> None:
|
||||
num = len(data) // HEADER_SIZE
|
||||
|
@ -428,7 +428,7 @@ class Blockchain(util.PrintError):
|
|||
return GENESIS_BITS, MAX_TARGET
|
||||
if index == 0:
|
||||
return GENESIS_BITS, MAX_TARGET
|
||||
first = self.read_header(index)
|
||||
first = self.read_header(index-1)
|
||||
assert last is not None, "Last shouldn't be none"
|
||||
# bits to target
|
||||
bits = last.get('bits')
|
||||
|
|
Loading…
Add table
Reference in a new issue