From 83732af4fe2ffc6a5c57b1cfef2217a199d2c32d Mon Sep 17 00:00:00 2001 From: joesixpack <23145642+joesixpack@users.noreply.github.com> Date: Mon, 23 Jul 2018 18:39:39 -0700 Subject: [PATCH] Support for Minexcoin (#529) --- docs/changelog.rst | 2 +- electrumx/lib/coins.py | 49 ++++++++++++++++++++++ tests/blocks/minexcoin_mainnet_170999.json | 26 ++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 tests/blocks/minexcoin_mainnet_170999.json diff --git a/docs/changelog.rst b/docs/changelog.rst index 2c89dab..22bff13 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -17,7 +17,7 @@ Version 1.6.1 (in progress) * cleaner mempool and notification handling * aiohttp min version requirement raised to 2.0 * onion peers are ignored if no tor proxy is available -* add Motion coin (ocruzv) +* add Motion coin (ocruzv), MinexCoin (joesixpack) Version 1.6 (19 July 2018) =========================== diff --git a/electrumx/lib/coins.py b/electrumx/lib/coins.py index 6461c8f..9b7cc48 100644 --- a/electrumx/lib/coins.py +++ b/electrumx/lib/coins.py @@ -1923,3 +1923,52 @@ class Monoeci(Coin): '''Given a header return the hash.''' import x11_hash return x11_hash.getPoWHash(header) + + +class MinexcoinMixin(object): + STATIC_BLOCK_HEADERS = True + BASIC_HEADER_SIZE = 209 + DESERIALIZER = lib_tx.DeserializerEquihash + + @classmethod + def electrum_header(cls, header, height): + version, = struct.unpack('