Browse Source

Fix up extraData reporting.

cl-refactor
Gav Wood 9 years ago
parent
commit
5dcee7a6b3
  1. 2
      libdevcore/Exceptions.h
  2. 2
      libethcore/Ethash.cpp
  3. 1
      libethereum/State.h

2
libdevcore/Exceptions.h

@ -76,4 +76,6 @@ using errinfo_hash256 = boost::error_info<struct tag_hash, h256>;
using errinfo_required_h256 = boost::error_info<struct tag_required_h256, h256>;
using errinfo_got_h256 = boost::error_info<struct tag_get_h256, h256>;
using Hash256RequirementError = boost::tuple<errinfo_required_h256, errinfo_got_h256>;
using errinfo_extraData = boost::error_info<struct tag_extraData, bytes>;
}

2
libethcore/Ethash.cpp

@ -98,7 +98,7 @@ void Ethash::BlockHeaderRaw::populateFromHeader(RLP const& _header, Strictness _
BOOST_THROW_EXCEPTION(InvalidGasLimit() << RequirementError(bigint(c_minGasLimit), bigint(m_gasLimit)) );
if (m_number && m_extraData.size() > c_maximumExtraDataSize)
BOOST_THROW_EXCEPTION(ExtraDataTooBig() << RequirementError(bigint(c_maximumExtraDataSize), bigint(m_extraData.size())));
BOOST_THROW_EXCEPTION(ExtraDataTooBig() << RequirementError(bigint(c_maximumExtraDataSize), bigint(m_extraData.size())) << errinfo_extraData(m_extraData));
}
}

1
libethereum/State.h

@ -52,7 +52,6 @@ using errinfo_uncleNumber = boost::error_info<struct tag_uncleNumber, u256>;
using errinfo_unclesExcluded = boost::error_info<struct tag_unclesExcluded, h256Hash>;
using errinfo_block = boost::error_info<struct tag_block, bytes>;
using errinfo_now = boost::error_info<struct tag_now, unsigned>;
using errinfo_extraData = boost::error_info<struct tag_extraData, bytes>;
using errinfo_transactionIndex = boost::error_info<struct tag_transactionIndex, unsigned>;

Loading…
Cancel
Save