Skip to content

Commit 19cfc72

Browse files
committed
Add Bitgesell (BGL) - check pycodestyle
1 parent 413717a commit 19cfc72

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

electrumx/lib/coins.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4249,27 +4249,18 @@ class Bitgesell(Coin):
42494249
XPUB_VERBYTES = bytes.fromhex("0488b21e")
42504250
XPRV_VERBYTES = bytes.fromhex("0488ade4")
42514251
RPC_PORT = 8332
4252-
GENESIS_HASH = (
4253-
'00000018cdcfeeb4dfdebe9392b855cfea7d6ddb953ef13f974b58773606d53d')
4254-
PEERS = [
4255-
]
4256-
4257-
4252+
GENESIS_HASH = ('00000018cdcfeeb4dfdebe9392b855cfea7d6ddb953ef13f974b58773606d53d')
4253+
PEERS = []
42584254
DESERIALIZER = lib_tx.DeserializerSegWitBGL
4259-
42604255
MEMPOOL_HISTOGRAM_REFRESH_SECS = 120
42614256
TX_COUNT = 14731600
42624257
TX_COUNT_HEIGHT = 228495
42634258
TX_PER_BLOCK = 64
4264-
4265-
4266-
42674259
P2PKH_VERBYTE = bytes.fromhex("0a")
42684260
P2SH_VERBYTES = (bytes.fromhex("19"),)
42694261
WIF_BYTE = bytes.fromhex("80")
42704262

4271-
42724263
@classmethod
42734264
def header_hash(cls, header):
42744265
'''Given a header return hash'''
4275-
return keccak_256(header)
4266+
return keccak_256(header)

electrumx/lib/hash.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ def double_sha256(x):
4646
'''SHA-256 of SHA-256, as used extensively in bitcoin.'''
4747
return sha256(sha256(x))
4848

49+
4950
def keccak_256(s):
5051
from Cryptodome.Hash import keccak
5152
keccak_hash = keccak.new(data=s, digest_bits=256)
5253
return keccak_hash.digest()
5354

55+
5456
def hash_to_hex_str(x):
5557
'''Convert a big-endian binary hash to displayed hex string.
5658

electrumx/lib/tx.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,11 @@ def read_tx_and_vsize(self):
311311
tx, _tx_hash, vsize = self._read_tx_parts()
312312
return tx, vsize
313313

314+
314315
class DeserializerSegWitBGL(DeserializerSegWit):
315316
TX_HASH_FN = staticmethod(sha256)
316317

318+
317319
class DeserializerLitecoin(DeserializerSegWit):
318320
'''Class representing Litecoin transactions, which may have the MW flag set.
319321

0 commit comments

Comments
 (0)