aboutsummaryrefslogtreecommitdiffstats
path: root/light
diff options
context:
space:
mode:
authorKyuntae Ethan Kim <ethan.kyuntae.kim@gmail.com>2018-03-07 18:05:14 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-03-07 18:05:14 +0800
commit63687f04e441c97cbb39d6b0ebea346b154d2e73 (patch)
treeb834a42f5ef84de9d3de307b980f83537befdf3b /light
parentd43ffdbf6a406839bbf54bdf76f5574345abdd57 (diff)
downloaddexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.tar
dexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.tar.gz
dexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.tar.bz2
dexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.tar.lz
dexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.tar.xz
dexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.tar.zst
dexon-63687f04e441c97cbb39d6b0ebea346b154d2e73.zip
core: check transaction/receipt count match when reconstructing blocks (#16272)
Diffstat (limited to 'light')
-rw-r--r--light/odr_util.go4
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