Skip to content

Better handle removing of fully confirmed IS locks#2836

Merged
codablock merged 5 commits intodashpay:developfrom
codablock:pr_is_removeconfirmed
Apr 5, 2019
Merged

Better handle removing of fully confirmed IS locks#2836
codablock merged 5 commits intodashpay:developfrom
codablock:pr_is_removeconfirmed

Conversation

@codablock
Copy link

This makes CInstantSendManager track in which block an IS locked transaction was mined and then uses this information to find IS locks to remove when blocks get sufficiently confirmed (via ChainLocks or 6 confs if CL is disabled).

This solves 2 issues:

  1. While iterating the confirmed blocks, we used ReadBlockFromDisk to gather the included TXs and find the IS locks. This is quite slow.
  2. We used the last ChainLock to figure out when to stop iteration. This however means that the first iteration will run down to genesis, causing a hang. It was even worse with 1. combined.

This PR also fixes an issue with wallet transactions not being properly updated when IS locks were removed.

Testing this PR is a bit harder atm as the current develop branch disconnects most 0.14 nodes due to invalid IS locks. This is due to the changes/fixes found in #2833. To test this PR, you'll have to locally revert #2833: git revert -m1 20ec1de4c68392a51b7f4b51e0617e89df87a539

@codablock codablock added this to the 14.0 milestone Apr 5, 2019
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
utACK

@codablock codablock merged commit 1caee15 into dashpay:develop Apr 5, 2019
@codablock codablock deleted the pr_is_removeconfirmed branch April 5, 2019 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants