Fix mempool sync#3725
Conversation
xdustinface
left a comment
There was a problem hiding this comment.
ACK for the idea :) But still have some questions/thoughts.. Actually i like the idea of giving the mempool its own asset but im not sure if it makes a lot sense to introduce the overhead which comes with it (at least with the current implementation) its not a huge overhead but if it makes no sense we probably shouldn't? :D. I guess it would make sense if we would wait for some "mempool sync done" trigger or if we would wait at least X seconds for the MASTERNODE_SYNC_MEMPOOL to do something but with the implementation of this PR it just instantly tries to switch over to MASTERNODE_SYNC_GOVERNANCE in the same tick where it switches from MASTERNODE_SYNC_BLOCKCHAIN into MASTERNODE_SYNC_MEMPOOL? Please correct me if i missed something. If i didn't, wouldn't then something like 60192e4 not be good enough?
Also see comments attached below.
Make sure the mempool sync requests only happen after the blockchain sync is done.
620c481 to
6864cee
Compare
6a42ceb to
6864cee
Compare
* masternode: Fix mempool sync Make sure the mempool sync requests only happen after the blockchain sync is done. * Refactor Loop only if `-syncmempool`=true, make `if` a bit more readable Co-authored-by: xdustinface <xdustinfacex@gmail.com>
* masternode: Fix mempool sync Make sure the mempool sync requests only happen after the blockchain sync is done. * Refactor Loop only if `-syncmempool`=true, make `if` a bit more readable Co-authored-by: xdustinface <xdustinfacex@gmail.com>
Currently mempool sync isn't quite helpful because we ask for it while still syncing the chain and mempool might look completely different by the time we finish syncing blocks. This PR ensures we do it at the right time.
(build fails because of the issue fixed by #3724 , will rebase later)