diff --git a/block/manager.go b/block/manager.go index b4b2f455f..c7daaeee4 100644 --- a/block/manager.go +++ b/block/manager.go @@ -210,7 +210,7 @@ func (m *Manager) Start(ctx context.Context) error { // In case there is also no proposer on the hub to our current height, it means that the chain is halted. if m.State.GetProposer() == nil { m.logger.Info("No proposer on the rollapp, fallback to the hub proposer, if available") - SLProposer, err := m.SLClient.GetProposerAtHeight(int64(m.State.Height())) + SLProposer, err := m.SLClient.GetProposerAtHeight(int64(m.State.NextHeight())) if err != nil { return fmt.Errorf("get proposer at height: %w", err) } diff --git a/settlement/dymension/dymension.go b/settlement/dymension/dymension.go index fdfbcc8d7..00d07caed 100644 --- a/settlement/dymension/dymension.go +++ b/settlement/dymension/dymension.go @@ -30,8 +30,8 @@ import ( ) const ( - addressPrefix = "dym" - UNAVAILABLE_PROPOSER = "" + addressPrefix = "dym" + SENTINEL_PROPOSER = "" ) const ( @@ -346,8 +346,8 @@ func (c *Client) GetProposerAtHeight(height int64) (*types.Sequencer, error) { } } - if proposerAddr == "" { - return nil, fmt.Errorf("proposer address is empty") + if proposerAddr == SENTINEL_PROPOSER { + return nil, fmt.Errorf("proposer is sentinel") } // Find and return the matching sequencer @@ -538,7 +538,7 @@ func (c *Client) GetNextProposer() (*types.Sequencer, error) { if !found { return nil, nil } - if nextAddr == UNAVAILABLE_PROPOSER { + if nextAddr == SENTINEL_PROPOSER { return &types.Sequencer{}, nil }