mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
add 'recḱless' option to allow using lightning on mainnet
This commit is contained in:
parent
5243ca97d9
commit
d4527b84c1
3 changed files with 10 additions and 3 deletions
|
@ -956,6 +956,7 @@ def add_global_options(parser):
|
||||||
group.add_argument("--testnet", action="store_true", dest="testnet", default=False, help="Use Testnet")
|
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("--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("--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():
|
def get_parser():
|
||||||
# create main parser
|
# create main parser
|
||||||
|
|
|
@ -34,9 +34,13 @@ NUM_PEERS_TARGET = 4
|
||||||
PEER_RETRY_INTERVAL = 600 # seconds
|
PEER_RETRY_INTERVAL = 600 # seconds
|
||||||
PEER_RETRY_INTERVAL_FOR_CHANNELS = 30 # seconds
|
PEER_RETRY_INTERVAL_FOR_CHANNELS = 30 # seconds
|
||||||
|
|
||||||
FALLBACK_NODE_LIST = (
|
FALLBACK_NODE_LIST_TESTNET = (
|
||||||
LNPeerAddr('ecdsa.net', 9735, bfh('038370f0e7a03eded3e1d41dc081084a87f0afa1c5b22090b4f3abb391eb15d8ff')),
|
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):
|
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
|
# 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:
|
# and only return mainnet nodes. so for the time being dns seeding is disabled:
|
||||||
if constants.net in (constants.BitcoinTestnet, ):
|
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:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
|
@ -330,7 +330,7 @@ if __name__ == '__main__':
|
||||||
constants.set_regtest()
|
constants.set_regtest()
|
||||||
elif config.get('simnet'):
|
elif config.get('simnet'):
|
||||||
constants.set_simnet()
|
constants.set_simnet()
|
||||||
else:
|
elif not config.get('reckless'):
|
||||||
raise Exception('lightning branch not available on mainnet')
|
raise Exception('lightning branch not available on mainnet')
|
||||||
|
|
||||||
if cmdname == 'gui':
|
if cmdname == 'gui':
|
||||||
|
|
Loading…
Add table
Reference in a new issue