chainntnfs+lntest: fix sync to miner block flake

In this commit we document an unexpected behavior found when connecting
a bitcoind node to a btcd node. We mitigate this in our test by
reconnecting the nodes when the connection is broken. We also limit the
connection made from `bitcoind` to be v1 only.
This commit is contained in:
yyforyongyu
2025-02-25 16:48:25 +08:00
parent 175301628f
commit 1618d2c789
2 changed files with 61 additions and 1 deletions

View File

@@ -112,6 +112,15 @@ func NewBitcoindBackend(t *testing.T, netParams *chaincfg.Params,
"-disablewallet",
"-zmqpubrawblock=" + zmqBlockHost,
"-zmqpubrawtx=" + zmqTxHost,
// whitelist localhost to speed up relay.
"-whitelist=127.0.0.1",
// Disable v2 transport as btcd doesn't support it yet.
//
// TODO(yy): Remove this line once v2 conn is supported in
// `btcd`.
"-v2transport=0",
}
if txindex {
args = append(args, "-txindex")