aboutsummaryrefslogtreecommitdiff
path: root/src/operations
diff options
context:
space:
mode:
Diffstat (limited to 'src/operations')
-rw-r--r--src/operations/reserves.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/operations/reserves.ts b/src/operations/reserves.ts
index 7f5c7d05f..463b57b6c 100644
--- a/src/operations/reserves.ts
+++ b/src/operations/reserves.ts
@@ -61,6 +61,19 @@ import { getTimestampNow } from "../util/time";
const logger = new Logger("reserves.ts");
+
+async function resetReserveRetry(
+ ws: InternalWalletState,
+ reservePub: string,
+) {
+ await ws.db.mutate(Stores.reserves, reservePub, x => {
+ if (x.retryInfo.active) {
+ x.retryInfo = initRetryInfo();
+ }
+ return x;
+ });
+}
+
/**
* Create a reserve, but do not flag it as confirmed yet.
*
@@ -504,6 +517,8 @@ async function processReserveImpl(
logger.trace("processReserve retry not due yet");
return;
}
+ } else {
+ await resetReserveRetry(ws, reservePub);
}
logger.trace(
`Processing reserve ${reservePub} with status ${reserve.reserveStatus}`,