Skip to content

Commit

Permalink
lnwallet/test: fix testPublishTransaction for neutrino
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Jan 25, 2024
1 parent f930cf2 commit 051328b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lnwallet/test/test_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}

Expand Down

0 comments on commit 051328b

Please sign in to comment.