-
Notifications
You must be signed in to change notification settings - Fork 198
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
Component for scheduled SCRs #3038
Component for scheduled SCRs #3038
Conversation
SebastianMarian
commented
Apr 23, 2021
•
edited
edited
- Implemented functionality of saving/loading/setting/getting for scheduled scrs generated after execution of scheduled txs. These scrs should be included in the next block after the one in which the corresponding scheduled txs were included and afterwards were executed.
) | ||
|
||
// ScheduledTxsExecutionStub - | ||
type ScheduledTxsExecutionStub struct { |
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.
can we add instead one mock and/or one stub for the scheduledTxsExecution in testscommon ?
then we don't need to redefine in every package
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.
done
FeeHandler: &mock.FeeAccumulatorStub{}, | ||
BlockSizeComputation: &mock.BlockSizeComputationStub{}, | ||
BalanceComputation: &mock.BalanceComputationStub{}, | ||
EconomicsFee: &mock.FeeHandlerStub{ |
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.
reformat file
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.
This is the way it is automatically formatted. I'm not sure if something is wrong with my settings or not...
process/sync/baseSync.go
Outdated
@@ -695,6 +699,18 @@ func (boot *baseBootstrap) rollBack(revertUsingForkNonce bool) error { | |||
) | |||
} | |||
|
|||
mapScheduledSCRs, err := process.GetScheduledSCRsFromStorage(prevHeaderHash, boot.store, boot.marshalizer) | |||
if err != nil { | |||
log.Debug("get scheduled scrs from storage", |
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.
shouldn't be this critical ?
maybe make a new function for lines 702 - 713 as the base function is already too big