File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed
Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,9 @@ func Transaction(ctx *cli.Context) error {
121121 }
122122 var results []result
123123 for it .Next () {
124+ if err := it .Err (); err != nil {
125+ return NewError (ErrorIO , err )
126+ }
124127 var tx types.Transaction
125128 err := rlp .DecodeBytes (it .Value (), & tx )
126129 if err != nil {
Original file line number Diff line number Diff line change 99 "testing"
1010
1111 "github.com/docker/docker/pkg/reexec"
12+ "github.com/ethereum/go-ethereum/cmd/evm/internal/t8ntool"
1213 "github.com/ethereum/go-ethereum/internal/cmdtest"
1314)
1415
@@ -265,6 +266,14 @@ func TestT9n(t *testing.T) {
265266 },
266267 expOut : "exp.json" ,
267268 },
269+ { // Invalid RLP
270+ base : "./testdata/18" ,
271+ input : t9nInput {
272+ inTxs : "invalid.rlp" ,
273+ stFork : "London" ,
274+ },
275+ expExitCode : t8ntool .ErrorIO ,
276+ },
268277 } {
269278
270279 args := []string {"t9n" }
Original file line number Diff line number Diff line change 1+ # Invalid rlp
2+
3+ This folder contains a sample of invalid RLP, and it's expected
4+ that the t9n handles this properly:
5+
6+ ```
7+ $ go run . t9n --input.txs=./testdata/18/invalid.rlp --state.fork=London
8+ ERROR(11): rlp: value size exceeds available input length
9+ ```
Original file line number Diff line number Diff line change 1+ "0xf852328001825208870b9331677e6ebf0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa03887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
You can’t perform that action at this time.
0 commit comments