Rename NETWORK envvar to NET
For consistency with lib/coins.py SegWit testnet needs its own NET
This commit is contained in:
parent
4d62019b07
commit
dcc2c92bd6
@ -31,7 +31,7 @@ These environment variables are always required:
|
||||
|
||||
The leading `http://` is optional, as is the trailing slash. The
|
||||
`:port` part is also optional and will default to the standard RPC
|
||||
port for **COIN** and **NETWORK** if omitted.
|
||||
port for **COIN** and **NET** if omitted.
|
||||
|
||||
|
||||
For the `run` script
|
||||
@ -58,7 +58,7 @@ These environment variables are optional:
|
||||
Must be a *NAME* from one of the **Coin** classes in
|
||||
`lib/coins.py`_. Defaults to `Bitcoin`.
|
||||
|
||||
* **NETWORK**
|
||||
* **NET**
|
||||
|
||||
Must be a *NET* from one of the **Coin** classes in `lib/coins.py`_.
|
||||
Defaults to `mainnet`.
|
||||
@ -77,7 +77,7 @@ These environment variables are optional:
|
||||
The maximum number of blocks to be able to handle in a chain
|
||||
reorganisation. ElectrumX retains some fairly compact undo
|
||||
information for this many blocks in levelDB. The default is a
|
||||
function of **COIN** and **NETWORK**; for Bitcoin mainnet it is 200.
|
||||
function of **COIN** and **NET**; for Bitcoin mainnet it is 200.
|
||||
|
||||
* **HOST**
|
||||
|
||||
@ -98,7 +98,7 @@ These environment variables are optional:
|
||||
|
||||
ElectrumX will listen on this port for local RPC connections.
|
||||
ElectrumX listens for RPC connections unless this is explicitly set
|
||||
to blank. The default is appropriate for **COIN** and **NETWORK**
|
||||
to blank. The default is appropriate for **COIN** and **NET**
|
||||
(e.g., 8000 for Bitcoin mainnet) if not set.
|
||||
|
||||
* **DONATION_ADDRESS**
|
||||
@ -223,7 +223,7 @@ connectivity on IRC:
|
||||
|
||||
The nick to use when connecting to IRC. The default is a hash of
|
||||
**REPORT_HOST**. Either way a prefix will be prepended depending on
|
||||
**COIN** and **NETWORK**.
|
||||
**COIN** and **NET**.
|
||||
|
||||
* **REPORT_HOST**
|
||||
|
||||
|
||||
@ -301,6 +301,8 @@ class BitcoinTestnetSegWit(BitcoinTestnet):
|
||||
differently than with earlier versions. If you are using such a
|
||||
bitcoind on testnet, you must use this class as your "COIN".
|
||||
'''
|
||||
NET = "testnet-segwit"
|
||||
|
||||
@classmethod
|
||||
def deserializer(cls):
|
||||
return DeserializerSegWit
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
#MISC
|
||||
#
|
||||
#COIN = Bitcoin # lib/coins.py
|
||||
#NETWORK = mainnet # lib/coins.py
|
||||
#NET = mainnet # lib/coins.py
|
||||
#DB_ENGINE = leveldb
|
||||
#leveldb, rocksdb, lmdb (You'll need to install appropriate python packages)
|
||||
|
||||
|
||||
@ -22,9 +22,9 @@ class Env(LoggedClass):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.obsolete(['UTXO_MB', 'HIST_MB'])
|
||||
self.obsolete(['UTXO_MB', 'HIST_MB', 'NETWORK'])
|
||||
coin_name = self.default('COIN', 'Bitcoin')
|
||||
network = self.default('NETWORK', 'mainnet')
|
||||
network = self.default('NET', 'mainnet')
|
||||
self.coin = Coin.lookup_coin_class(coin_name, network)
|
||||
self.db_dir = self.required('DB_DIRECTORY')
|
||||
self.cache_MB = self.integer('CACHE_MB', 1200)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user