GetRequiredBlockState call ProcessBlock

This commit is contained in:
jstr1121 2023-10-11 23:50:32 +08:00
parent cde04f1bc7
commit 4dcc02fcc2

View file

@ -967,6 +967,11 @@ func (s *BlockChainAPI) GetRequiredBlockState(ctx context.Context, blockNrOrHash
// When the block doesn't exist, the RPC method should return JSON null
return nil, nil
}
state, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash)
if err != nil {
return nil, nil
}
s.ProcessBlock(ctx, block, state, vm.Config{})
return s.traceBlock(ctx, block)
}