hotfix(db): fix the bug of data loss in mongo by 317787106 · Pull Request #5031 · tronprotocol/java-tron
What does this PR do?
Fix the bug of data loss in mongo when mongo event plugin is enabled.
Why are these changes required?
Sometimes, LATEST_SOLIDIFIED_BLOCK_NUM in LevelDB doesn't grow by just one, it might grow larger than one, but we only write the last block into mongo, therefore some blocks are not written into mongo.
This PR has been tested by:
- Unit Tests
- Manual Testing
Follow up
Extra details