-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
P2should be fixed if one has timeshould be fixed if one has timebitcoindBitcoin Core backendBitcoin Core backendbtcdchain handlingintermediateIssues suitable for developers moderately familiar with the codebase and LNIssues suitable for developers moderately familiar with the codebase and LN
Description
When using bitcoind as the chain backend, lnd creates three RPC connections,
- using
chain.NewBitcoindConninchainreg. - using
rpcclient.Newinchainreg. - using
rpcclient.Newinchainfee.
This could cause issues as lndmay make concurrent RPC requests to bitcoind which may cause failures. This also breaks the abstraction provided by chain.BitcoindConn as we are now accessing the connection directly. To fix it,
- replace the
rpcclient.Newused in 2 and 3 with thechain.BitcoindConncreated in 1, to make sure we only ever create one RPC connection tobitcoind. - replace other occurrences of
rpcclient.Newwithchain.NewRPCClientforbtcdbackend. - rename
chain.NewRPCClienttochain.NewBtcdClientinbtcwalletfor clarity.
saubyk and mohamedawnallah
Metadata
Metadata
Assignees
Labels
P2should be fixed if one has timeshould be fixed if one has timebitcoindBitcoin Core backendBitcoin Core backendbtcdchain handlingintermediateIssues suitable for developers moderately familiar with the codebase and LNIssues suitable for developers moderately familiar with the codebase and LN