good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit c7d07294 authored by Diederik Loerakker's avatar Diederik Loerakker Committed by GitHub
Browse files

catalyst: check if block exists in assemble-block call with unknown parent-hash (#22770)

parent 871f50b9
Branches
Tags
No related merge requests found
...@@ -109,6 +109,11 @@ func (api *consensusAPI) AssembleBlock(params assembleBlockParams) (*executableD ...@@ -109,6 +109,11 @@ func (api *consensusAPI) AssembleBlock(params assembleBlockParams) (*executableD
bc := api.eth.BlockChain() bc := api.eth.BlockChain()
parent := bc.GetBlockByHash(params.ParentHash) parent := bc.GetBlockByHash(params.ParentHash)
if parent == nil {
log.Warn("Cannot assemble block with parent hash to unknown block", "parentHash", params.ParentHash)
return nil, fmt.Errorf("cannot assemble block with unknown parent %s", params.ParentHash)
}
pool := api.eth.TxPool() pool := api.eth.TxPool()
if parent.Time() >= params.Timestamp { if parent.Time() >= params.Timestamp {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment