Make coordinator more responsive

- API:
	- Replace `emergencyModeStaringTime` by `emercengyModeStartingBlock`
- Synchronizer:
	- Track emergency mode starting block
- cli/node
	- Add working coordinator config
- coordinator:
	- Retry handler for synchronizer stats in case of error (instead of
	  waiting for the next block to try again)
	- On init, trigger an initial call to the handler for synced block
	  before waiting for the synchronizer, to force the coordinator to start
	  its logic even if there's no new block right after the node has been
	  started (very useful for running in testnet where the frequency of
	  blocks is variable)
	- Merge Msg for synced block and updated vars into one: `MsgSyncBlock`.
This commit is contained in:
Eduard S
2020-12-11 19:35:33 +01:00
parent a165bda17d
commit a7351992cd
12 changed files with 273 additions and 228 deletions

View File

@@ -583,7 +583,7 @@ CREATE TABLE wdelayer_vars (
gov_address BYTEA NOT NULL,
emg_address BYTEA NOT NULL,
withdrawal_delay BIGINT NOT NULL,
emergency_start_time BIGINT NOT NULL,
emergency_start_block BIGINT NOT NULL,
emergency_mode BOOLEAN NOT NULL
);