-
Notifications
You must be signed in to change notification settings - Fork 114
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
Pruning Tests and Bug Fixes #1132
Conversation
47d415a
to
f22f114
Compare
791d086
to
1ac3547
Compare
@@ -512,10 +512,6 @@ public void flush() { | |||
db.commit(); | |||
} | |||
} | |||
} else { |
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.
What scenario we will see the databaseGroup equal to null ? Sometimes We can see this message during the seednode running, also the project test case.
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.
The databaseGroup is null when using a repository snapshot. The snapshot is always used when importing a side chain block. The message is really useless, cause it doesn't notify us of anything meaningful.
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.
LGTM, only one question for the databasegroup null case.
return null; | ||
} else { | ||
StakingBlock blockTemplate; | ||
blockTemplateLock.lock(); | ||
try { | ||
blockTemplate = blockchain.createStakingBlockTemplate( | ||
mempool.getPendingTransactions(), signingPublicKey, newSeed, coinbase); | ||
blockTemplate = blockchain.createStakingBlockTemplate(best, mempool.getPendingTransactions(), signingPublicKey, newSeed, coinbase); |
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.
Should we just use blockTemplateLock and the try...finally to include all of the method?
Same as the getMiningBlockTemplate
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.
I added an extra commit for this change.
These are accounts for producing transactions that are not involved in staking.
JournalPruneDataSource already rolls back the side chain blocks.
The staking blocks were always created on top of the best block. This is a valid setup for the staker tools but it prevents testing the functionality with side chains. Additionally, this is a bug fix for AionHub. The hub could cause incorrect block creation due to the fact that it was calling the getBestBlock method in the blockchain twice without synchronization. This bug fix may relate to AKI-657.
The test is ignored for now pending the fix for AKI-677.
388ae1e
to
ee8c73b
Compare
Type of change