diff --git a/cmd/soroban-rpc/internal/ingest/service.go b/cmd/soroban-rpc/internal/ingest/service.go index a950c62a..92eb74d1 100644 --- a/cmd/soroban-rpc/internal/ingest/service.go +++ b/cmd/soroban-rpc/internal/ingest/service.go @@ -177,7 +177,8 @@ func (s *Service) maybeFillEntriesFromCheckpoint(ctx context.Context, root, rootErr := archive.GetRootHAS() if rootErr != nil { return 0, checkPointFillErr, rootErr - } else if root.CurrentLedger == 0 { + } + if root.CurrentLedger == 0 { return 0, checkPointFillErr, errEmptyArchives } checkpointLedger = root.CurrentLedger diff --git a/cmd/soroban-rpc/internal/preflight/preflight.go b/cmd/soroban-rpc/internal/preflight/preflight.go index 135eb40c..fe2cc3a5 100644 --- a/cmd/soroban-rpc/internal/preflight/preflight.go +++ b/cmd/soroban-rpc/internal/preflight/preflight.go @@ -46,11 +46,10 @@ const ( // //export SnapshotSourceGet func SnapshotSourceGet(handle C.uintptr_t, cLedgerKey C.xdr_t) C.xdr_t { - value, ok := cgo.Handle(handle).Value().(snapshotSourceHandle) + h, ok := cgo.Handle(handle).Value().(snapshotSourceHandle) if !ok { panic("invalid handle type: expected snapshotSourceHandle") } - h := value ledgerKeyXDR := GoXDR(cLedgerKey) var ledgerKey xdr.LedgerKey if err := xdr.SafeUnmarshal(ledgerKeyXDR, &ledgerKey); err != nil {