core, eth, les, light: scope receipt functionality a bit cleaner

This commit is contained in:
Péter Szilágyi
2019-04-15 12:36:27 +03:00
parent 6b0ddd141e
commit 7221cb1434
16 changed files with 250 additions and 287 deletions

View File

@ -733,7 +733,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
// Retrieve the requested block's receipts, skipping if unknown to us
var results types.Receipts
if number := rawdb.ReadHeaderNumber(pm.chainDb, hash); number != nil {
results = rawdb.ReadReceipts(pm.chainDb, hash, *number)
results = rawdb.ReadRawReceipts(pm.chainDb, hash, *number)
}
if results == nil {
if header := pm.blockchain.GetHeaderByHash(hash); header == nil || header.ReceiptHash != types.EmptyRootHash {