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

Actions should be able to know if it's “rehearsal mode” during execution #131

dahlia opened this issue Mar 19, 2019 · 0 comments


None yet
1 participant
Copy link

commented Mar 19, 2019

The previously merged patch #121 introduced the concept of “rehearsal mode” (although I named it so right now) in order to automatically determine the Transaction<T>.UpdatedAddresses property. However, as this mode does not provide any PreviousStates and mocks Random and BlockIndex (which is set to 0 during that mode), it tends to lead two quite different consequences for both modes. Although the logical structure of an action should be consistent whether it's rehearsal or not, in some cases we need to make conditions depending on the mode.

In my opinion, the easiest way to implement would be to add a Boolean property like IActionContext.Rehearsal.

@dahlia dahlia added the suggestion label Mar 19, 2019

@dahlia dahlia self-assigned this Mar 19, 2019

@dahlia dahlia added this to the 0.2.0 milestone Mar 19, 2019

dahlia added a commit to dahlia/libplanet that referenced this issue Mar 20, 2019

@dahlia dahlia closed this in 3a9ad91 Mar 20, 2019

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.