From 28802690c1d323dc21922de884cab7e4b34681b4 Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 3 Apr 2025 09:09:48 -0600 Subject: [PATCH] internal/era: rename GetReceipts to GetReceiptsByNumber --- internal/era/era.go | 4 ++-- internal/era/era_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/era/era.go b/internal/era/era.go index 9a89022145..5129186fe7 100644 --- a/internal/era/era.go +++ b/internal/era/era.go @@ -177,8 +177,8 @@ func (e *Era) GetBlockByNumber(num uint64) (*types.Block, error) { return types.NewBlockWithHeader(&header).WithBody(body), nil } -// GetReceipts returns the receipts for the given block number. -func (e *Era) GetReceipts(num uint64) (types.Receipts, error) { +// GetReceiptsByNumber returns the receipts for the given block number. +func (e *Era) GetReceiptsByNumber(num uint64) (types.Receipts, error) { if e.m.start > num || e.m.start+e.m.count <= num { return nil, errors.New("out-of-bounds") } diff --git a/internal/era/era_test.go b/internal/era/era_test.go index 402188d290..46fc2e91f3 100644 --- a/internal/era/era_test.go +++ b/internal/era/era_test.go @@ -130,7 +130,7 @@ func TestEra1Builder(t *testing.T) { if !bytes.Equal(rawReceipts, chain.receipts[i]) { t.Fatalf("mismatched receipts: want %s, got %s", chain.receipts[i], rawReceipts) } - receipts, err := e.GetReceipts(i) + receipts, err := e.GetReceiptsByNumber(i) if err != nil { t.Fatalf("error reading receipts: %v", err) }