Move dash stuff into Dash class
Modify DashTestnet class to use Dash class
This commit is contained in:
parent
ff834519aa
commit
66bf2570e5
10
lib/coins.py
10
lib/coins.py
@ -177,9 +177,6 @@ class Coin(object):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def header_hashes(cls, header):
|
def header_hashes(cls, header):
|
||||||
'''Given a header return the previous and current block hashes.'''
|
'''Given a header return the previous and current block hashes.'''
|
||||||
if cls.NAME.lower() == 'dash':
|
|
||||||
import x11_hash
|
|
||||||
return header[4:36], x11_hash.getPoWHash(header)
|
|
||||||
return header[4:36], double_sha256(header)
|
return header[4:36], double_sha256(header)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -326,8 +323,13 @@ class Dash(Coin):
|
|||||||
TX_COUNT = 2157510
|
TX_COUNT = 2157510
|
||||||
TX_PER_BLOCK = 4
|
TX_PER_BLOCK = 4
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def header_hashes(cls, header):
|
||||||
|
'''Given a header return the previous and current block hashes.'''
|
||||||
|
import x11_hash
|
||||||
|
return header[4:36], x11_hash.getPoWHash(header)
|
||||||
|
|
||||||
class DashTestnet(Coin):
|
class DashTestnet(Dash):
|
||||||
NAME = "Dash"
|
NAME = "Dash"
|
||||||
SHORTNAME = "tDASH"
|
SHORTNAME = "tDASH"
|
||||||
NET = "testnet"
|
NET = "testnet"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user