commit 6c360ca2e5c94bf52355db5b6047e83bd7a95848
parent ff74679de88a9e6691529eb01388128f8f5aefac
Author: lash <dev@holbrook.no>
Date: Fri, 29 Apr 2022 06:28:01 +0000
Add reserved check method
Diffstat:
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/chainqueue/entry.py b/chainqueue/entry.py
@@ -134,6 +134,10 @@ class QueueEntry:
self.store.cache.set_block(self.tx_hash, block, tx)
+ def test(self, state):
+ return self.__match_state(state)
+
+
def __str__(self):
v = self.store.get(self.tx_hash)
n = self.store.state(v[0])
diff --git a/chainqueue/store/base.py b/chainqueue/store/base.py
@@ -153,3 +153,9 @@ class Store:
entry = QueueEntry(self, k)
entry.load()
entry.sent()
+
+
+ def is_reserved(self, k):
+ entry = QueueEntry(self, k)
+ entry.load()
+ return entry.test(self.RESERVED)
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = chainqueue
-version = 0.1.3
+version = 0.1.5
description = Generic blockchain transaction queue control
author = Louis Holbrook
author_email = dev@holbrook.no