-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vn scanning): only scan since last scan and restart accepted cont…
…racts (#4252) Description --- The VN was starting the scanning from the genesis block because it had no mechanism for restarting already accepted contracts when restarting the VN. To fix this we're recording all the contracts we're a part of and their states. Already accepted contracts will persist their constitution properties for reference when restarting the side chain later on. Additionally we're storing the last scanned block information so we can restart scanning from the place you left off. I've removed the block height interval check. It seemed useless when we're using a sleep interval and may at some point cause us to miss a contract if it was done under very short expiry times. Motivation and Context --- The VN is getting better with how it's managing everything but restarts caused problems that we can now solve via global db. How Has This Been Tested? --- Integration tests still pass (although we could now validate the stored state of found contracts) Manually
- Loading branch information
Showing
8 changed files
with
198 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.