chainreg: shutdown if backend node doesn't support taproot

In this commit, we add a check during normal node construction to see if
the backend node supports Taproot. If it doesn't, then we want to
shutdown and force the user to take note.

To check if the node supports Taproot, we'll first try the normal
getblockchaininfo call. If this works, cool, then we can rely on the
value. If it doesn't, then we'll fall back to the getdeploymentinfo call
which was added in a recent version of bitcoind [1]. Newer versions of
bitcoind might also have this call, and the getblockchaininfo call, but
not actually populate the softforks field [2]. In this case, we'll fall
back, and we also account for the case when the getblockchaininfo RPC is
removed all together.

[1]: https://github.com/bitcoin/bitcoin/pull/23508
[2]: https://github.com/bitcoin/bitcoin/pull/25114

Fixes #6773
This commit is contained in:
Olaoluwa Osuntokun committed 2022-08-05 17:23:31 -07:00
1 parent 115b041874
commit 492f8b6999
3 files changed
+82

No files matched your search

@@ -11,6 +11,12 @@
binary digest to be different whether that folder exists or
not](https://github.com/lightningnetwork/lnd/pull/6676).
## Taproot
[`lnd` will now refuse to start if it detects the full node backned does not
support Tapoot](https://github.com/lightningnetwork/lnd/pull/6798).
## `lncli`
* [Add `payment_addr` flag to