Skip to content

Commit

Permalink
stop prefetching issuer
Browse files Browse the repository at this point in the history
  • Loading branch information
sisuresh committed Mar 26, 2020
1 parent 0a39dab commit a041b75
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/transactions/ManageOfferOpFrameBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,6 @@ ManageOfferOpFrameBase::insertLedgerKeysToPrefetch(
auto addIssuerAndTrustline = [&](Asset const& asset) {
if (asset.type() != ASSET_TYPE_NATIVE)
{
auto issuer = getIssuer(asset);
keys.emplace(accountKey(issuer));
keys.emplace(trustlineKey(this->getSourceID(), asset));
}
};
Expand Down
12 changes: 0 additions & 12 deletions src/transactions/PathPaymentOpFrameBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ PathPaymentOpFrameBase::insertLedgerKeysToPrefetch(
{
keys.emplace(accountKey(getDestID()));

auto processAsset = [&](Asset const& asset) {
if (asset.type() != ASSET_TYPE_NATIVE)
{
auto issuer = getIssuer(asset);
keys.emplace(accountKey(issuer));
}
};

processAsset(getSourceAsset());
processAsset(getDestAsset());
std::for_each(getPath().begin(), getPath().end(), processAsset);

if (getDestAsset().type() != ASSET_TYPE_NATIVE)
{
keys.emplace(trustlineKey(getDestID(), getDestAsset()));
Expand Down
3 changes: 0 additions & 3 deletions src/transactions/PaymentOpFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ PaymentOpFrame::insertLedgerKeysToPrefetch(
// Prefetch issuer for non-native assets
if (mPayment.asset.type() != ASSET_TYPE_NATIVE)
{
auto issuer = getIssuer(mPayment.asset);
keys.emplace(accountKey(issuer));

// These are *maybe* needed; For now, we load everything
keys.emplace(trustlineKey(mPayment.destination, mPayment.asset));
keys.emplace(trustlineKey(getSourceID(), mPayment.asset));
Expand Down

0 comments on commit a041b75

Please sign in to comment.