From 2bad9dbca9dab642640555aa449068b0b6f75aa9 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 3 Jun 2025 15:52:53 +0200 Subject: [PATCH] add comment --- eth/downloader/downloader.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 2183cc0a4a..26d0c841aa 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -1039,6 +1039,10 @@ func (d *Downloader) commitSnapSyncData(results []*fetchResult, stateSync *state for i, result := range results { blocks[i] = types.NewBlockWithHeader(result.Header).WithBody(result.body()) receipts[i] = result.Receipts + // Blockchain expects the receipts to be properly encoded + // as they are inserted into the db as they are. + // This workaround makes sure that blocks with no receipts + // have a valid encoding. if len(result.Receipts) == 0 { receipts[i] = rlp.EmptyList }