From 1dc2c86b0d101a1ca49e4d8f822f14fe68103019 Mon Sep 17 00:00:00 2001 From: fengyuchuanshen Date: Thu, 11 Sep 2025 14:36:48 +0800 Subject: [PATCH] refactor: use maps.Copy for cleaner map handling Signed-off-by: fengyuchuanshen --- internal/source/s3.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/source/s3.go b/internal/source/s3.go index 962ff114..79b3b1a0 100644 --- a/internal/source/s3.go +++ b/internal/source/s3.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "maps" "math/big" "os" "path/filepath" @@ -255,9 +256,7 @@ func (s *S3Source) GetFullBlocks(ctx context.Context, blockNumbers []*big.Int) [ continue } - for blockNum, result := range fileResults { - resultMap[blockNum] = result - } + maps.Copy(resultMap, fileResults) } // Build ordered results