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
Update stats and scenario testing #729
Conversation
NicolasDP
commented
Aug 29, 2019
•
edited
edited
- missing: update the open API doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for the most part.
@@ -133,3 +133,67 @@ pub fn scenario_1(mut context: Context<ChaChaRng>) { | |||
|
|||
controller.finalize(); | |||
} | |||
|
|||
pub fn scenario_2(mut context: Context<ChaChaRng>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the name be more informative as to what the scenario tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nop. they will be cleaned up when I have a better control of the different scenario and their execution
@@ -55,7 +55,7 @@ fn main() { | |||
|
|||
introduction(&context); | |||
|
|||
scenario_1(context.derive()); | |||
scenario_2(context.derive()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has scenario_1
fallen into dead code then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
soon
pub fn address(&self, discrimination: Discrimination) -> Address { | ||
self.identifier().to_address(discrimination).into() | ||
} | ||
|
||
pub fn increment_counter(&mut self) { | ||
let v : u32 = self.internal_counter.into(); | ||
self.internal_counter = account::SpendingCounter::from(v + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpendingCounter
might benefit from an impl of AddAssign
to simplify this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree
de0c02a
to
a753df5
Compare
a753df5
to
8a2e88e
Compare