Browse Source

Added Motion Coin mainnet (#528)

* Motion added
patch-2
Omar Cruz 7 years ago
committed by Neil
parent
commit
227696636d
  1. 1
      .travis.yml
  2. 26
      electrumx/lib/coins.py
  3. 14
      tests/blocks/motion_mainnet_52000.json

1
.travis.yml

@ -30,6 +30,7 @@ install:
- pip install xevan_hash
- pip install quark_hash
- pip install git+https://github.com/goacoincore/neoscrypt
- pip install git+https://github.com/motioncrypto/x16r_hash
# command to run tests
script:
- pytest --cov=electrumx

26
electrumx/lib/coins.py

@ -795,6 +795,32 @@ class DogecoinTestnet(Dogecoin):
'4d7049f45189db5664f3c4d07350559e')
# Source: https://github.com/motioncrypto/motion
class Motion(Coin):
NAME = "Motion"
SHORTNAME = "XMN"
NET = "mainnet"
XPUB_VERBYTES = bytes.fromhex("0488B21E")
XPRV_VERBYTES = bytes.fromhex("0488ADE4")
GENESIS_HASH = ('000001e9dc60dd2618e91f7b90141349'
'22c374496b61c1a272519b1c39979d78')
P2PKH_VERBYTE = bytes.fromhex("32")
P2SH_VERBYTES = [bytes.fromhex("12")]
WIF_BYTE = bytes.fromhex("80")
TX_COUNT_HEIGHT = 54353
TX_COUNT = 92701
TX_PER_BLOCK = 4
RPC_PORT = 3385
SESSIONCLS = DashElectrumX
DAEMON = daemon.DashDaemon
@classmethod
def header_hash(cls, header):
'''Given a header return the hash.'''
import x16r_hash
return x16r_hash.getPoWHash(header)
# Source: https://github.com/dashpay/dash
class Dash(Coin):
NAME = "Dash"

14
tests/blocks/motion_mainnet_52000.json

@ -0,0 +1,14 @@
{
"hash": "000000000023070cbea0ce0ab9c999b97932f02354e8172c0eae02e2b5f95adf",
"size": 223,
"height": 52000,
"merkleroot": "7fd291107086805bb7f83168b0de609cbb3f0150f0bdf6faf2e724efa0601846",
"tx": [
"7fd291107086805bb7f83168b0de609cbb3f0150f0bdf6faf2e724efa0601846"
],
"time": 1531687551,
"nonce": 2901992536,
"bits": "1b337222",
"previousblockhash": "000000000015c6f58cb3f75edaf5e0fbaa0e5ef05ba777bd04f7935a812a36dc",
"block": "00000020dc362a815a93f704bd77a75bf05e0eaafbe0f5da5ef7b38cf5c6150000000000461860a0ef24e7f2faf6bdf050013fbb9c60deb06831f8b75b8086701091d27f7fb24b5b2272331b58e4f8ac0102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff170320cb00047fb24b5b088100005f000000007a657267000000000002008c8647000000001976a914c5656d08746687407e38afb22df2b1baf3b7caed88ac0008af2f000000001976a91494e11b4999b2e3cb539e90baa4fdbcf87c98df2288ac00000000"
}
Loading…
Cancel
Save