mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
reckless: add support for additional networks
This should have been added earlier as @cdecker suggested, but is needed to enable CI testing. Changelog-Changed: Reckless - added support for networks beyond bitocoin and regtest
This commit is contained in:
parent
e61401aab9
commit
55cddcd350
1 changed files with 9 additions and 1 deletions
|
@ -664,7 +664,8 @@ if __name__ == '__main__':
|
||||||
type=str,
|
type=str,
|
||||||
default=None)
|
default=None)
|
||||||
parser.add_argument('-r', '--regtest', action='store_true')
|
parser.add_argument('-r', '--regtest', action='store_true')
|
||||||
# parser.add_argument('-v', '--verbose', action='store_true')
|
parser.add_argument('--network', help="specify a network to use (default: bitcoin)",
|
||||||
|
type=str)
|
||||||
parser.add_argument('-v', '--verbose', action="store_const",
|
parser.add_argument('-v', '--verbose', action="store_const",
|
||||||
dest="loglevel", const=logging.DEBUG, default=logging.WARNING)
|
dest="loglevel", const=logging.DEBUG, default=logging.WARNING)
|
||||||
cmd1 = parser.add_subparsers(dest='cmd1', help='command',
|
cmd1 = parser.add_subparsers(dest='cmd1', help='command',
|
||||||
|
@ -716,6 +717,13 @@ if __name__ == '__main__':
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
NETWORK = 'regtest' if args.regtest else 'bitcoin'
|
NETWORK = 'regtest' if args.regtest else 'bitcoin'
|
||||||
|
SUPPORTED_NETWORKS = ['bitcoin', 'regtest', 'liquid', 'liquid-regtest',
|
||||||
|
'litecoin', 'signet', 'testnet']
|
||||||
|
if args.network:
|
||||||
|
if args.network in SUPPORTED_NETWORKS:
|
||||||
|
NETWORK = args.network
|
||||||
|
else:
|
||||||
|
print(f"Error: {args.network} network not supported")
|
||||||
LIGHTNING_DIR = Path(args.lightning)
|
LIGHTNING_DIR = Path(args.lightning)
|
||||||
LIGHTNING_CLI_CALL = ['lightning-cli']
|
LIGHTNING_CLI_CALL = ['lightning-cli']
|
||||||
if NETWORK != 'bitcoin':
|
if NETWORK != 'bitcoin':
|
||||||
|
|
Loading…
Add table
Reference in a new issue