Rework NetworkOPs to return Ledger:pointer.

This commit is contained in:
Arthur Britto
2012-09-27 13:08:59 -07:00
parent 20815377b4
commit b491b99255
2 changed files with 9 additions and 0 deletions

View File

@@ -104,9 +104,15 @@ public:
return mMode >= omTRACKING;
}
Ledger::pointer getCurrentLedger() { return mLedgerMaster->getCurrentLedger(); }
Ledger::pointer getLedgerByHash(const uint256& hash) { return mLedgerMaster->getLedgerByHash(hash); }
Ledger::pointer getLedgerBySeq(const uint32 seq) { return mLedgerMaster->getLedgerBySeq(seq); }
uint256 getClosedLedger()
{ return mLedgerMaster->getClosedLedger()->getHash(); }
SLE::pointer getSLE(Ledger::pointer lpLedger, const uint256& uHash) { return lpLedger->getSLE(uHash); }
//
// Transaction operations
//

View File

@@ -73,6 +73,9 @@ public:
bool setAccountID(const std::string& strAccountID);
void setAccountID(const uint160& hash160In);
static NewcoinAddress createAccountID(const std::string& strAccountID)
{ NewcoinAddress na; na.setAccountID(strAccountID); return na; }
static NewcoinAddress createAccountID(const uint160& uiAccountID);
static std::string createHumanAccountID(const uint160& uiAccountID)