diff options
author | Kyuntae Ethan Kim <ethan.kyuntae.kim@gmail.com> | 2018-03-07 18:05:14 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-03-07 18:05:14 +0800 |
commit | 63687f04e441c97cbb39d6b0ebea346b154d2e73 (patch) | |
tree | b834a42f5ef84de9d3de307b980f83537befdf3b /light/odr_util.go | |
parent | d43ffdbf6a406839bbf54bdf76f5574345abdd57 (diff) | |
download | dexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.tar.gz dexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.tar.zst dexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.zip |
core: check transaction/receipt count match when reconstructing blocks (#16272)
Diffstat (limited to 'light/odr_util.go')
-rw-r--r-- | light/odr_util.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/light/odr_util.go b/light/odr_util.go index 97ba440ac..d56330e36 100644 --- a/light/odr_util.go +++ b/light/odr_util.go @@ -144,7 +144,9 @@ func GetBlockReceipts(ctx context.Context, odr OdrBackend, hash common.Hash, num genesis := core.GetCanonicalHash(odr.Database(), 0) config, _ := core.GetChainConfig(odr.Database(), genesis) - core.SetReceiptsData(config, block, receipts) + if err := core.SetReceiptsData(config, block, receipts); err != nil { + return nil, err + } core.WriteBlockReceipts(odr.Database(), hash, number, receipts) } return receipts, nil |