electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 626d09b35806a74d9a2a3c3cda04e6f404eb2971
parent 87fb0da5e1b907f1e593a0dc10c20e30900a5353
Author: ThomasV <thomasv@electrum.org>
Date:   Sun, 14 Oct 2018 10:24:06 +0200

add 'recḱless' option to allow using lightning on mainnet

Diffstat:
Melectrum/commands.py | 1+
Melectrum/lnworker.py | 10++++++++--
Mrun_electrum | 2+-
3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/electrum/commands.py b/electrum/commands.py @@ -980,6 +980,7 @@ def add_global_options(parser): group.add_argument("--testnet", action="store_true", dest="testnet", default=False, help="Use Testnet") group.add_argument("--regtest", action="store_true", dest="regtest", default=False, help="Use Regtest") group.add_argument("--simnet", action="store_true", dest="simnet", default=False, help="Use Simnet") + group.add_argument("--reckless", action="store_true", dest="reckless", default=False, help="Play with real money") def get_parser(): # create main parser diff --git a/electrum/lnworker.py b/electrum/lnworker.py @@ -34,9 +34,13 @@ NUM_PEERS_TARGET = 4 PEER_RETRY_INTERVAL = 600 # seconds PEER_RETRY_INTERVAL_FOR_CHANNELS = 30 # seconds -FALLBACK_NODE_LIST = ( +FALLBACK_NODE_LIST_TESTNET = ( LNPeerAddr('ecdsa.net', 9735, bfh('038370f0e7a03eded3e1d41dc081084a87f0afa1c5b22090b4f3abb391eb15d8ff')), ) +FALLBACK_NODE_LIST_MAINNET = ( + LNPeerAddr('104.198.32.198', 9735, bfh('02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432')), # Blockstream + LNPeerAddr('13.80.67.162', 9735, bfh('02c0ac82c33971de096d87ce5ed9b022c2de678f08002dc37fdb1b6886d12234b5')), # Stampery +) class LNWorker(PrintError): @@ -398,7 +402,9 @@ class LNWorker(PrintError): # TODO remove this. For some reason the dns seeds seem to ignore the realm byte # and only return mainnet nodes. so for the time being dns seeding is disabled: if constants.net in (constants.BitcoinTestnet, ): - return [random.choice(FALLBACK_NODE_LIST)] + return [random.choice(FALLBACK_NODE_LIST_TESTNET)] + elif constants.net in (constants.BitcoinMainnet, ): + return [random.choice(FALLBACK_NODE_LIST_MAINNET)] else: return [] diff --git a/run_electrum b/run_electrum @@ -352,7 +352,7 @@ if __name__ == '__main__': constants.set_regtest() elif config.get('simnet'): constants.set_simnet() - else: + elif not config.get('reckless'): raise Exception('lightning branch not available on mainnet') if cmdname == 'gui':