mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Rename NewcoinAddress to RippleAddress.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "LedgerConsensus.h"
|
||||
#include "LedgerTiming.h"
|
||||
#include "Log.h"
|
||||
#include "NewcoinAddress.h"
|
||||
#include "RippleAddress.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
@@ -193,7 +193,7 @@ Transaction::pointer NetworkOPs::findTransactionByID(const uint256& transactionI
|
||||
}
|
||||
|
||||
int NetworkOPs::findTransactionsBySource(const uint256& uLedger, std::list<Transaction::pointer>& txns,
|
||||
const NewcoinAddress& sourceAccount, uint32 minSeq, uint32 maxSeq)
|
||||
const RippleAddress& sourceAccount, uint32 minSeq, uint32 maxSeq)
|
||||
{
|
||||
AccountState::pointer state = getAccountState(uLedger, sourceAccount);
|
||||
if (!state) return 0;
|
||||
@@ -215,7 +215,7 @@ int NetworkOPs::findTransactionsBySource(const uint256& uLedger, std::list<Trans
|
||||
}
|
||||
|
||||
int NetworkOPs::findTransactionsByDestination(std::list<Transaction::pointer>& txns,
|
||||
const NewcoinAddress& destinationAccount, uint32 startLedgerSeq, uint32 endLedgerSeq, int maxTransactions)
|
||||
const RippleAddress& destinationAccount, uint32 startLedgerSeq, uint32 endLedgerSeq, int maxTransactions)
|
||||
{
|
||||
// WRITEME
|
||||
return 0;
|
||||
@@ -225,7 +225,7 @@ int NetworkOPs::findTransactionsByDestination(std::list<Transaction::pointer>& t
|
||||
// Account functions
|
||||
//
|
||||
|
||||
AccountState::pointer NetworkOPs::getAccountState(const uint256& uLedger, const NewcoinAddress& accountID)
|
||||
AccountState::pointer NetworkOPs::getAccountState(const uint256& uLedger, const RippleAddress& accountID)
|
||||
{
|
||||
return mLedgerMaster->getLedgerByHash(uLedger)->getAccountState(accountID);
|
||||
}
|
||||
@@ -294,12 +294,12 @@ NicknameState::pointer NetworkOPs::getNicknameState(const uint256& uLedger, cons
|
||||
// Owner functions
|
||||
//
|
||||
|
||||
Json::Value NetworkOPs::getOwnerInfo(const uint256& uLedger, const NewcoinAddress& naAccount)
|
||||
Json::Value NetworkOPs::getOwnerInfo(const uint256& uLedger, const RippleAddress& naAccount)
|
||||
{
|
||||
return getOwnerInfo(mLedgerMaster->getLedgerByHash(uLedger), naAccount);
|
||||
}
|
||||
|
||||
Json::Value NetworkOPs::getOwnerInfo(Ledger::pointer lpLedger, const NewcoinAddress& naAccount)
|
||||
Json::Value NetworkOPs::getOwnerInfo(Ledger::pointer lpLedger, const RippleAddress& naAccount)
|
||||
{
|
||||
Json::Value jvObjects(Json::objectValue);
|
||||
|
||||
@@ -686,7 +686,7 @@ bool NetworkOPs::haveConsensusObject()
|
||||
|
||||
// <-- bool: true to relay
|
||||
bool NetworkOPs::recvPropose(uint32 proposeSeq, const uint256& proposeHash, const uint256& prevLedger,
|
||||
uint32 closeTime, const std::string& pubKey, const std::string& signature, const NewcoinAddress& nodePublic)
|
||||
uint32 closeTime, const std::string& pubKey, const std::string& signature, const RippleAddress& nodePublic)
|
||||
{
|
||||
// JED: does mConsensus need to be locked?
|
||||
|
||||
@@ -704,7 +704,7 @@ bool NetworkOPs::recvPropose(uint32 proposeSeq, const uint256& proposeHash, cons
|
||||
if (!theApp->isNew(s.getSHA512Half()))
|
||||
return false;
|
||||
|
||||
NewcoinAddress naPeerPublic = NewcoinAddress::createNodePublic(strCopy(pubKey));
|
||||
RippleAddress naPeerPublic = RippleAddress::createNodePublic(strCopy(pubKey));
|
||||
|
||||
if (!haveConsensusObject())
|
||||
{
|
||||
@@ -820,7 +820,7 @@ void NetworkOPs::setMode(OperatingMode om)
|
||||
}
|
||||
|
||||
std::vector< std::pair<uint32, uint256> >
|
||||
NetworkOPs::getAffectedAccounts(const NewcoinAddress& account, uint32 minLedger, uint32 maxLedger)
|
||||
NetworkOPs::getAffectedAccounts(const RippleAddress& account, uint32 minLedger, uint32 maxLedger)
|
||||
{
|
||||
std::vector< std::pair<uint32, uint256> > affectedAccounts;
|
||||
|
||||
@@ -842,14 +842,14 @@ std::vector< std::pair<uint32, uint256> >
|
||||
return affectedAccounts;
|
||||
}
|
||||
|
||||
std::vector<NewcoinAddress>
|
||||
std::vector<RippleAddress>
|
||||
NetworkOPs::getLedgerAffectedAccounts(uint32 ledgerSeq)
|
||||
{
|
||||
std::vector<NewcoinAddress> accounts;
|
||||
std::vector<RippleAddress> accounts;
|
||||
std::string sql = str(boost::format
|
||||
("SELECT DISTINCT Account FROM AccountTransactions INDEXED BY AcctLgrIndex WHERE LedgerSeq = '%d';")
|
||||
% ledgerSeq);
|
||||
NewcoinAddress acct;
|
||||
RippleAddress acct;
|
||||
{
|
||||
Database* db = theApp->getTxnDB()->getDB();
|
||||
ScopedLock dblock = theApp->getTxnDB()->getDBLock();
|
||||
@@ -884,7 +884,7 @@ Json::Value NetworkOPs::getServerInfo()
|
||||
if (!theConfig.VALIDATION_SEED.isValid())
|
||||
info["serverState"] = "none";
|
||||
else
|
||||
info["validationPKey"] = NewcoinAddress::createNodePublic(theConfig.VALIDATION_SEED).humanNodePublic();
|
||||
info["validationPKey"] = RippleAddress::createNodePublic(theConfig.VALIDATION_SEED).humanNodePublic();
|
||||
|
||||
if (mNeedNetworkLedger)
|
||||
info["networkLedger"] = "waiting";
|
||||
@@ -904,7 +904,7 @@ Json::Value NetworkOPs::getServerInfo()
|
||||
// Monitoring: publisher side
|
||||
//
|
||||
|
||||
Json::Value NetworkOPs::pubBootstrapAccountInfo(Ledger::ref lpAccepted, const NewcoinAddress& naAccountID)
|
||||
Json::Value NetworkOPs::pubBootstrapAccountInfo(Ledger::ref lpAccepted, const RippleAddress& naAccountID)
|
||||
{
|
||||
Json::Value jvObj(Json::objectValue);
|
||||
|
||||
@@ -918,7 +918,7 @@ Json::Value NetworkOPs::pubBootstrapAccountInfo(Ledger::ref lpAccepted, const Ne
|
||||
return jvObj;
|
||||
}
|
||||
|
||||
void NetworkOPs::pubAccountInfo(const NewcoinAddress& naAccountID, const Json::Value& jvObj)
|
||||
void NetworkOPs::pubAccountInfo(const RippleAddress& naAccountID, const Json::Value& jvObj)
|
||||
{
|
||||
boost::interprocess::sharable_lock<boost::interprocess::interprocess_upgradable_mutex> sl(mMonitorLock);
|
||||
|
||||
@@ -970,7 +970,7 @@ void NetworkOPs::pubLedger(Ledger::ref lpAccepted)
|
||||
{
|
||||
Json::Value jvAccounts(Json::arrayValue);
|
||||
|
||||
BOOST_FOREACH(const NewcoinAddress& naAccountID, getLedgerAffectedAccounts(lpAccepted->getLedgerSeq()))
|
||||
BOOST_FOREACH(const RippleAddress& naAccountID, getLedgerAffectedAccounts(lpAccepted->getLedgerSeq()))
|
||||
{
|
||||
jvAccounts.append(Json::Value(naAccountID.humanAccountID()));
|
||||
}
|
||||
@@ -1025,7 +1025,7 @@ void NetworkOPs::pubLedger(Ledger::ref lpAccepted)
|
||||
|
||||
BOOST_FOREACH(const subInfoMapType::iterator::value_type& it, mBootAccountInfo)
|
||||
{
|
||||
Json::Value jvObj = pubBootstrapAccountInfo(lpAccepted, NewcoinAddress::createAccountID(it.first));
|
||||
Json::Value jvObj = pubBootstrapAccountInfo(lpAccepted, RippleAddress::createAccountID(it.first));
|
||||
|
||||
BOOST_FOREACH(InfoSub* ispListener, it.second)
|
||||
{
|
||||
@@ -1083,7 +1083,7 @@ void NetworkOPs::pubTransactionAccounts(Ledger::ref lpCurrent, const SerializedT
|
||||
|
||||
if (!mSubAccountTransaction.empty())
|
||||
{
|
||||
BOOST_FOREACH(const NewcoinAddress& naAccountPublic, stTxn.getAffectedAccounts())
|
||||
BOOST_FOREACH(const RippleAddress& naAccountPublic, stTxn.getAffectedAccounts())
|
||||
{
|
||||
subInfoMapIterator simiIt = mSubAccountTransaction.find(naAccountPublic.getAccountID());
|
||||
|
||||
@@ -1128,11 +1128,11 @@ void NetworkOPs::pubTransaction(Ledger::ref lpCurrent, const SerializedTransacti
|
||||
// Monitoring
|
||||
//
|
||||
|
||||
void NetworkOPs::subAccountInfo(InfoSub* ispListener, const boost::unordered_set<NewcoinAddress>& vnaAccountIDs)
|
||||
void NetworkOPs::subAccountInfo(InfoSub* ispListener, const boost::unordered_set<RippleAddress>& vnaAccountIDs)
|
||||
{
|
||||
boost::interprocess::scoped_lock<boost::interprocess::interprocess_upgradable_mutex> sl(mMonitorLock);
|
||||
|
||||
BOOST_FOREACH(const NewcoinAddress& naAccountID, vnaAccountIDs)
|
||||
BOOST_FOREACH(const RippleAddress& naAccountID, vnaAccountIDs)
|
||||
{
|
||||
// Register for bootstrap info.
|
||||
subInfoMapType::iterator simIterator;
|
||||
@@ -1170,11 +1170,11 @@ void NetworkOPs::subAccountInfo(InfoSub* ispListener, const boost::unordered_set
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkOPs::unsubAccountInfo(InfoSub* ispListener, const boost::unordered_set<NewcoinAddress>& vnaAccountIDs)
|
||||
void NetworkOPs::unsubAccountInfo(InfoSub* ispListener, const boost::unordered_set<RippleAddress>& vnaAccountIDs)
|
||||
{
|
||||
boost::interprocess::scoped_lock<boost::interprocess::interprocess_upgradable_mutex> sl(mMonitorLock);
|
||||
|
||||
BOOST_FOREACH(const NewcoinAddress& naAccountID, vnaAccountIDs)
|
||||
BOOST_FOREACH(const RippleAddress& naAccountID, vnaAccountIDs)
|
||||
{
|
||||
subInfoMapType::iterator simIterator = mSubAccountInfo.find(naAccountID.getAccountID());
|
||||
if (simIterator == mSubAccountInfo.end())
|
||||
@@ -1196,11 +1196,11 @@ void NetworkOPs::unsubAccountInfo(InfoSub* ispListener, const boost::unordered_s
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkOPs::subAccountTransaction(InfoSub* ispListener, const boost::unordered_set<NewcoinAddress>& vnaAccountIDs)
|
||||
void NetworkOPs::subAccountTransaction(InfoSub* ispListener, const boost::unordered_set<RippleAddress>& vnaAccountIDs)
|
||||
{
|
||||
boost::interprocess::scoped_lock<boost::interprocess::interprocess_upgradable_mutex> sl(mMonitorLock);
|
||||
|
||||
BOOST_FOREACH(const NewcoinAddress& naAccountID, vnaAccountIDs)
|
||||
BOOST_FOREACH(const RippleAddress& naAccountID, vnaAccountIDs)
|
||||
{
|
||||
subInfoMapType::iterator simIterator = mSubAccountTransaction.find(naAccountID.getAccountID());
|
||||
if (simIterator == mSubAccountTransaction.end())
|
||||
@@ -1219,11 +1219,11 @@ void NetworkOPs::subAccountTransaction(InfoSub* ispListener, const boost::unorde
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkOPs::unsubAccountTransaction(InfoSub* ispListener, const boost::unordered_set<NewcoinAddress>& vnaAccountIDs)
|
||||
void NetworkOPs::unsubAccountTransaction(InfoSub* ispListener, const boost::unordered_set<RippleAddress>& vnaAccountIDs)
|
||||
{
|
||||
boost::interprocess::scoped_lock<boost::interprocess::interprocess_upgradable_mutex> sl(mMonitorLock);
|
||||
|
||||
BOOST_FOREACH(const NewcoinAddress& naAccountID, vnaAccountIDs)
|
||||
BOOST_FOREACH(const RippleAddress& naAccountID, vnaAccountIDs)
|
||||
{
|
||||
subInfoMapType::iterator simIterator = mSubAccountTransaction.find(naAccountID.getAccountID());
|
||||
if (simIterator == mSubAccountTransaction.end())
|
||||
@@ -1260,7 +1260,7 @@ uint32 NetworkOPs::acceptLedger()
|
||||
return mLedgerMaster->getCurrentLedger()->getLedgerSeq();
|
||||
}
|
||||
|
||||
void NetworkOPs::storeProposal(const LedgerProposal::pointer& proposal, const NewcoinAddress& peerPublic)
|
||||
void NetworkOPs::storeProposal(const LedgerProposal::pointer& proposal, const RippleAddress& peerPublic)
|
||||
{
|
||||
std::list<LedgerProposal::pointer>& props = mStoredProposals[peerPublic.getNodeID()];
|
||||
if (props.size() >= (mLastCloseProposers + 10))
|
||||
|
||||
Reference in New Issue
Block a user