add AXE support (#429)
This commit is contained in:
parent
c1ba211d43
commit
a1802b436b
@ -22,6 +22,7 @@ install:
|
|||||||
- pip install pytest-cov
|
- pip install pytest-cov
|
||||||
- pip install pylru
|
- pip install pylru
|
||||||
- pip install blake256
|
- pip install blake256
|
||||||
|
- pip install x11_hash
|
||||||
# command to run tests
|
# command to run tests
|
||||||
script: pytest --cov=server --cov=lib --cov=wallet
|
script: pytest --cov=server --cov=lib --cov=wallet
|
||||||
# Dont report coverage from nightly
|
# Dont report coverage from nightly
|
||||||
|
|||||||
29
lib/coins.py
29
lib/coins.py
@ -1545,3 +1545,32 @@ class DecredTestnet(Decred):
|
|||||||
TX_PER_BLOCK = 1000
|
TX_PER_BLOCK = 1000
|
||||||
RPC_PORT = 19109
|
RPC_PORT = 19109
|
||||||
|
|
||||||
|
|
||||||
|
class Axe(Dash):
|
||||||
|
NAME = "Axe"
|
||||||
|
SHORTNAME = "AXE"
|
||||||
|
NET = "mainnet"
|
||||||
|
XPUB_VERBYTES = bytes.fromhex("02fe52cc")
|
||||||
|
XPRV_VERBYTES = bytes.fromhex("02fe52f8")
|
||||||
|
P2PKH_VERBYTE = bytes.fromhex("37")
|
||||||
|
P2SH_VERBYTES = [bytes.fromhex("10")]
|
||||||
|
WIF_BYTE = bytes.fromhex("cc")
|
||||||
|
GENESIS_HASH = ('00000c33631ca6f2f61368991ce2dc03'
|
||||||
|
'306b5bb50bf7cede5cfbba6db38e52e6')
|
||||||
|
DAEMON = daemon.DashDaemon
|
||||||
|
TX_COUNT = 18405
|
||||||
|
TX_COUNT_HEIGHT = 30237
|
||||||
|
TX_PER_BLOCK = 1
|
||||||
|
RPC_PORT = 9337
|
||||||
|
REORG_LIMIT = 1000
|
||||||
|
PEERS = []
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def header_hash(cls, header):
|
||||||
|
'''
|
||||||
|
Given a header return the hash for AXE.
|
||||||
|
Need to download `axe_hash` module
|
||||||
|
Source code: https://github.com/AXErunners/axe_hash
|
||||||
|
'''
|
||||||
|
import x11_hash
|
||||||
|
return x11_hash.getPoWHash(header)
|
||||||
|
|||||||
14
tests/blocks/axe_mainnet_30237.json
Normal file
14
tests/blocks/axe_mainnet_30237.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"hash": "000000000013ae459f3755ac98e6dd01ad8364849cd1bcb1ca4a40f81a7ead75",
|
||||||
|
"size": 223,
|
||||||
|
"height": 30237,
|
||||||
|
"merkleroot": "de4266afc54356d351c11050a01165adc0e6b339268efdf1c578374b4212a266",
|
||||||
|
"tx": [
|
||||||
|
"de4266afc54356d351c11050a01165adc0e6b339268efdf1c578374b4212a266"
|
||||||
|
],
|
||||||
|
"time": 1521830841,
|
||||||
|
"nonce": 1653639604,
|
||||||
|
"bits": "1b29c9b1",
|
||||||
|
"previousblockhash": "000000000014fce86cc81f0ad3135fb139764183a645d08b582a251b023f62e9",
|
||||||
|
"block": "00000020e9623f021b252a588bd045a683417639b15f13d30a1fc86ce8fc14000000000066a212424b3778c5f1fd8e2639b3e6c0ad6511a05010c151d35643c5af6642deb94bb55ab1c9291bb48990620101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff17021d7604b94bb55a0881000001140000007969696d7000000000000200c2eb0b000000001976a914b4237f3423d7fadad0a5a4a8fd6f6bae250d59dd88ac0008af2f000000001976a914f8bc2102e0917b9537babbbaa6e15fe57307062488ac00000000"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user