Skip to content

Commit 1b958ac

Browse files
author
Vladimir Sokolovskiy
committed
Merge remote-tracking branch 'upstream/master'
2 parents 372556c + 28e65f7 commit 1b958ac

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

services/horizon/internal/ingest/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,10 +708,15 @@ func (s *system) runStateMachine(cur stateMachineNode) error {
708708
// so we log these errors using the info log level
709709
logger.Info("Error in ingestion state machine")
710710
} else {
711+
// next.node should never be nil, but we check defensively.
712+
var nextStateName string
713+
if next.node != nil {
714+
nextStateName = next.node.GetState().Name()
715+
}
711716
s.Metrics().IngestionErrorCounter.
712717
With(prometheus.Labels{
713718
"current_state": cur.GetState().Name(),
714-
"next_state": next.node.GetState().Name(),
719+
"next_state": nextStateName,
715720
}).Inc()
716721
logger.Error("Error in ingestion state machine")
717722
}

support/datastore/metadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func NewMetaDataFromMap(data map[string]string) (MetaData, error) {
6363
}
6464

6565
if val, ok := data["protocol-version"]; ok {
66-
protocolVersion, err := strconv.ParseInt(val, 10, 32)
66+
protocolVersion, err := strconv.ParseUint(val, 10, 32)
6767
if err != nil {
6868
return metaData, err
6969
}

0 commit comments

Comments
 (0)