fix CI errors
This commit is contained in:
parent
877b731340
commit
a2fe12334c
@ -131,7 +131,6 @@ var _ = BeforeSuite(func() {
|
||||
backend, err := eth.NewEthBackend(db, ð.Config{
|
||||
ChainConfig: chainConfig,
|
||||
VMConfig: vm.Config{},
|
||||
RPCGasCap: big.NewInt(10000000000), // Max gas capacity for a rpc call.
|
||||
GroupCacheConfig: &shared.GroupCacheConfig{
|
||||
StateDB: shared.GroupConfig{
|
||||
Name: "eth_debug_test",
|
||||
|
@ -236,9 +236,14 @@ type txTraceResult struct {
|
||||
Error string `json:"error,omitempty"` // Trace failure produced by the tracer
|
||||
}
|
||||
|
||||
var noGenesisErr = errors.New("genesis is not traceable")
|
||||
|
||||
// TraceBlockByNumber returns the structured logs created during the execution of
|
||||
// EVM and returns them as a JSON object.
|
||||
func (api *TracingAPI) TraceBlockByNumber(ctx context.Context, number rpc.BlockNumber, config *TraceConfig) ([]*txTraceResult, error) {
|
||||
if number == 0 {
|
||||
return nil, noGenesisErr
|
||||
}
|
||||
block, err := api.blockByNumber(ctx, number)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -263,6 +268,9 @@ func (api *TracingAPI) TraceBlockByHash(ctx context.Context, hash common.Hash, c
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if block.NumberU64() == 0 {
|
||||
return nil, noGenesisErr
|
||||
}
|
||||
trace, err := api.traceBlock(ctx, block, config)
|
||||
if trace != nil && err == nil {
|
||||
return trace, nil
|
||||
|
Loading…
Reference in New Issue
Block a user