Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5893 from ethereum/nullrlp
Browse files Browse the repository at this point in the history
testeth treat nullrlp as invalid
  • Loading branch information
gumb0 authored Mar 2, 2020
2 parents a3b9320 + f730a09 commit 2cc5937
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [1.9.0] - Unreleased

- Added: [#5868](https://github.com/ethereum/aleth/pull/5868) `test_importRawBlock` RPC method reports the detailed reason when import fails.
- Changed: [#5893](https://github.com/ethereum/aleth/pull/5893) testeth: RlpTests treat empty `out` field as invalid.
- Removed: [#5885](https://github.com/ethereum/aleth/pull/5885) Discontinue `testeth --filltests` support for BlockchainTests, TransitionTests, BCGeneralStateTests.

## [1.8.0] - 2019-12-16
Expand Down
4 changes: 4 additions & 0 deletions test/tools/jsontests/RLPTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ void doRlpTests(json_spirit::mValue const& _input)
bytes payloadToDecode = fromHex(o.at("out").get_str());
RLP payload(payloadToDecode);

// treat null rlp as invalid
if (payload.isNull())
BOOST_THROW_EXCEPTION(Exception() << errinfo_comment("RLPTests: field `out` is set to Null"));

// attempt to read all the contents of RLP
ostringstream() << payload;

Expand Down

0 comments on commit 2cc5937

Please sign in to comment.