File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -4249,27 +4249,18 @@ class Bitgesell(Coin):
4249
4249
XPUB_VERBYTES = bytes .fromhex ("0488b21e" )
4250
4250
XPRV_VERBYTES = bytes .fromhex ("0488ade4" )
4251
4251
RPC_PORT = 8332
4252
- GENESIS_HASH = (
4253
- '00000018cdcfeeb4dfdebe9392b855cfea7d6ddb953ef13f974b58773606d53d' )
4254
- PEERS = [
4255
- ]
4256
-
4257
-
4252
+ GENESIS_HASH = ('00000018cdcfeeb4dfdebe9392b855cfea7d6ddb953ef13f974b58773606d53d' )
4253
+ PEERS = []
4258
4254
DESERIALIZER = lib_tx .DeserializerSegWitBGL
4259
-
4260
4255
MEMPOOL_HISTOGRAM_REFRESH_SECS = 120
4261
4256
TX_COUNT = 14731600
4262
4257
TX_COUNT_HEIGHT = 228495
4263
4258
TX_PER_BLOCK = 64
4264
-
4265
-
4266
-
4267
4259
P2PKH_VERBYTE = bytes .fromhex ("0a" )
4268
4260
P2SH_VERBYTES = (bytes .fromhex ("19" ),)
4269
4261
WIF_BYTE = bytes .fromhex ("80" )
4270
4262
4271
-
4272
4263
@classmethod
4273
4264
def header_hash (cls , header ):
4274
4265
'''Given a header return hash'''
4275
- return keccak_256 (header )
4266
+ return keccak_256 (header )
Original file line number Diff line number Diff line change @@ -46,11 +46,13 @@ def double_sha256(x):
46
46
'''SHA-256 of SHA-256, as used extensively in bitcoin.'''
47
47
return sha256 (sha256 (x ))
48
48
49
+
49
50
def keccak_256 (s ):
50
51
from Cryptodome .Hash import keccak
51
52
keccak_hash = keccak .new (data = s , digest_bits = 256 )
52
53
return keccak_hash .digest ()
53
54
55
+
54
56
def hash_to_hex_str (x ):
55
57
'''Convert a big-endian binary hash to displayed hex string.
56
58
Original file line number Diff line number Diff line change @@ -311,9 +311,11 @@ def read_tx_and_vsize(self):
311
311
tx , _tx_hash , vsize = self ._read_tx_parts ()
312
312
return tx , vsize
313
313
314
+
314
315
class DeserializerSegWitBGL (DeserializerSegWit ):
315
316
TX_HASH_FN = staticmethod (sha256 )
316
317
318
+
317
319
class DeserializerLitecoin (DeserializerSegWit ):
318
320
'''Class representing Litecoin transactions, which may have the MW flag set.
319
321
You can’t perform that action at this time.
0 commit comments