Rename ledger index functions.

This commit is contained in:
Arthur Britto
2012-07-18 14:48:05 -07:00
parent 219162c358
commit f8882b32bf
2 changed files with 12 additions and 12 deletions

View File

@@ -167,12 +167,12 @@ public:
// next/prev function
SLE::pointer getSLE(const uint256& uHash);
uint256 getFirstLedgerID();
uint256 getLastLedgerID();
uint256 getNextLedgerID(const uint256& uHash); // first node >hash
uint256 getNextLedgerID(const uint256& uHash, const uint256& uEnd); // first node >hash, <end
uint256 getPrevLedgerID(const uint256& uHash); // last node <hash
uint256 getPrevLedgerID(const uint256& uHash, const uint256& uBegin); // last node <hash, >begin
uint256 getFirstLedgerIndex();
uint256 getLastLedgerIndex();
uint256 getNextLedgerIndex(const uint256& uHash); // first node >hash
uint256 getNextLedgerIndex(const uint256& uHash, const uint256& uEnd); // first node >hash, <end
uint256 getPrevLedgerIndex(const uint256& uHash); // last node <hash
uint256 getPrevLedgerIndex(const uint256& uHash, const uint256& uBegin); // last node <hash, >begin
// index calculation functions
static uint256 getAccountRootIndex(const uint160& uAccountID);

View File

@@ -53,25 +53,25 @@ SLE::pointer Ledger::getSLE(const uint256& uHash)
return boost::make_shared<SLE>(node->peekSerializer(), node->getTag());
}
uint256 Ledger::getFirstLedgerID()
uint256 Ledger::getFirstLedgerIndex()
{
SHAMapItem::pointer node = mAccountStateMap->peekFirstItem();
return node ? node->getTag() : uint256();
}
uint256 Ledger::getLastLedgerID()
uint256 Ledger::getLastLedgerIndex()
{
SHAMapItem::pointer node = mAccountStateMap->peekLastItem();
return node ? node->getTag() : uint256();
}
uint256 Ledger::getNextLedgerID(const uint256& uHash)
uint256 Ledger::getNextLedgerIndex(const uint256& uHash)
{
SHAMapItem::pointer node = mAccountStateMap->peekNextItem(uHash);
return node ? node->getTag() : uint256();
}
uint256 Ledger::getNextLedgerID(const uint256& uHash, const uint256& uEnd)
uint256 Ledger::getNextLedgerIndex(const uint256& uHash, const uint256& uEnd)
{
SHAMapItem::pointer node = mAccountStateMap->peekNextItem(uHash);
if ((!node) || (node->getTag() > uEnd))
@@ -79,13 +79,13 @@ uint256 Ledger::getNextLedgerID(const uint256& uHash, const uint256& uEnd)
return node->getTag();
}
uint256 Ledger::getPrevLedgerID(const uint256& uHash)
uint256 Ledger::getPrevLedgerIndex(const uint256& uHash)
{
SHAMapItem::pointer node = mAccountStateMap->peekPrevItem(uHash);
return node ? node->getTag() : uint256();
}
uint256 Ledger::getPrevLedgerID(const uint256& uHash, const uint256& uBegin)
uint256 Ledger::getPrevLedgerIndex(const uint256& uHash, const uint256& uBegin)
{
SHAMapItem::pointer node = mAccountStateMap->peekNextItem(uHash);
if ((!node) || (node->getTag() < uBegin))