Browse Source

Added Ritocoin (#849)

patch-2
Traysi Hylian 6 years ago
committed by Neil
parent
commit
ed01a8a379
  1. 1
      .travis.yml
  2. 26
      electrumx/lib/coins.py
  3. 23
      tests/blocks/ritocoin_mainnet_250000.json

1
.travis.yml

@ -36,6 +36,7 @@ install:
- pip install x16r_hash
- pip install pycryptodomex
- pip install git+https://github.com/Electra-project/nist5_hash
- pip install git+https://github.com/RitoProject/x21s_hash
- pip install bell-yespower
# command to run tests
script:

26
electrumx/lib/coins.py

@ -2882,6 +2882,32 @@ class Bitsend(Coin):
return header + bytes(1)
class Ritocoin(Coin):
NAME = "Ritocoin"
SHORTNAME = "RITO"
NET = "mainnet"
XPUB_VERBYTES = bytes.fromhex("0534E7CA")
XPRV_VERBYTES = bytes.fromhex("05347EAC")
P2PKH_VERBYTE = bytes.fromhex("19")
P2SH_VERBYTES = [bytes.fromhex("69")]
GENESIS_HASH = ('00000075e344bdf1c0e433f453764b18'
'30a7aa19b2a5213e707502a22b779c1b')
DESERIALIZER = lib_tx.DeserializerSegWit
TX_COUNT = 1188090
TX_COUNT_HEIGHT = 296030
TX_PER_BLOCK = 3
RPC_PORT = 8766
REORG_LIMIT = 55
PEERS = [
'electrum-rito.minermore.com s t'
]
@classmethod
def header_hash(cls, header):
'''Given a header return the hash.'''
import x21s_hash
return x21s_hash.getPoWHash(header)
class Ravencoin(Coin):
NAME = "Ravencoin"
SHORTNAME = "RVN"

23
tests/blocks/ritocoin_mainnet_250000.json

@ -0,0 +1,23 @@
{
"hash": "0000000000fa8ca8bbc8d2a5c43221bbbd23868d128fb6f942ea79f4fb8fb3f7",
"confirmations": 1,
"strippedsize": 279,
"size": 315,
"weight": 1152,
"height": 296039,
"version": 805306369,
"versionHex": "30000001",
"merkleroot": "e428c003c3d8660cabb891c1da141283a1a0045353786a7e7c809ef7fc5ff77b",
"tx": [
"e428c003c3d8660cabb891c1da141283a1a0045353786a7e7c809ef7fc5ff77b"
],
"time": 1561402552,
"mediantime": 1561402193,
"nonce": 3796686866,
"bits": "1c022450",
"difficulty": 119.5212584064744,
"chainwork": "0000000000000000000000000000000000000000000000000842199d62c03de2",
"previousblockhash": "00000000007dc528b4381ca868349627fd9e6d89f71607ab075f572448ed4a49",
"nextblockhash": "0000000001875011ab354686523fe37786d417bf53efd7b09448bed928a74bd6",
"block": "01000030494aed4824575f07ab0716f7896d9efd27963468a81c38b428c57d00000000007bf75ffcf79e807c7e6a78535304a0a1831214dac191b8ab0c66d8c303c028e4b81c115d5024021c12d84ce20101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff200367840404b81c115d08602a016b1cb500000d2f6e6f64655374726174756d2f00000000030000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9001edc0c170000001976a914e6802e3c73096ca0baf6166e3b7ed2427984e8fd88ac8033023b000000001976a91464f64fb46815dbabaa57f61aca598eb93217ae7a88ac00000000"
}
Loading…
Cancel
Save