mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-09 21:56:47 +01:00
mulit: use min relay fee error
This commit is contained in:
@@ -1807,8 +1807,11 @@ func broadcastErrorMapper(err error) error {
|
||||
// in the first place are rebroadcasted despite of their backend error.
|
||||
// Mempool conditions change over time so it makes sense to retry
|
||||
// publishing the transaction. Moreover we log the detailed error so the
|
||||
// user can intervene and increase the size of his mempool.
|
||||
case errors.Is(err, chain.ErrMempoolMinFeeNotMet):
|
||||
// user can intervene and increase the size of his mempool or increase
|
||||
// his min relay fee configuration.
|
||||
case errors.Is(err, chain.ErrMempoolMinFeeNotMet),
|
||||
errors.Is(err, chain.ErrMinRelayFeeNotMet):
|
||||
|
||||
ltndLog.Warnf("Error while broadcasting transaction: %v", err)
|
||||
|
||||
returnErr = &pushtx.BroadcastError{
|
||||
|
||||
@@ -1133,7 +1133,9 @@ func mapRpcclientError(err error) error {
|
||||
// If the wallet reports that fee requirements for accepting the tx
|
||||
// into mempool are not met, convert it to our internal ErrMempoolFee
|
||||
// and return.
|
||||
case errors.Is(err, chain.ErrMempoolMinFeeNotMet):
|
||||
case errors.Is(err, chain.ErrMempoolMinFeeNotMet),
|
||||
errors.Is(err, chain.ErrMinRelayFeeNotMet):
|
||||
|
||||
return fmt.Errorf("%w: %v", lnwallet.ErrMempoolFee, err.Error())
|
||||
}
|
||||
|
||||
|
||||
@@ -565,7 +565,10 @@ func (t *TxPublisher) createRBFCompliantTx(
|
||||
|
||||
// If the error indicates the fees paid is not enough, we will
|
||||
// ask the fee function to increase the fee rate and retry.
|
||||
case errors.Is(err, lnwallet.ErrMempoolFee):
|
||||
case errors.Is(err, lnwallet.ErrMempoolFee),
|
||||
errors.Is(err, chain.ErrMinRelayFeeNotMet),
|
||||
errors.Is(err, chain.ErrMempoolMinFeeNotMet):
|
||||
|
||||
// We should at least start with a feerate above the
|
||||
// mempool min feerate, so if we get this error, it
|
||||
// means something is wrong earlier in the pipeline.
|
||||
@@ -574,7 +577,8 @@ func (t *TxPublisher) createRBFCompliantTx(
|
||||
|
||||
fallthrough
|
||||
|
||||
// We are not paying enough fees so we increase it.
|
||||
// We are not paying enough fees to RBF a previous tx, so we
|
||||
// increase it.
|
||||
case errors.Is(err, chain.ErrInsufficientFee):
|
||||
increased := false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user