mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
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:
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
// Duration is a wrapper type that parses time duration from text.
|
||||
type Duration struct {
|
||||
time.Duration
|
||||
time.Duration `validate:"required"`
|
||||
}
|
||||
|
||||
// UnmarshalText unmarshalls time duration from text.
|
||||
@@ -46,7 +46,10 @@ type Coordinator struct {
|
||||
// ProofServerPollInterval is the waiting interval between polling the
|
||||
// ProofServer while waiting for a particular status
|
||||
ProofServerPollInterval Duration `validate:"required"`
|
||||
L2DB struct {
|
||||
// SyncRetryInterval is the waiting interval between calls to the main
|
||||
// handler of a synced block after an error
|
||||
SyncRetryInterval Duration `validate:"required"`
|
||||
L2DB struct {
|
||||
SafetyPeriod common.BatchNum `validate:"required"`
|
||||
MaxTxs uint32 `validate:"required"`
|
||||
TTL Duration `validate:"required"`
|
||||
|
||||
Reference in New Issue
Block a user