Skip to content

Commit

Permalink
update slot only if RPC returns nil error
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed Dec 17, 2024
1 parent 02b1732 commit 912a243
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zetaclient/chains/solana/observer/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ func (ob *Observer) ObserveInbound(ctx context.Context) error {
}

// update metrics if no new signatures found
if len(signatures) == 0 && errSlot == nil {
ob.WithLastBlockScanned(lastSlot)
if len(signatures) == 0 {
if errSlot == nil {
ob.WithLastBlockScanned(lastSlot)
}
} else {

Check warning on line 103 in zetaclient/chains/solana/observer/inbound.go

View check run for this annotation

Codecov / codecov/patch

zetaclient/chains/solana/observer/inbound.go#L99-L103

Added lines #L99 - L103 were not covered by tests
ob.Logger().Inbound.Info().Msgf("ObserveInbound: got %d signatures for chain %d", len(signatures), chainID)
}
Expand Down

0 comments on commit 912a243

Please sign in to comment.