mod+lntest: disable stall handler in btcd mining node

The latest version of btcd allows its stall handler to be disabled. We
use that new config option to make sure the mining btcd node and the lnd
chain backend btcd node aren't disconnected if some test takes too long
and no new p2p messages are exchanged.
This commit is contained in:
Oliver Gugger committed 2021-10-05 20:48:47 +02:00
1 parent af9b620854
commit 98061dfd58
4 files changed
+7 -3

No files matched your search

+2
View File
@@ -90,6 +90,8 @@ func NewBackend(miner string, netParams *chaincfg.Params) (
// its requested data are not found. We add a nobanning flag to
// make sure they stay connected if it happens.
"--nobanning",
// Don't disconnect if a reply takes too long.
"--nostalldetect",
}
chainBackend, err := rpctest.New(netParams, nil, args, GetBtcdBinary())
if err != nil {
+2
View File
@@ -554,6 +554,8 @@ func NewMiner(baseLogDir, logFilename string, netParams *chaincfg.Params,
"--debuglevel=debug",
"--logdir=" + baseLogDir,
"--trickleinterval=100ms",
// Don't disconnect if a reply takes too long.
"--nostalldetect",
}
miner, err := rpctest.New(netParams, handler, args, btcdBinary)