mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
NetworkOPs layer
Begin coding the 'NetworkOPs' layer. This will provide most of the functions 'client' code will want to call such as functions to lookup transactions, check on their status, get balances, and so on. Much of the RPC layer will be a thin wrapper over these functions. The purpose of this layer is to permit the node to support these functions regardless of its operating mode or available data, as long as it's connected to the network. If synchronized and tracking the current ledger, it can do most functions locally. If not, it can ask for help from other nodes. If hopeless, it can return an error code.
This commit is contained in:
@@ -24,9 +24,11 @@ uint64 LedgerMaster::getBalance(std::string& addr)
|
||||
return mCurrentLedger->getBalance(humanTo160(addr));
|
||||
}
|
||||
|
||||
bool LedgerMaster::addTransaction(Transaction::pointer transaction)
|
||||
bool LedgerMaster::addHeldTransaction(Transaction::pointer transaction)
|
||||
{
|
||||
return mCurrentLedger->applyTransaction(transaction)==Ledger::TR_SUCCESS;
|
||||
boost::recursive_mutex::scoped_lock ml(mLock);
|
||||
if(!mHeldTransactionsByID[transaction->getID()])
|
||||
mHeldTransactionsByID[transaction->getID()]=transaction;
|
||||
}
|
||||
|
||||
void LedgerMaster::pushLedger(Ledger::pointer newLedger)
|
||||
|
||||
Reference in New Issue
Block a user