mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
SerializedTransaction::getAffectdAccounts
So we can know what transactions affect what accounts.
This commit is contained in:
@@ -75,6 +75,21 @@ std::string SerializedTransaction::getText() const
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<NewcoinAddress> SerializedTransaction::getAffectedAccounts() const
|
||||||
|
{
|
||||||
|
std::vector<NewcoinAddress> accounts;
|
||||||
|
accounts.push_back(mSourceAccount);
|
||||||
|
|
||||||
|
for(boost::ptr_vector<SerializedType>::const_iterator it = mInnerTxn.peekData().begin(),
|
||||||
|
end = mInnerTxn.peekData().end(); it != end ; ++it)
|
||||||
|
{
|
||||||
|
const STAccount* sa = dynamic_cast<const STAccount*>(&*it);
|
||||||
|
if (sa != NULL) // FIXME: Should we check for duplicates?
|
||||||
|
accounts.push_back(sa->getValueNCA());
|
||||||
|
}
|
||||||
|
return accounts;
|
||||||
|
}
|
||||||
|
|
||||||
int SerializedTransaction::getTransaction(Serializer& s, bool include_length) const
|
int SerializedTransaction::getTransaction(Serializer& s, bool include_length) const
|
||||||
{
|
{
|
||||||
int l = getLength();
|
int l = getLength();
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ public:
|
|||||||
void makeITFieldPresent(SOE_Field field);
|
void makeITFieldPresent(SOE_Field field);
|
||||||
void makeITFieldAbsent(SOE_Field field);
|
void makeITFieldAbsent(SOE_Field field);
|
||||||
|
|
||||||
|
std::vector<NewcoinAddress> getAffectedAccounts() const;
|
||||||
|
|
||||||
// whole transaction functions
|
// whole transaction functions
|
||||||
int getTransaction(Serializer& s, bool include_length) const;
|
int getTransaction(Serializer& s, bool include_length) const;
|
||||||
uint256 getTransactionID() const;
|
uint256 getTransactionID() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user