Improve log output for unlocking tool
This commit is contained in:
parent
412018fc64
commit
637ead1a38
@ -1,3 +1,5 @@
|
|||||||
|
* 0.4.8
|
||||||
|
- Add unlock action description to info loglevel for unlock tool
|
||||||
* 0.4.7
|
* 0.4.7
|
||||||
- Upgrade shep to avoid sync in persist set
|
- Upgrade shep to avoid sync in persist set
|
||||||
* 0.4.6
|
* 0.4.6
|
||||||
|
@ -329,7 +329,8 @@ class SyncStore:
|
|||||||
if locked_item_key == None:
|
if locked_item_key == None:
|
||||||
return False
|
return False
|
||||||
locked_item = self.get(locked_item_key)
|
locked_item = self.get(locked_item_key)
|
||||||
locked_state = self.filter_state.state(locked_item_key) - self.filter_state.state_store.LOCK
|
state = self.filter_state.state(locked_item_key)
|
||||||
|
locked_state = state - self.filter_state.state_store.LOCK
|
||||||
locked_state_name = self.filter_state.name(locked_state)
|
locked_state_name = self.filter_state.name(locked_state)
|
||||||
|
|
||||||
logg.debug('found locked item {} in state {}'.format(locked_item, locked_state))
|
logg.debug('found locked item {} in state {}'.format(locked_item, locked_state))
|
||||||
@ -339,10 +340,17 @@ class SyncStore:
|
|||||||
if i == -1:
|
if i == -1:
|
||||||
raise FilterInitializationError('locked state {} ({}) found for item {}, but matching filter has not been registered'.format(locked_state_name, locked_state, locked_item))
|
raise FilterInitializationError('locked state {} ({}) found for item {}, but matching filter has not been registered'.format(locked_state_name, locked_state, locked_item))
|
||||||
|
|
||||||
|
direction = None
|
||||||
if revert:
|
if revert:
|
||||||
self.__unlock_previous(locked_item, fltrs, i)
|
self.__unlock_previous(locked_item, fltrs, i)
|
||||||
|
new_state = self.filter_state.state(locked_item_key)
|
||||||
|
direction = 'previous'
|
||||||
else:
|
else:
|
||||||
self.__unlock_next(locked_item, fltrs, i)
|
self.__unlock_next(locked_item, fltrs, i)
|
||||||
|
new_state = self.filter_state.state(locked_item_key)
|
||||||
|
direction = 'next'
|
||||||
|
|
||||||
|
logg.info('chainstate unlock to {} {} ({}) -> {} ({})'.format(direction, self.filter_state.name(state), state, self.filter_state.name(new_state), new_state))
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = chainsyncer
|
name = chainsyncer
|
||||||
version = 0.4.7
|
version = 0.4.8
|
||||||
description = Generic blockchain syncer driver
|
description = Generic blockchain syncer driver
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
Loading…
Reference in New Issue
Block a user