commit 387014f77ba38f47de0fa4562aa07393b7f18310
parent c3a592c0f616b4545da0365efe43d5c87f0e96c8
Author: lash <dev@holbrook.no>
Date: Mon, 2 May 2022 20:05:41 +0000
Purge items from memory state on final
Diffstat:
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/chaind/adapters/fs.py b/chaind/adapters/fs.py
@@ -91,11 +91,18 @@ class ChaindFsAdapter(ChaindAdapter):
if self.store.is_reserved(tx.hash):
raise QueueLockError(tx.hash)
- return self.store.final(tx.hash, block, tx, error=False)
+ r = self.store.final(tx.hash, block, tx, error=False)
+ self.store.purge(tx.hash)
+ return r
def fail(self, block, tx):
- return self.store.final(tx.hash, block, tx, error=True)
+ if self.store.is_reserved(tx.hash):
+ raise QueueLockError(tx.hash)
+
+ r = self.store.final(tx.hash, block, tx, error=True)
+ self.store.purge(tx.hash)
+ return r
def sendfail(self):