MaxCoin Main Fixes
This commit is contained in:
parent
2ed1bec0b4
commit
2ebb24bac6
10
lib/util.py
10
lib/util.py
@ -6,10 +6,10 @@ import binascii
|
|||||||
import settings
|
import settings
|
||||||
import bitcoin_rpc
|
import bitcoin_rpc
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
from sha3 import sha3_256
|
|
||||||
|
|
||||||
if settings.COINDAEMON_ALGO == 'keccak':
|
if settings.COINDAEMON_ALGO == 'keccak':
|
||||||
import sha3
|
import sha3
|
||||||
|
from sha3 import sha3_256
|
||||||
|
|
||||||
|
|
||||||
def deser_string(f):
|
def deser_string(f):
|
||||||
@ -184,10 +184,12 @@ def address_to_pubkeyhash(addr):
|
|||||||
|
|
||||||
ver = addr[0]
|
ver = addr[0]
|
||||||
cksumA = addr[-4:]
|
cksumA = addr[-4:]
|
||||||
#TODO: We should clean this up so that it works with not Keccek implementations too.
|
if settings.COINDAEMON_ALGO != 'max':
|
||||||
cksumB = sha3_256(addr[:-4]).digest()[:4]
|
cksumB = doublesha(addr[:-4])[:4]
|
||||||
|
#TODO: We should clean this up so that it works with not Keccek implementations too.
|
||||||
|
else:
|
||||||
|
cksumB = sha3_256(addr[:-4]).digest()[:4]
|
||||||
|
|
||||||
#cksumB = sha3.sha3_256(addr[:-4]).digest()[:4]
|
|
||||||
|
|
||||||
if cksumA != cksumB:
|
if cksumA != cksumB:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user