From 9e37ababa6851a6865d5e1be212f84a9aca1b55c Mon Sep 17 00:00:00 2001 From: twinstar26 Date: Fri, 5 Apr 2019 21:48:28 +0530 Subject: [PATCH 1/2] Fix rlp tool failing to parse long hex string --- rlp/main.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/rlp/main.cpp b/rlp/main.cpp index f98047daaad..96e5887d68b 100644 --- a/rlp/main.cpp +++ b/rlp/main.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -259,10 +260,20 @@ int main(int argc, char** argv) if (inputFile == "--") for (int i = cin.get(); i != -1; i = cin.get()) in.push_back((byte)i); - else if (boost::filesystem::is_regular_file(inputFile)) - in = contents(inputFile); else - in = asBytes(inputFile); + { + try + { + if (boost::filesystem::is_regular_file(inputFile)) + in = contents(inputFile); + } + catch (boost::filesystem::filesystem_error const&) + { + } + + if (in.empty()) + in = asBytes(inputFile); + } bytes b; From 071dbfed8eb04230b175f7d889e808fd583696c7 Mon Sep 17 00:00:00 2001 From: Andrei Maiboroda Date: Tue, 9 Apr 2019 16:18:46 +0200 Subject: [PATCH 2/2] Add changelog item --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a2585a0a8e..fd529630157 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,5 +16,6 @@ - Fixed: [#5523](https://github.com/ethereum/aleth/pull/5523) [#5533](https://github.com/ethereum/aleth/pull/5533) Fix syncing terminating prematurely because of race condition. - Fixed: [#5539](https://github.com/ethereum/aleth/pull/5539) Fix logic for determining if dao hard fork block header should be requested. - Fixed: [#5547](https://github.com/ethereum/aleth/pull/5547) Fix unnecessary slow-down of eth_flush RPC method. +- Fixed: [#5548](https://github.com/ethereum/aleth/pull/5548) Fix rlp tool for long hexadecimal string inputs. -[1.6.0]: https://github.com/ethereum/aleth/compare/v1.6.0-alpha.1...release/1.6 \ No newline at end of file +[1.6.0]: https://github.com/ethereum/aleth/compare/v1.6.0-alpha.1...release/1.6