Make the default reorg_limit a coin property
This commit is contained in:
parent
c31896a290
commit
66c493dbf4
@ -30,6 +30,7 @@ class CoinError(Exception):
|
||||
class Coin(object):
|
||||
'''Base class of coin hierarchy.'''
|
||||
|
||||
REORG_LIMIT=200
|
||||
# Not sure if these are coin-specific
|
||||
HEADER_LEN = 80
|
||||
DEFAULT_RPC_PORT = 8332
|
||||
@ -244,6 +245,7 @@ class Bitcoin(Coin):
|
||||
class BitcoinTestnet(Coin):
|
||||
NAME = "Bitcoin"
|
||||
SHORTNAME = "XTN"
|
||||
REORG_LIMIT = 2000
|
||||
NET = "testnet"
|
||||
XPUB_VERBYTES = bytes.fromhex("043587cf")
|
||||
XPRV_VERBYTES = bytes.fromhex("04358394")
|
||||
|
||||
@ -29,7 +29,7 @@ class Env(LoggedClass):
|
||||
self.utxo_MB = self.integer('UTXO_MB', 1000)
|
||||
self.hist_MB = self.integer('HIST_MB', 300)
|
||||
self.host = self.default('HOST', 'localhost')
|
||||
self.reorg_limit = self.integer('REORG_LIMIT', 200)
|
||||
self.reorg_limit = self.integer('REORG_LIMIT', self.coin.REORG_LIMIT)
|
||||
self.daemon_url = self.build_daemon_url()
|
||||
# Server stuff
|
||||
self.tcp_port = self.integer('TCP_PORT', None)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user