Skip to content

Commit 7dea55a

Browse files
committed
cmd/workload: fix
1 parent 415d9da commit 7dea55a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cmd/workload/prooftestgen.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,21 @@ func genStorageProof(cli *client, head uint64, number int) ([]uint64, [][]common
198198
if tx.To() == nil {
199199
continue
200200
}
201-
blob, err := cli.Geth.TraceTransaction(context.Background(), tx.Hash(), &tracers.TraceConfig{
201+
ret, err := cli.Geth.TraceTransaction(context.Background(), tx.Hash(), &tracers.TraceConfig{
202202
Tracer: &tracer,
203203
TracerConfig: configBlob,
204204
})
205205
if err != nil {
206206
log.Error("Failed to trace the transaction", "blockNumber", blockNumber, "hash", tx.Hash(), "err", err)
207207
continue
208208
}
209+
blob, err := json.Marshal(ret)
210+
if err != nil {
211+
log.Error("Failed to marshal data", "err", err)
212+
continue
213+
}
209214
var accounts map[common.Address]*native.PrestateAccount
210-
if err := json.Unmarshal(blob.(json.RawMessage), &accounts); err != nil {
215+
if err := json.Unmarshal(blob, &accounts); err != nil {
211216
log.Error("Failed to decode trace result", "blockNumber", blockNumber, "hash", tx.Hash(), "err", err)
212217
continue
213218
}

0 commit comments

Comments
 (0)