-
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
Fix edge case situation for remaining txs #3682
Fix edge case situation for remaining txs #3682
Conversation
SebastianMarian
commented
Jan 10, 2022
•
edited
edited
- Fixed edge case situation for remaining txs added for scheduled execution
* Changed epoch activation flags
Codecov Report
@@ Coverage Diff @@
## feat/scheduled-sc-execution #3682 +/- ##
===============================================================
+ Coverage 72.05% 73.53% +1.47%
===============================================================
Files 644 597 -47
Lines 63897 78345 +14448
===============================================================
+ Hits 46044 57612 +11568
- Misses 13533 16158 +2625
- Partials 4320 4575 +255
Continue to review full report at Codecov.
|
…cution-with-new-config
…cution-with-new-config
@@ -147,51 +147,52 @@ func (mbb *miniBlocksBuilder) updateAccountShardsInfo(tx *transaction.Transactio | |||
|
|||
// function returns through the first parameter if the given transaction can be added to the miniBlock | |||
// second return values returns an error in case no more transactions can be added to the miniBlocks | |||
func (mbb *miniBlocksBuilder) checkAddTransaction(wtx *txcache.WrappedTransaction) (canAddTx bool, canAddMore bool, tx *transaction.Transaction) { | |||
func (mbb *miniBlocksBuilder) checkAddTransaction(wtx *txcache.WrappedTransaction) (canAddTx bool, canAddMore bool, shouldAddToRemaining bool, tx *transaction.Transaction) { |
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.
description could be updated. Also a struct could be returned instead of 4 params.
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
} | ||
|
||
receiverShardID := wtx.ReceiverShardID | ||
miniBlock, ok := mbb.miniBlocks[receiverShardID] | ||
if !ok { | ||
log.Debug("mini block is not created", "shard", receiverShardID) | ||
return false, true, tx | ||
return false, true, false, tx |
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 this not be processed in the scheduledTxs?
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.
Actually this check is also done in scheduled, so it will not pass also there. Anyway this error could not appear as in the init method all the miniblocks combination are created: 0->0, 0->1, 0->2 and 0->meta