mulit: use min relay fee error
This commit is contained in:
3 files changed
+14
-5
No files matched your search
+5
-2
@@ -1807,8 +1807,11 @@ func broadcastErrorMapper(err error) error {
|
|||||||
// in the first place are rebroadcasted despite of their backend error.
|
// in the first place are rebroadcasted despite of their backend error.
|
||||||
// Mempool conditions change over time so it makes sense to retry
|
// Mempool conditions change over time so it makes sense to retry
|
||||||
// publishing the transaction. Moreover we log the detailed error so the
|
// publishing the transaction. Moreover we log the detailed error so the
|
||||||
// user can intervene and increase the size of his mempool.
|
// user can intervene and increase the size of his mempool or increase
|
||||||
case errors.Is(err, chain.ErrMempoolMinFeeNotMet):
|
// his min relay fee configuration.
|
||||||
|
case errors.Is(err, chain.ErrMempoolMinFeeNotMet),
|
||||||
|
errors.Is(err, chain.ErrMinRelayFeeNotMet):
|
||||||
|
|
||||||
ltndLog.Warnf("Error while broadcasting transaction: %v", err)
|
ltndLog.Warnf("Error while broadcasting transaction: %v", err)
|
||||||
|
|
||||||
returnErr = &pushtx.BroadcastError{
|
returnErr = &pushtx.BroadcastError{
|
||||||
|
|||||||
@@ -1133,7 +1133,9 @@ func mapRpcclientError(err error) error {
|
|||||||
// If the wallet reports that fee requirements for accepting the tx
|
// If the wallet reports that fee requirements for accepting the tx
|
||||||
// into mempool are not met, convert it to our internal ErrMempoolFee
|
// into mempool are not met, convert it to our internal ErrMempoolFee
|
||||||
// and return.
|
// 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())
|
return fmt.Errorf("%w: %v", lnwallet.ErrMempoolFee, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -565,7 +565,10 @@ func (t *TxPublisher) createRBFCompliantTx(
|
|||||||
|
|
||||||
// If the error indicates the fees paid is not enough, we will
|
// If the error indicates the fees paid is not enough, we will
|
||||||
// ask the fee function to increase the fee rate and retry.
|
// 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
|
// We should at least start with a feerate above the
|
||||||
// mempool min feerate, so if we get this error, it
|
// mempool min feerate, so if we get this error, it
|
||||||
// means something is wrong earlier in the pipeline.
|
// means something is wrong earlier in the pipeline.
|
||||||
@@ -574,7 +577,8 @@ func (t *TxPublisher) createRBFCompliantTx(
|
|||||||
|
|
||||||
fallthrough
|
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):
|
case errors.Is(err, chain.ErrInsufficientFee):
|
||||||
increased := false
|
increased := false
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user