Browse Source

Add Onixcoin (ONIX) (#747)

* Add Onixcoin (ONIX)
patch-2
Jose Luis Estevez 6 years ago
committed by Neil
parent
commit
c7a65fc9b0
  1. 27
      electrumx/lib/coins.py
  2. 18
      tests/blocks/onixcoin_mainnet_300000.json

27
electrumx/lib/coins.py

@ -2854,3 +2854,30 @@ class RavencoinTestnet(Ravencoin):
PEERS = [
'rvn.satoshi.org.uk s t'
]
class Onixcoin(Coin):
NAME = "Onixcoin"
SHORTNAME = "ONX"
NET = "mainnet"
XPUB_VERBYTES = bytes.fromhex("0488B21E")
XPRV_VERBYTES = bytes.fromhex("0488ADE4")
P2PKH_VERBYTE = bytes.fromhex("4B")
P2SH_VERBYTES = [bytes.fromhex("05")]
WIF_BYTE = bytes.fromhex("80")
GENESIS_HASH = ('000007140b7a6ca0b64965824f5731f6'
'e86daadf19eb299033530b1e61236e43')
TX_COUNT = 431808
TX_COUNT_HEIGHT = 321132
TX_PER_BLOCK = 10
RPC_PORT = 41019
REORG_LIMIT = 800
PEERS = []
SESSIONCLS = DashElectrumX
DAEMON = daemon.DashDaemon
@classmethod
def header_hash(cls, header):
'''Given a header return the hash.'''
import x11_hash
return x11_hash.getPoWHash(header)

18
tests/blocks/onixcoin_mainnet_300000.json

@ -0,0 +1,18 @@
{
"hash": "00000000000502760fe120b5be6f315513af417cd7942ce4f760399d7fe37707",
"confirmations": 17763,
"size": 212,
"height": 300000,
"version": 2,
"merkleroot": "83587626c5485313158092719facfa72ae1c2a65d9666ad1ab31b2545d496d10",
"tx": [
"83587626c5485313158092719facfa72ae1c2a65d9666ad1ab31b2545d496d10"
],
"time": 1547896171,
"nonce": 1025707132,
"bits": "1b057450",
"difficulty": 12015.1900094,
"previousblockhash": "000000000003f3b11ace3464840836fc361ac91bad3ef9395024cf4c846cad2d",
"nextblockhash": "0000000000045d9259a114088079b005518bb23a72a2f2802348ddb382726459",
"block": "020000002dad6c844ccf245039f93ead1bc91a36fc3608846434ce1ab1f3030000000000106d495d54b231abd16a66d9652a1cae72faac9f71928015135348c5267658836b05435c5074051b7c0c233d0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2e03e09304062f503253482f049805435c08581eb2a333010000142f70726f68617368696e672e636f6d5a0307002f000000000100bca065010000001976a9149f7932e1c8fcef3251869121da7351921e7671dc88ac00000000"
}
Loading…
Cancel
Save