From 66bf2570e5b6af7db3be468d648733c5639c9284 Mon Sep 17 00:00:00 2001 From: TheLazieR Yip Date: Sun, 13 Nov 2016 08:56:26 +0700 Subject: [PATCH] Move dash stuff into Dash class Modify DashTestnet class to use Dash class --- lib/coins.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/coins.py b/lib/coins.py index 645dc10..d9af0db 100644 --- a/lib/coins.py +++ b/lib/coins.py @@ -177,9 +177,6 @@ class Coin(object): @classmethod def header_hashes(cls, header): '''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) @classmethod @@ -326,8 +323,13 @@ class Dash(Coin): TX_COUNT = 2157510 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" SHORTNAME = "tDASH" NET = "testnet"