lightningd: Check bitcoind version when setup_topology - #2859
Merged
ZmnSCPxj merged 3 commits intoJul 30, 2019
Conversation
Set the min supported numeric version of cli as 150000.
ZmnSCPxj
reviewed
Jul 29, 2019
trueptolemy
force-pushed
the
check-bitcoind-version
branch
3 times, most recently
from
July 29, 2019 09:17
9dfc67f to
df8770c
Compare
Member
|
Looks good to me, I think we can just fail with versions <0.14.0, since we don't support them anyway. The error message makes sense so that should work like it is. ACK df8770c |
rustyrussell
previously requested changes
Jul 30, 2019
trueptolemy
force-pushed
the
check-bitcoind-version
branch
from
July 30, 2019 08:02
df8770c to
b00ad8c
Compare
ZmnSCPxj
approved these changes
Jul 30, 2019
arowser
reviewed
Jul 30, 2019
| .rpc_port = 9332, | ||
| .cli = "litecoin-cli", | ||
| .cli_args = NULL, | ||
| .cli_min_supported_version = 150000, |
Contributor
There was a problem hiding this comment.
litecoin seems not release 0.15 version.
|
|
||
| if (tokens[0].type != JSMN_OBJECT) { | ||
| log_unusual(bcli->bitcoind->log, | ||
| "%s: gave non-object (%.*s)?", |
Contributor
There was a problem hiding this comment.
Correct format. %.*s means get two arguments: first is length of string, second is string (which might not be null terminated).
Contributor
There was a problem hiding this comment.
Thanks, glad to known new tricks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #2697 .
Corresponding to the comment, this PR add the
check that the bitcoind version must be at least v0.15.0, and any older version will let
lightningddown.Related changes include:
cli_min_supported_versionfield inchainparams:it's numeric version for
bitcoind, now set allcli_min_supported_versionas 150000;getnetworkinfor(callgetinforfor the version older than v0.16.0) to get the numeric version and check if the version is supported.