eth: improve very important error message

This commit is contained in:
Felix Lange 2018-01-02 13:22:01 +01:00
parent 7f1acb08b4
commit a3d039a8df

View file

@ -674,7 +674,7 @@ func (api *PrivateDebugAPI) traceTx(ctx context.Context, message core.Message, v
return nil, fmt.Errorf("tracing failed: %v", err) return nil, fmt.Errorf("tracing failed: %v", err)
} }
if err := core.WritePreimages(api.eth.ChainDb(), vmctx.BlockNumber.Uint64(), statedb.Preimages()); err != nil { if err := core.WritePreimages(api.eth.ChainDb(), vmctx.BlockNumber.Uint64(), statedb.Preimages()); err != nil {
return nil, fmt.Errorf("error writing preimage from trace: %v", err) return nil, fmt.Errorf("can't write preimage: %v", err)
} }
// Depending on the tracer type, format and return the output // Depending on the tracer type, format and return the output
switch tracer := tracer.(type) { switch tracer := tracer.(type) {