dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

feat: update IS database instantly, no more dependency on DIP0020 #6394

Closed knst closed 5 days ago

knst commented 6 days ago

Issue being fixed or feature implemented

Upgrade of IS database depends on activation of DIP0020. It's no more need because it is activated long time ago.

What was done?

Removed dependency of IS database upgrade on DIP0020. Also removed LOCK for ::mempool.cs which is not actually has been used inside GetTransaction during upgrade: no mempool -- no lock.

How Has This Been Tested?

Run unit and functional tests.

Breaking Changes

N/A

Checklist:

UdjinM6 commented 6 days ago

It's probably safe to just drop CInstantSendDb::Upgrade() completely

knst commented 6 days ago

It's probably safe to just drop CInstantSendDb::Upgrade() completely

It's easier to migrate than ask to reindex, I think. Is there are good API to tell that we need to reindex? I think it's easy only from init.cpp

UdjinM6 commented 6 days ago

Good point re potential garbage leftover but we don't have to reindex because 1) unlike evodb isdb is a temporary one, can be dropped at any point and 2) pre-dip0020 IS locks are irrelevant now, we can ignore them

Check ~ada5948aff~ b6c8844d56 (made a typo in commit title 🙈)