Skip to content

Commit

Permalink
Small fixes - 1
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya1702 committed Sep 9, 2024
1 parent 3f8210c commit a96473a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cmd/soroban-rpc/internal/ingest/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions cmd/soroban-rpc/internal/preflight/preflight.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a96473a

Please sign in to comment.