mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
itest: disable node retrying to connect to miner
Previously the chainbackend connected to the miner using a permanent connection, which would retry the connection when it’s disconnected. It would leave multiple connections between the chainbackend and the miner, causing difficulties in debugging. Currently, there are two occasions when disconnection happens. One happens when running the open channel reorg test, the miner is connected/disconnected multiple times on purpose. The other happens when the chainbackend receives a MSG_WITNESS_TX type from the miner, which would be considered as an invalid type and disconnects the miner. With the latter one being fixed in btcd, the chainbackend will still be disconnected from the miner if it reaches the ban score by requesting too many notfound messages in a short time which is why the `--nobanning` flag is added.
This commit is contained in:
@@ -174,14 +174,6 @@ func NewBackend(miner string, netParams *chaincfg.Params) (
|
||||
err)
|
||||
}
|
||||
|
||||
// We start by adding the miner to the bitcoind addnode list. We do
|
||||
// this instead of connecting using command line flags, because it will
|
||||
// allow us to disconnect the miner using the AddNode command later.
|
||||
if err := client.AddNode(miner, rpcclient.ANAdd); err != nil {
|
||||
cleanUp()
|
||||
return nil, nil, fmt.Errorf("unable to add node: %v", err)
|
||||
}
|
||||
|
||||
bd := BitcoindBackendConfig{
|
||||
rpcHost: rpcHost,
|
||||
rpcUser: rpcUser,
|
||||
|
Reference in New Issue
Block a user