|
|
@ -214,6 +214,16 @@ class Coin(object): |
|
|
|
payload.append(0x01) |
|
|
|
return Base58.encode_check(payload) |
|
|
|
|
|
|
|
@classmethod |
|
|
|
def header_hash(cls, header): |
|
|
|
'''Given a header return hash''' |
|
|
|
return double_sha256(header) |
|
|
|
|
|
|
|
@classmethod |
|
|
|
def header_prevhash(cls, header): |
|
|
|
'''Given a header return previous hash''' |
|
|
|
return header[4:36] |
|
|
|
|
|
|
|
@classmethod |
|
|
|
def header_hashes(cls, header): |
|
|
|
'''Given a header return the previous and current block hashes.''' |
|
|
@ -367,6 +377,12 @@ class Dash(Coin): |
|
|
|
IRC_PREFIX = "D_" |
|
|
|
IRC_CHANNEL = "#electrum-dash" |
|
|
|
|
|
|
|
@classmethod |
|
|
|
def header_hash(cls, header): |
|
|
|
'''Given a header return the hash.''' |
|
|
|
import x11_hash |
|
|
|
return x11_hash.getPoWHash(header) |
|
|
|
|
|
|
|
@classmethod |
|
|
|
def header_hashes(cls, header): |
|
|
|
'''Given a header return the previous and current block hashes.''' |
|
|
|