Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

MstState: iteration methods for batches & txs #2203

Merged
merged 7 commits into from
Apr 8, 2019

Conversation

MBoldyrev
Copy link
Contributor

Signed-off-by: Mikhail Boldyrev [email protected]

Description of the Change

New interface to access all batches and transactions of MST State.

Benefits

Copying can be avoided. Code simplified.

Possible Drawbacks

Usage Examples or Tests [optional]

Alternate Designs [optional]

Signed-off-by: Mikhail Boldyrev <[email protected]>
@MBoldyrev MBoldyrev added needs-review pr awaits review from maintainers refactoring internal stuff, that are changed/removed that doesn't affect client code labels Mar 29, 2019
@MBoldyrev MBoldyrev self-assigned this Mar 29, 2019
}

void MstState::iterateTransactions(
std::function<
Copy link
Contributor

Choose a reason for hiding this comment

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

std::function is not considered as a good solution for non-tests code due to its performance drawbacks.

Copy link
Contributor

@igor-egorov igor-egorov left a comment

Choose a reason for hiding this comment

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

The new interface looks sexy but I cannot approve the code with std::function used in non-tests area.

A possible solution can be template <typename Lambda>.
We need more opinions regarding that pull request.

@MBoldyrev MBoldyrev requested a review from igor-egorov April 3, 2019 05:55
@MBoldyrev MBoldyrev merged commit ed8c67d into develop Apr 8, 2019
@MBoldyrev MBoldyrev deleted the feature/mst-state-iterables branch April 8, 2019 14:53
MBoldyrev added a commit that referenced this pull request Apr 8, 2019
MBoldyrev added a commit that referenced this pull request Apr 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-review pr awaits review from maintainers refactoring internal stuff, that are changed/removed that doesn't affect client code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants