mirror of
https://github.com/Xahau/xahaud.git
synced 2026-06-05 09:46:38 +00:00
Simplify & modernize code:
- Simplify and consolidate code for parsing hex input. - Replace beast::endian::order with boost::endian::order. - Simplify CountedObject code. - Remove pre-C++17 workarounds in favor of C++17 based solutions. - Improve `base_uint` and simplify its hex-parsing interface by consolidating the `SexHex` and `SetHexExact` methods into one API: `parseHex` which forces callers to verify the result of the operation; as a result some public-facing API endpoints may now return errors when passed values that were previously accepted. - Remove the simple fallback implementations of SHA2 and RIPEMD introduced to reduce our dependency on OpenSSL. The code is slow and rarely, if ever, exercised and we rely on OpenSSL functionality for Boost.ASIO as well.
This commit is contained in:
@@ -36,16 +36,6 @@ STBase::STBase(SField const& n) : fName(&n)
|
||||
STBase&
|
||||
STBase::operator=(const STBase& t)
|
||||
{
|
||||
if ((t.fName != fName) && fName->isUseful() && t.fName->isUseful())
|
||||
{
|
||||
// VFALCO We shouldn't be logging at this low a level
|
||||
/*
|
||||
WriteLog ((t.getSType () == STI_AMOUNT) ? lsTRACE : lsWARNING, STBase)
|
||||
// This is common for amounts
|
||||
<< "Caution: " << t.fName->getName () << " not replacing " <<
|
||||
fName->getName ();
|
||||
*/
|
||||
}
|
||||
if (!fName->isUseful())
|
||||
fName = t.fName;
|
||||
return *this;
|
||||
@@ -110,12 +100,7 @@ bool
|
||||
STBase::isEquivalent(const STBase& t) const
|
||||
{
|
||||
assert(getSType() == STI_NOTPRESENT);
|
||||
if (t.getSType() == STI_NOTPRESENT)
|
||||
return true;
|
||||
// VFALCO We shouldn't be logging at this low a level
|
||||
// WriteLog (lsDEBUG, STBase) << "notEquiv " << getFullText() << " not
|
||||
// STI_NOTPRESENT";
|
||||
return false;
|
||||
return t.getSType() == STI_NOTPRESENT;
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user