Rename gas state name

This commit is contained in:
lash 2022-03-11 11:05:56 +00:00
parent fce9bce6fc
commit 0682dd8ed3
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 4 additions and 5 deletions

View File

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

View File

@ -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__':