mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 03:10:48 +00:00
cmd/evm/internal/t8ntool: fix iterator error handling in Transaction
This commit is contained in:
parent
e44cf33890
commit
38986cdb35
1 changed files with 4 additions and 3 deletions
|
|
@ -115,9 +115,6 @@ func Transaction(ctx *cli.Context) error {
|
|||
}
|
||||
var results []result
|
||||
for it.Next() {
|
||||
if err := it.Err(); err != nil {
|
||||
return NewError(ErrorIO, err)
|
||||
}
|
||||
var tx types.Transaction
|
||||
err := rlp.DecodeBytes(it.Value(), &tx)
|
||||
if err != nil {
|
||||
|
|
@ -188,6 +185,10 @@ func Transaction(ctx *cli.Context) error {
|
|||
}
|
||||
results = append(results, r)
|
||||
}
|
||||
if err := it.Err(); err != nil {
|
||||
return NewError(ErrorIO, err)
|
||||
}
|
||||
|
||||
out, err := json.MarshalIndent(results, "", " ")
|
||||
fmt.Println(string(out))
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in a new issue