multi: update RPC error import path

These errors are now defined in `btcwallet/chain` instead of
`btcd/rpcclient`.
This commit is contained in:
yyforyongyu committed 2024-07-06 13:59:28 +08:00
1 parent e0a506ab26
commit ddf46f435c
6 files changed
+24 -21

No files matched your search

+4 -1
View File
@@ -10,6 +10,7 @@ import (
"github.com/btcsuite/btcwallet/wallet"
"github.com/lightningnetwork/lnd/lnmock"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
)
@@ -204,10 +205,12 @@ func TestCheckMempoolAcceptance(t *testing.T) {
}}
mockChain.On("TestMempoolAccept", []*wire.MsgTx{tx}, maxFeeRate).Return(
results, nil).Once()
mockChain.On("MapRPCErr", mock.Anything).Return(
chain.ErrInsufficientFee).Once()
// Now call the method under test.
err = wallet.CheckMempoolAcceptance(tx)
rt.ErrorIs(err, rpcclient.ErrInsufficientFee)
rt.ErrorIs(err, chain.ErrInsufficientFee)
// Assert that when the tx is accepted, no error is returned.
//