chainqueue

Blockchain transaction queue control
Log | Files | Refs | LICENSE

commit 0682dd8ed344c6b69b7fe9f088feb0ecfdd97643
parent fce9bce6fcd9b5f97d3fa3846bdfb78f5c6be0f7
Author: lash <dev@holbrook.no>
Date:   Fri, 11 Mar 2022 11:05:56 +0000

Rename gas state name

Diffstat:
Mchainqueue/state.py | 7+++----
Mtests/test_shep.py | 2+-
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/chainqueue/state.py b/chainqueue/state.py @@ -26,10 +26,10 @@ class Verify: return r - def verify_GAS_ISSUES(self, state_store, from_state): + def verify_INSUFFICIENT_FUNDS(self, state_store, from_state): if from_state & state_store.FINAL: return 'already finalized' - if from_state & state_store.GAS_ISSUES: + if from_state & state_store.INSUFFICIENT_FUNDS: return 'already in network' @@ -44,7 +44,7 @@ class Status(shep.persist.PersistedState): self.add('RESERVED') self.add('IN_NETWORK') self.add('DEFERRED') - self.add('GAS_ISSUES') + self.add('INSUFFICIENT_FUNDS') self.add('LOCAL_ERROR') self.add('NODE_ERROR') self.add('NETWORK_ERROR') @@ -62,4 +62,3 @@ class Status(shep.persist.PersistedState): self.alias('REJECTED', self.NODE_ERROR | self.FINAL) self.alias('REVERTED', self.IN_NETWORK | self.FINAL, self.NETWORK_ERROR) self.alias('SUCCESS', self.IN_NETWORK | self.FINAL) - diff --git a/tests/test_shep.py b/tests/test_shep.py @@ -44,7 +44,7 @@ class TestShep(TestShepBase): self.state.put('foo', 'bar') self.state.set('foo', self.state.FINAL) with self.assertRaises(StateTransitionInvalid): - self.state.move('foo', self.state.GAS_ISSUES) + self.state.move('foo', self.state.INSUFFICIENT_FUNDS) if __name__ == '__main__':