Rename gas state name
This commit is contained in:
parent
fce9bce6fc
commit
0682dd8ed3
@ -26,10 +26,10 @@ class Verify:
|
|||||||
return r
|
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:
|
if from_state & state_store.FINAL:
|
||||||
return 'already finalized'
|
return 'already finalized'
|
||||||
if from_state & state_store.GAS_ISSUES:
|
if from_state & state_store.INSUFFICIENT_FUNDS:
|
||||||
return 'already in network'
|
return 'already in network'
|
||||||
|
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ class Status(shep.persist.PersistedState):
|
|||||||
self.add('RESERVED')
|
self.add('RESERVED')
|
||||||
self.add('IN_NETWORK')
|
self.add('IN_NETWORK')
|
||||||
self.add('DEFERRED')
|
self.add('DEFERRED')
|
||||||
self.add('GAS_ISSUES')
|
self.add('INSUFFICIENT_FUNDS')
|
||||||
self.add('LOCAL_ERROR')
|
self.add('LOCAL_ERROR')
|
||||||
self.add('NODE_ERROR')
|
self.add('NODE_ERROR')
|
||||||
self.add('NETWORK_ERROR')
|
self.add('NETWORK_ERROR')
|
||||||
@ -62,4 +62,3 @@ class Status(shep.persist.PersistedState):
|
|||||||
self.alias('REJECTED', self.NODE_ERROR | self.FINAL)
|
self.alias('REJECTED', self.NODE_ERROR | self.FINAL)
|
||||||
self.alias('REVERTED', self.IN_NETWORK | self.FINAL, self.NETWORK_ERROR)
|
self.alias('REVERTED', self.IN_NETWORK | self.FINAL, self.NETWORK_ERROR)
|
||||||
self.alias('SUCCESS', self.IN_NETWORK | self.FINAL)
|
self.alias('SUCCESS', self.IN_NETWORK | self.FINAL)
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class TestShep(TestShepBase):
|
|||||||
self.state.put('foo', 'bar')
|
self.state.put('foo', 'bar')
|
||||||
self.state.set('foo', self.state.FINAL)
|
self.state.set('foo', self.state.FINAL)
|
||||||
with self.assertRaises(StateTransitionInvalid):
|
with self.assertRaises(StateTransitionInvalid):
|
||||||
self.state.move('foo', self.state.GAS_ISSUES)
|
self.state.move('foo', self.state.INSUFFICIENT_FUNDS)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user