-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explictly check at startup that we don't support bitcoind
's blocksonly
option.
#3889
Conversation
Also we should probably update |
I updated the README in the first commit. Regarding replacing |
This allows us to kill two birds with one stone: once connected, we use the output of the successful call to do some sanity checks (only checking the version for now, but more are yet to come!). Changelog-Added: We now explicitly check at startup the version of our default Bitcoin backend (bitcoind). Co-Authored-by: ZmnSCPxj <zmnscpxj@protonmail.com> Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
Adapted part of bfc73eb in b934a92 and built upon it for transaction relay sanity checks. Added a trivial check for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly OK, minor misspelling in docs though.
Corrected the grammar error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK b2833f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments, otherwise lgtm.
|
||
if (!tx_relay) | ||
plugin_err(p, "The 'blocksonly' mode of bitcoind, or any option " | ||
"deactivating transaction relay is not supported."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe offer a suggestion of how to fix it? i.e.
"deactivating transaction relay is not supported."); | |
"deactivating transaction relay is not supported. Remove -blocksonly from your bitcoind config"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a bit redundant ?..
The 'blocksonly' mode of bitcoind [...] is not supported. Remove -blocksonly from your bitcoind config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree as well.
We've had problems with blocksonly in the past and bitcoind still allows to use outdated (thus potentially dangerous estimates) while running bitcoin with -blocksonly. ZmnSCPxj mentionned that we still don't document this, but i figured that in this specific case an explicit check and error seems preferable. Changelog-Added: We now explicitly check at startup that our default Bitcoin backend (bitcoind) does relay transactions. Proposed-by: ZmnSCPxj <zmnscpxj@protonmail.com> Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This or `expect_fail`, as it implies that, well, the node may fail. Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 0049402
|
||
if (!tx_relay) | ||
plugin_err(p, "The 'blocksonly' mode of bitcoind, or any option " | ||
"deactivating transaction relay is not supported."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree as well.
This adds a sanity check function to
bcli
which we could extend with other sanity checks in the future.This was brought up by @ZmnSCPxj.