1
0

Add support for BU's nolnet

Also update testnet servers
Add missing self. in print_error call
This commit is contained in:
Neil Booth
2017-03-04 11:01:32 +09:00
parent b2d66b2a6f
commit 8888a50549
6 changed files with 31 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ class Blockchain(util.PrintError):
def verify_header(self, header, prev_header, bits, target):
prev_hash = self.hash_header(prev_header)
assert prev_hash == header.get('prev_block_hash'), "prev hash mismatch: %s vs %s" % (prev_hash, header.get('prev_block_hash'))
if bitcoin.TESTNET: return
if bitcoin.TESTNET or bitcoin.NOLNET: return
assert bits == header.get('bits'), "bits mismatch: %s vs %s" % (bits, header.get('bits'))
_hash = self.hash_header(header)
assert int('0x' + _hash, 16) <= target, "insufficient proof of work: %s vs target %s" % (int('0x' + _hash, 16), target)