From a6148887972ef5945311479016c2087369cbade0 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Fri, 26 Jan 2024 02:54:36 +0800 Subject: [PATCH] lnwallet/test: fix `testPublishTransaction` for neutrino --- lnwallet/test/test_interface.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lnwallet/test/test_interface.go b/lnwallet/test/test_interface.go index 0770e8822..aa3a6625e 100644 --- a/lnwallet/test/test_interface.go +++ b/lnwallet/test/test_interface.go @@ -1915,7 +1915,17 @@ func testPublishTransaction(r *rpctest.Harness, // TODO(roasbeef): we can't use Unwrap() here as TxRuleError // doesn't define it err := alice.PublishTransaction(testTx, labels.External) - require.Contains(t, err.Error(), "bad-txns-oversize") + + errStr := "bad-txns-oversize" + + // For neutrino backend, the error string in not mapped. + // + // TODO(yy): unify error matching in neutrino too. + if alice.BackEnd() == "neutrino" { + errStr = "serialized transaction is too big" + } + + require.Contains(t, err.Error(), errStr) }) }