mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Small bits.
This commit is contained in:
@@ -172,3 +172,30 @@ Json::Value TransactionMetaSet::getJson(int v) const
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool TransactionMetaSet::isNodeAffected(const uint256& node) const
|
||||
{
|
||||
for (std::set<TransactionMetaNode>::const_iterator it = mNodes.begin(), end = mNodes.end();
|
||||
it != end; ++it)
|
||||
if (it->getNode() == node)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
TransactionMetaNode TransactionMetaSet::getAffectedNode(const uint256& node)
|
||||
{
|
||||
for (std::set<TransactionMetaNode>::const_iterator it = mNodes.begin(), end = mNodes.end();
|
||||
it != end; ++it)
|
||||
if (it->getNode() == node)
|
||||
return *it;
|
||||
return TransactionMetaNode(uint256());
|
||||
}
|
||||
|
||||
const TransactionMetaNode& TransactionMetaSet::peekAffectedNode(const uint256& node) const
|
||||
{
|
||||
for (std::set<TransactionMetaNode>::const_iterator it = mNodes.begin(), end = mNodes.end();
|
||||
it != end; ++it)
|
||||
if (it->getNode() == node)
|
||||
return *it;
|
||||
throw std::runtime_error("Affected node not found");
|
||||
}
|
||||
|
||||
@@ -110,8 +110,8 @@ public:
|
||||
TransactionMetaSet(uint32 ledger, const std::vector<unsigned char>&);
|
||||
|
||||
bool isNodeAffected(const uint256&) const;
|
||||
TransactionMetaNode getAffectedAccount(const uint256&) const;
|
||||
const TransactionMetaNode& peekAffectedAccount(const uint256&) const;
|
||||
TransactionMetaNode getAffectedNode(const uint256&);
|
||||
const TransactionMetaNode& peekAffectedNode(const uint256&) const;
|
||||
|
||||
Json::Value getJson(int) const;
|
||||
void addRaw(Serializer&) const;
|
||||
|
||||
Reference in New Issue
Block a user