From cdbfa4229cfd0813ed6c0ebd28a81256bb6c2f82 Mon Sep 17 00:00:00 2001 From: trueptolemy <823220586@qq.com> Date: Sat, 27 Jul 2019 23:20:05 +0800 Subject: [PATCH] bitcoin: Add the `cli_min_supported_version` field in `chainparams` Set the min supported numeric version of cli as 150000. --- bitcoin/chainparams.c | 6 ++++++ bitcoin/chainparams.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/bitcoin/chainparams.c b/bitcoin/chainparams.c index 82b54834c..d32dd26b7 100644 --- a/bitcoin/chainparams.c +++ b/bitcoin/chainparams.c @@ -20,6 +20,7 @@ const struct chainparams networks[] = { .rpc_port = 8332, .cli = "bitcoin-cli", .cli_args = NULL, + .cli_min_supported_version = 150000, .dust_limit = { 546 }, /* BOLT #2: * @@ -42,6 +43,7 @@ const struct chainparams networks[] = { .rpc_port = 18332, .cli = "bitcoin-cli", .cli_args = "-regtest", + .cli_min_supported_version = 150000, .dust_limit = { 546 }, .max_funding = AMOUNT_SAT_INIT((1 << 24) - 1), .max_payment = AMOUNT_MSAT_INIT(0xFFFFFFFFULL), @@ -57,6 +59,7 @@ const struct chainparams networks[] = { .rpc_port = 38332, .cli = "bitcoin-cli", .cli_args = "-signet", + .cli_min_supported_version = 150000, .dust_limit = { 546 }, .max_funding = AMOUNT_SAT_INIT((1 << 24) - 1), .max_payment = AMOUNT_MSAT_INIT(0xFFFFFFFFULL), @@ -72,6 +75,7 @@ const struct chainparams networks[] = { .rpc_port = 18332, .cli = "bitcoin-cli", .cli_args = "-testnet", + .cli_min_supported_version = 150000, .dust_limit = { 546 }, .max_funding = AMOUNT_SAT_INIT((1 << 24) - 1), .max_payment = AMOUNT_MSAT_INIT(0xFFFFFFFFULL), @@ -86,6 +90,7 @@ const struct chainparams networks[] = { .rpc_port = 9332, .cli = "litecoin-cli", .cli_args = NULL, + .cli_min_supported_version = 150000, .dust_limit = { 100000 }, .max_funding = AMOUNT_SAT_INIT(60 * ((1 << 24) - 1)), .max_payment = AMOUNT_MSAT_INIT(60 * 0xFFFFFFFFULL), @@ -101,6 +106,7 @@ const struct chainparams networks[] = { .rpc_port = 19332, .cli = "litecoin-cli", .cli_args = "-testnet", + .cli_min_supported_version = 150000, .dust_limit = { 100000 }, .max_funding = AMOUNT_SAT_INIT(60 * ((1 << 24) - 1)), .max_payment = AMOUNT_MSAT_INIT(60 * 0xFFFFFFFFULL), diff --git a/bitcoin/chainparams.h b/bitcoin/chainparams.h index 01b0cef6c..e6532fa1f 100644 --- a/bitcoin/chainparams.h +++ b/bitcoin/chainparams.h @@ -23,6 +23,8 @@ struct chainparams { const int rpc_port; const char *cli; const char *cli_args; + /* The min numeric version of cli supported */ + const u64 cli_min_supported_version; const struct amount_sat dust_limit; const struct amount_sat max_funding; const struct amount_msat max_payment;