Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cap-0030 - remove NO_ISSUER results #2389

Merged
merged 2 commits into from
Mar 31, 2020

Conversation

sisuresh
Copy link
Contributor

Description

Implements https://github.com/stellar/stellar-protocol/blob/master/core/cap-0030.md

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v5.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

src/transactions/PathPaymentOpFrameBase.cpp Outdated Show resolved Hide resolved
src/transactions/ChangeTrustOpFrame.cpp Outdated Show resolved Hide resolved
src/transactions/ChangeTrustOpFrame.cpp Outdated Show resolved Hide resolved
src/transactions/ChangeTrustOpFrame.cpp Outdated Show resolved Hide resolved
src/transactions/ManageOfferOpFrameBase.cpp Outdated Show resolved Hide resolved
src/transactions/test/ManageBuyOfferTests.cpp Show resolved Hide resolved
src/transactions/test/OfferTests.cpp Show resolved Hide resolved
src/transactions/test/PathPaymentStrictSendTests.cpp Outdated Show resolved Hide resolved
src/transactions/test/PathPaymentStrictSendTests.cpp Outdated Show resolved Hide resolved
src/transactions/test/PathPaymentTests.cpp Outdated Show resolved Hide resolved
@sisuresh sisuresh force-pushed the removeNoIssuerResults branch from 402348b to 526d2ae Compare January 31, 2020 17:34
Copy link
Contributor

@jonjove jonjove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, just a few tiny nitpicks left.

a1.manageBuyOffer(0, makeAsset(getAccount("fake"), "CUR3"),
native, Price{1, 1}, 1),
ex_MANAGE_BUY_OFFER_SELL_NO_ISSUER);
SECTION("no issuer")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you missed this one.

src/transactions/test/PathPaymentStrictSendTests.cpp Outdated Show resolved Hide resolved
src/transactions/test/PathPaymentTests.cpp Show resolved Hide resolved
@sisuresh sisuresh force-pushed the removeNoIssuerResults branch 2 times, most recently from adb3098 to d66b44a Compare February 7, 2020 02:58
Copy link
Contributor

@MonsieurNicolas MonsieurNicolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the lambda question in test code that @jonjove has, this looks good.
I have one suggestion to simplify the actual code changes (remove condition on prefetching)

{
keys.emplace(accountKey(mPayment.destination));

// Prefetch issuer for non-native assets
if (mPayment.asset.type() != ASSET_TYPE_NATIVE)
{
auto issuer = getIssuer(mPayment.asset);
keys.emplace(accountKey(issuer));
if (ledgerVersion < 13)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should just stop pre-fetching issuers even for protocol 12: this avoids the code bloat related to passing ledgerVersion through the various layers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@sisuresh sisuresh force-pushed the removeNoIssuerResults branch 2 times, most recently from 71b439f to 42900bc Compare March 13, 2020 00:38
@sisuresh sisuresh force-pushed the removeNoIssuerResults branch from 42900bc to c0ce78a Compare March 26, 2020 22:37
@jonjove
Copy link
Contributor

jonjove commented Mar 30, 2020

There is one comment that hasn't been addressed: #2389 (comment). Other than that, this is ready to be merged.

@MonsieurNicolas
Copy link
Contributor

r+ c0ce78a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants