mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
fix for nil (#1950)
This commit is contained in:
parent
af6a6abd50
commit
1770beaf9b
@ -30,6 +30,9 @@ func getReceipts(ctx context.Context, tx ethdb.Tx, chainConfig *params.ChainConf
|
||||
}
|
||||
|
||||
block := rawdb.ReadBlock(tx, hash, number)
|
||||
if block == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
bc := adapter.NewBlockGetter(tx)
|
||||
getHeader := func(hash common.Hash, number uint64) *types.Header {
|
||||
@ -46,8 +49,7 @@ func getReceipts(ctx context.Context, tx ethdb.Tx, chainConfig *params.ChainConf
|
||||
for i, txn := range block.Transactions() {
|
||||
ibs.Prepare(txn.Hash(), block.Hash(), i)
|
||||
|
||||
header := rawdb.ReadHeader(tx, hash, number)
|
||||
receipt, err := core.ApplyTransaction(chainConfig, getHeader, ethash.NewFaker(), nil, gp, ibs, state.NewNoopWriter(), header, txn, usedGas, vm.Config{})
|
||||
receipt, err := core.ApplyTransaction(chainConfig, getHeader, ethash.NewFaker(), nil, gp, ibs, state.NewNoopWriter(), block.Header(), txn, usedGas, vm.Config{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user