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 committed 2025-02-26 19:51:52 +08:00
1 parent 175301628f
commit 1618d2c789
2 files changed
+61 -1

No files matched your search

+9
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")