diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-22 11:15:06 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-22 11:15:57 +0000 |
commit | b0d9d6051f4c3e548cb6d1da9e49279fd3a6b700 (patch) | |
tree | 8d7c423dd287203bacfc75aa64161690a54fabcc /src/debug_utilities/cn_deserialize.cpp | |
parent | Merge pull request #4781 (diff) | |
download | monero-b0d9d6051f4c3e548cb6d1da9e49279fd3a6b700.tar.xz |
cn_deserialize: allow parsing partially valid tx extra
Diffstat (limited to 'src/debug_utilities/cn_deserialize.cpp')
-rw-r--r-- | src/debug_utilities/cn_deserialize.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/debug_utilities/cn_deserialize.cpp b/src/debug_utilities/cn_deserialize.cpp index 3e2552230..83422083b 100644 --- a/src/debug_utilities/cn_deserialize.cpp +++ b/src/debug_utilities/cn_deserialize.cpp @@ -169,6 +169,7 @@ int main(int argc, char* argv[]) return 1; } + bool full; cryptonote::block block; cryptonote::transaction tx; std::vector<cryptonote::tx_extra_field> fields; @@ -200,9 +201,9 @@ int main(int argc, char* argv[]) std::cout << "No fields were found in tx_extra" << std::endl; } } - else if (cryptonote::parse_tx_extra(std::vector<uint8_t>(blob.begin(), blob.end()), fields) && !fields.empty()) + else if (((full = cryptonote::parse_tx_extra(std::vector<uint8_t>(blob.begin(), blob.end()), fields)) || true) && !fields.empty()) { - std::cout << "Parsed tx_extra:" << std::endl; + std::cout << "Parsed" << (full ? "" : " partial") << " tx_extra:" << std::endl; print_extra_fields(fields); } else |