mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
add comment
This commit is contained in:
parent
d9f529d075
commit
2bad9dbca9
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue