diff --git a/zetaclient/chains/bitcoin/observer/observer.go b/zetaclient/chains/bitcoin/observer/observer.go index 81c03b3522..6a21cc6ae6 100644 --- a/zetaclient/chains/bitcoin/observer/observer.go +++ b/zetaclient/chains/bitcoin/observer/observer.go @@ -656,7 +656,7 @@ func (ob *Observer) postBlockHeader(ctx context.Context, tip int64) error { ob.logger.Inbound.Info().Msgf("postBlockHeader: tip %d", tip) bn := tip chainState, err := ob.ZetacoreClient().GetBlockHeaderChainState(ctx, ob.Chain().ChainId) - if err == nil && chainState.EarliestHeight > 0 { + if err == nil && chainState != nil && chainState.EarliestHeight > 0 { bn = chainState.LatestHeight + 1 } if bn > tip {