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

Iterative amount/balance visitor #1257

Merged
merged 2 commits into from Nov 8, 2018

Conversation

@cryptocode
Copy link
Collaborator

commented Oct 4, 2018

The amount and balance visitors are merged into a summation_visitor with functions for computing amount and balance. A loop emulates the mutual recursion with an emplace based helper stack. Other than that, I kept the visitor and computation loop logic as close to the original as I could.

@rkeene rkeene added this to the V17.0 milestone Oct 4, 2018

@cryptocode cryptocode force-pushed the cryptocode:visitor branch from 009ecb7 to ed3eb99 Oct 4, 2018

@cryptocode cryptocode force-pushed the cryptocode:visitor branch from ed3eb99 to 663febd Oct 4, 2018

@rkeene rkeene requested a review from argakiig Oct 9, 2018

@rkeene rkeene requested review from SergiySW, rkeene and PlasmaPower Oct 23, 2018

@PlasmaPower

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2018

Do we have tests for this?

@cryptocode

This comment has been minimized.

Copy link
Collaborator Author

commented Oct 23, 2018

This is a drop-in replacement that gets tested the same way as the old visitors (several tests employs the ledger.balance and ledger.amount calls, but I'm not sure if they cover all eventualities.)

@PlasmaPower

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2018

several tests employs the ledger.balance and ledger.amount calls

Ok, then this sounds good to me. 👍

@PlasmaPower PlasmaPower merged commit 3584437 into nanocurrency:master Nov 8, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.