Update authors & uncomment scrypt checking
This commit is contained in:
parent
cdaf874228
commit
8310195453
11
AUTHORS
11
AUTHORS
@ -1,3 +1,5 @@
|
|||||||
|
Electrum-BTC
|
||||||
|
------------
|
||||||
ThomasV - Creator and maintainer.
|
ThomasV - Creator and maintainer.
|
||||||
Animazing / Tachikoma - Styled the new GUI. Mac version.
|
Animazing / Tachikoma - Styled the new GUI. Mac version.
|
||||||
Azelphur - GUI stuff.
|
Azelphur - GUI stuff.
|
||||||
@ -10,3 +12,12 @@ Slush - Work on the server. Designed the original Stratum spec.
|
|||||||
Julian Toash (Tuxavant) - Various fixes to the client.
|
Julian Toash (Tuxavant) - Various fixes to the client.
|
||||||
rdymac - Website and translations.
|
rdymac - Website and translations.
|
||||||
kyuupichan - Miscellaneous.
|
kyuupichan - Miscellaneous.
|
||||||
|
|
||||||
|
|
||||||
|
FLO-Electrum
|
||||||
|
------------
|
||||||
|
vivekteega - Maintainer and remaining stuff
|
||||||
|
Bitspill - Bootstraped the project with core FLO changes
|
||||||
|
Rohit Tripathy - Ideation and problem solving
|
||||||
|
akhil2015 - Flodata and scrypt hashing
|
||||||
|
|
||||||
|
|||||||
@ -267,21 +267,21 @@ class Blockchain(util.PrintError):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def verify_header(cls, header: dict, prev_hash: str, target: int, expected_header_hash: str=None) -> None:
|
def verify_header(cls, header: dict, prev_hash: str, target: int, expected_header_hash: str=None) -> None:
|
||||||
_hash = hash_header(header)
|
_hash = hash_header(header)
|
||||||
#_powhash = pow_hash_header(header)
|
_powhash = pow_hash_header(header)
|
||||||
if expected_header_hash and expected_header_hash != _hash:
|
if expected_header_hash and expected_header_hash != _hash:
|
||||||
raise Exception("hash mismatches with expected: {} vs {}".format(expected_header_hash, _hash))
|
raise Exception("hash mismatches with expected: {} vs {}".format(expected_header_hash, _hash))
|
||||||
if prev_hash != header.get('prev_block_hash'):
|
if prev_hash != header.get('prev_block_hash'):
|
||||||
raise Exception("prev hash mismatch: %s vs %s" % (prev_hash, header.get('prev_block_hash')))
|
raise Exception("prev hash mismatch: %s vs %s" % (prev_hash, header.get('prev_block_hash')))
|
||||||
if constants.net.TESTNET:
|
if constants.net.TESTNET:
|
||||||
return
|
return
|
||||||
#bits = cls.target_to_bits(target)
|
bits = cls.target_to_bits(target)
|
||||||
bits = target
|
bits = target
|
||||||
if bits != header.get('bits'):
|
if bits != header.get('bits'):
|
||||||
raise Exception("bits mismatch: %s vs %s" % (bits, header.get('bits')))
|
raise Exception("bits mismatch: %s vs %s" % (bits, header.get('bits')))
|
||||||
block_hash_as_num = int.from_bytes(bfh(_hash), byteorder='big')
|
block_hash_as_num = int.from_bytes(bfh(_hash), byteorder='big')
|
||||||
#target_val = cls.bits_to_target(bits)
|
target_val = cls.bits_to_target(bits)
|
||||||
#if int('0x' + _powhash, 16) > target_val:
|
if int('0x' + _powhash, 16) > target_val:
|
||||||
# raise Exception("insufficient proof of work: %s vs target %s" % (int('0x' + _hash, 16), target_val))
|
raise Exception("insufficient proof of work: %s vs target %s" % (int('0x' + _hash, 16), target_val))
|
||||||
|
|
||||||
def verify_chunk(self, index: int, data: bytes) -> None:
|
def verify_chunk(self, index: int, data: bytes) -> None:
|
||||||
num = len(data) // HEADER_SIZE
|
num = len(data) // HEADER_SIZE
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user