From 57fb6315cdb3ff2aecb935f00c123b9adb62971e Mon Sep 17 00:00:00 2001 From: Linus Kendall Date: Wed, 5 Jun 2024 00:35:22 +0000 Subject: [PATCH] Go fmt --- internal/cmd/tracker/tracker.go | 2 +- internal/integrationtest/tracker_test.go | 16 ++++++++-------- internal/tracker/tracker.go | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/cmd/tracker/tracker.go b/internal/cmd/tracker/tracker.go index 31a2753..c24d694 100644 --- a/internal/cmd/tracker/tracker.go +++ b/internal/cmd/tracker/tracker.go @@ -53,7 +53,7 @@ var ( configPath string internalListen string listen string - rpc string + rpc string maxSnapshotAge uint64 ) diff --git a/internal/integrationtest/tracker_test.go b/internal/integrationtest/tracker_test.go index 1ba698e..31554d4 100644 --- a/internal/integrationtest/tracker_test.go +++ b/internal/integrationtest/tracker_test.go @@ -105,9 +105,9 @@ func TestTracker(t *testing.T) { []types.SnapshotSource{ { SnapshotInfo: types.SnapshotInfo{ - Slot: 103, + Slot: 103, BaseSlot: 103, - Hash: solana.MustHashFromBase58("7w4zb1jh47zY5FPMPyRzDSmYf1CPirVP9LmTr5xWEs6X"), + Hash: solana.MustHashFromBase58("7w4zb1jh47zY5FPMPyRzDSmYf1CPirVP9LmTr5xWEs6X"), Files: []*types.SnapshotFile{ { FileName: "snapshot-103-7w4zb1jh47zY5FPMPyRzDSmYf1CPirVP9LmTr5xWEs6X.tar.bz2", @@ -122,9 +122,9 @@ func TestTracker(t *testing.T) { }, { SnapshotInfo: types.SnapshotInfo{ - Slot: 102, + Slot: 102, BaseSlot: 102, - Hash: solana.MustHashFromBase58("7sAawX1cAHVpfZGNtUAYKX2KPzdd1uPUZUTaLteWX4SB"), + Hash: solana.MustHashFromBase58("7sAawX1cAHVpfZGNtUAYKX2KPzdd1uPUZUTaLteWX4SB"), Files: []*types.SnapshotFile{ { FileName: "snapshot-102-7sAawX1cAHVpfZGNtUAYKX2KPzdd1uPUZUTaLteWX4SB.tar.bz2", @@ -139,9 +139,9 @@ func TestTracker(t *testing.T) { }, { SnapshotInfo: types.SnapshotInfo{ - Slot: 101, + Slot: 101, BaseSlot: 101, - Hash: solana.MustHashFromBase58("7oGBJ2HXGT17Fs9QNxu6RbH68z4rJxHZyc9gqhLWoFmq"), + Hash: solana.MustHashFromBase58("7oGBJ2HXGT17Fs9QNxu6RbH68z4rJxHZyc9gqhLWoFmq"), Files: []*types.SnapshotFile{ { FileName: "snapshot-101-7oGBJ2HXGT17Fs9QNxu6RbH68z4rJxHZyc9gqhLWoFmq.tar.bz2", @@ -156,9 +156,9 @@ func TestTracker(t *testing.T) { }, { SnapshotInfo: types.SnapshotInfo{ - Slot: 100, + Slot: 100, BaseSlot: 100, - Hash: solana.MustHashFromBase58("7jMmeXZSNcWPrB2RsTdeXfXrsyW5c1BfPjqoLW2X5T7V"), + Hash: solana.MustHashFromBase58("7jMmeXZSNcWPrB2RsTdeXfXrsyW5c1BfPjqoLW2X5T7V"), Files: []*types.SnapshotFile{ { FileName: "snapshot-100-7jMmeXZSNcWPrB2RsTdeXfXrsyW5c1BfPjqoLW2X5T7V.tar.bz2", diff --git a/internal/tracker/tracker.go b/internal/tracker/tracker.go index e66f2e4..8c115d8 100644 --- a/internal/tracker/tracker.go +++ b/internal/tracker/tracker.go @@ -66,7 +66,7 @@ func (h *Handler) GetSnapshots(c *gin.Context) { } var entries []*index.SnapshotEntry - if query.Slot == 0 { + if query.Slot == 0 { entries = h.DB.GetAllSnapshots() } else { entries = h.DB.GetSnapshotsAtSlot(query.Slot)