paymentsdb: implement DeleteFailedAttempts for sql backend
This commit is contained in:
4 files changed
+126
No files matched your search
@@ -291,6 +291,8 @@ func (p *KVStore) InitPayment(paymentHash lntypes.Hash,
|
||||
// DeleteFailedAttempts deletes all failed htlcs for a payment if configured
|
||||
// by the KVStore db.
|
||||
func (p *KVStore) DeleteFailedAttempts(hash lntypes.Hash) error {
|
||||
// TODO(ziggie): Refactor to not mix application logic with database
|
||||
// logic. This decision should be made in the application layer.
|
||||
if !p.keepFailedPaymentAttempts {
|
||||
const failedHtlcsOnly = true
|
||||
err := p.DeletePayment(hash, failedHtlcsOnly)
|
||||
|
||||
Reference in new issue
Block a user