mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Small fixes.
This commit is contained in:
@@ -41,7 +41,7 @@ Ledger::Ledger(const uint256 &parentHash, const uint256 &transHash, const uint25
|
||||
mTotCoins(totCoins), mCloseTime(timeStamp), mLedgerSeq(ledgerSeq), mLedgerInterval(LEDGER_INTERVAL),
|
||||
mClosed(false), mValidHash(false), mAccepted(false), mImmutable(false)
|
||||
{
|
||||
assert(!!mParentHash);
|
||||
assert(mParentHash.isNonZero());
|
||||
updateHash();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ Ledger::Ledger(bool, Ledger& prevLedger) : mTotCoins(prevLedger.mTotCoins),
|
||||
{ // Create a new ledger that follows this one
|
||||
prevLedger.updateHash();
|
||||
mParentHash = prevLedger.getHash();
|
||||
assert(!!mParentHash);
|
||||
assert(mParentHash.isNonZero());
|
||||
mCloseTime = prevLedger.getNextLedgerClose();
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ RippleState::pointer Ledger::getRippleState(const uint256& uNode)
|
||||
bool Ledger::addTransaction(Transaction::pointer trans)
|
||||
{ // low-level - just add to table
|
||||
assert(!mAccepted);
|
||||
assert(!!trans->getID());
|
||||
assert(trans->getID().isNonZero());
|
||||
Serializer s;
|
||||
trans->getSTransaction()->add(s);
|
||||
SHAMapItem::pointer item = boost::make_shared<SHAMapItem>(trans->getID(), s.peekData());
|
||||
|
||||
@@ -420,7 +420,7 @@ SHAMap::pointer LedgerConsensus::getTransactionTree(const uint256& hash, bool do
|
||||
{
|
||||
boost::unordered_map<uint256, SHAMap::pointer>::iterator it = mComplete.find(hash);
|
||||
if (it == mComplete.end())
|
||||
{ // we have not completed acuiqiring this ledger
|
||||
{ // we have not completed acquiring this ledger
|
||||
if (doAcquire)
|
||||
{
|
||||
TransactionAcquire::pointer& acquiring = mAcquiring[hash];
|
||||
|
||||
@@ -49,8 +49,8 @@ uint256 Ledger::getGeneratorIndex(const uint160& uGeneratorID)
|
||||
uint160 Ledger::getOfferBase(const uint160& currencyIn, const uint160& accountIn,
|
||||
const uint160& currencyOut, const uint160& accountOut)
|
||||
{
|
||||
bool inNative = !!currencyIn;
|
||||
bool outNative = !!currencyOut;
|
||||
bool inNative = currencyIn.isZero();
|
||||
bool outNative = currencyOut.isZero();
|
||||
|
||||
if (inNative && outNative)
|
||||
throw std::runtime_error("native to native offer");
|
||||
|
||||
Reference in New Issue
Block a user