Commit 74357a8d authored by protolambda's avatar protolambda

sanity check channel timeout is not 0 in rollup config check

parent db85069e
...@@ -60,6 +60,9 @@ func (cfg *Config) Check() error { ...@@ -60,6 +60,9 @@ func (cfg *Config) Check() error {
if cfg.BlockTime == 0 { if cfg.BlockTime == 0 {
return fmt.Errorf("block time cannot be 0, got %d", cfg.BlockTime) return fmt.Errorf("block time cannot be 0, got %d", cfg.BlockTime)
} }
if cfg.ChannelTimeout == 0 {
return fmt.Errorf("channel timeout must be set, this should cover at least a L1 block time")
}
if cfg.SeqWindowSize < 2 { if cfg.SeqWindowSize < 2 {
return fmt.Errorf("sequencing window size must at least be 2, got %d", cfg.SeqWindowSize) return fmt.Errorf("sequencing window size must at least be 2, got %d", cfg.SeqWindowSize)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment