Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the changes and the related issue.
NOTE: The process is the following:
dev
branch.dev
, we will merge it totestnet
for tests, and then intomain
for final release.Fixes # (issue)
Type of change
Please select the right one.
Which part is impacted ?
Checklist:
License
I'm am contributing & releasing the code under DERO Research License (which can be found here).
Summary
This pull request is a fix for issue #118 (also related to TradeOgre deposit issues)
When syncing into a side block, at least 2 entries are removed from the history instead of only one entry. An "out of range" error occurs and the sync loop terminates.
1 entry is skipped, but 2 are removed from the history (from 74160 to 74158 entries)
Twice as many entries as necessary are always deleted.
The entries 74159, 74160 and the failed sync of entry 74161 disappear until the wallet balance changes again.
There are many coinbase rewards for this example wallet. It took only 7 minutes for the balance to change again.
In certain circumstances, the removed entries won't be restored, particularly if the transaction of the last entry involved more than one transfer.
Here is an example after the fix is applied. 8 transfers in block 2980293 were removed due to an orphaned block and re-synced in the same sync loop run.