From a6d189e2da277ded67d2adb52a9029b9a9434f80 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 23 Jan 2013 17:50:45 -0800 Subject: [PATCH] Consider accounts that issue offer currencies as affected/mentioned. --- src/cpp/ripple/SerializedTransaction.cpp | 5 +++-- src/cpp/ripple/TransactionMeta.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cpp/ripple/SerializedTransaction.cpp b/src/cpp/ripple/SerializedTransaction.cpp index e7b1ef7e59..5961d25f7d 100644 --- a/src/cpp/ripple/SerializedTransaction.cpp +++ b/src/cpp/ripple/SerializedTransaction.cpp @@ -100,9 +100,10 @@ std::vector SerializedTransaction::getMentionedAccounts() const if (!found) accounts.push_back(na); } - if (it.getFName() == sfLimitAmount) + const STAmount* sam = dynamic_cast(&it); + if (sam) { - uint160 issuer = dynamic_cast(&it)->getIssuer(); + uint160 issuer = sam->getIssuer(); if (issuer.isNonZero()) { RippleAddress na; diff --git a/src/cpp/ripple/TransactionMeta.cpp b/src/cpp/ripple/TransactionMeta.cpp index 1e69ec6aea..bd87829a72 100644 --- a/src/cpp/ripple/TransactionMeta.cpp +++ b/src/cpp/ripple/TransactionMeta.cpp @@ -81,7 +81,8 @@ std::vector TransactionMetaSet::getAffectedAccounts() const STAccount* sa = dynamic_cast(&field); if (sa) addIfUnique(accounts, sa->getValueNCA()); - else if ((field.getFName() == sfLowLimit) || (field.getFName() == sfHighLimit)) + else if ((field.getFName() == sfLowLimit) || (field.getFName() == sfHighLimit) || + (field.getFName() == sfTakerPays) || (field.getFName() == sfTakerGets)) { const STAmount* lim = dynamic_cast(&field); if (lim != NULL)