mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-02 03:22:25 +02:00
lnwallet/test: fix testPublishTransaction
for neutrino
This commit is contained in:
@ -1915,7 +1915,17 @@ func testPublishTransaction(r *rpctest.Harness,
|
|||||||
// TODO(roasbeef): we can't use Unwrap() here as TxRuleError
|
// TODO(roasbeef): we can't use Unwrap() here as TxRuleError
|
||||||
// doesn't define it
|
// doesn't define it
|
||||||
err := alice.PublishTransaction(testTx, labels.External)
|
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)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user