add account_offers and refactor

This commit is contained in:
jed
2012-12-04 12:12:11 -08:00
parent 4ef15c5536
commit 50953ff6d5
19 changed files with 257 additions and 138 deletions

View File

@@ -210,21 +210,6 @@ NicknameState::pointer Ledger::getNicknameState(const uint256& uNickname)
return boost::make_shared<NicknameState>(sle);
}
RippleState::pointer Ledger::accessRippleState(const uint256& uNode)
{
ScopedLock l(mAccountStateMap->Lock());
SHAMapItem::pointer item = mAccountStateMap->peekItem(uNode);
if (!item)
{
return RippleState::pointer();
}
SerializedLedgerEntry::pointer sle =
boost::make_shared<SerializedLedgerEntry>(item->peekSerializer(), item->getTag());
if (sle->getType() != ltRIPPLE_STATE) return RippleState::pointer();
return boost::make_shared<RippleState>(sle);
}
bool Ledger::addTransaction(const uint256& txID, const Serializer& txn)
{ // low-level - just add to table
SHAMapItem::pointer item = boost::make_shared<SHAMapItem>(txID, txn.peekData());