Purge items from memory state on final

This commit is contained in:
lash 2022-05-02 20:05:41 +00:00
parent c3a592c0f6
commit 387014f77b
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
1 changed files with 9 additions and 2 deletions

View File

@ -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):