Further TierTwo init encapsulation, '-evodir' resync bugfix and more circ dependencies fixes#2735
Conversation
…ctions. Plus clean function further.
…ster to tiertwo/init.cpp
f9d4974 to
57f25ee
Compare
|
rebased, ready to go. |
Fuzzbawls
left a comment
There was a problem hiding this comment.
One minor nit, and one observational nit, otherwise its a functional ACK from me
| const uint256 collateralHash = uint256S(strTxHash); | ||
| int collateralOutputIndex; | ||
| try { | ||
| collateralOutputIndex = std::stoi(strOutputIndex.c_str()); |
There was a problem hiding this comment.
nit: new introduction of a locale-dependent function
nit because this is both temporary code given the upcoming DMNs feature, and i've got a local branch to refactor this addition so as to eliminate this (and other) locale-dependent function usages revolving around the output index of MNs.
We currently don't have a linter for locale-dependent functions, so I'm not asking for a change here, just commenting to point it out for my own purposes. If anything, could add a TODO: comment if you so choose.
There was a problem hiding this comment.
Isn't a new addition actually, just moved the code from wallet.cpp to masternode.cpp. It's coming from CWallet::GetMasternodeVinAndKeys.
And yep, all what is inside masternode.cpp will be removed. The new GetMasternodeVinAndKeys will be used equally for legacy and deterministic Masternodes. This was a small decoupling coming from the DMN GUI branch.
57f25ee to
4e14d21
Compare
|
updated, "evo" -> "evodb" logging string. |
* Move ChainLock signing into TrySignChainTip and call it periodically * Cheaper/Faster bailout from TrySignChainTip when already signed before
901976a Stop tracking interested/participating nodes and send/announce to MNAUTH peers (#2798) (Alexander Block) 59dfdc2 update bestChainLockWithKnownBlock in AcceptedBlockHeader (Alessandro Rezzi) bd0a3f8 Introduce "qsendrecsigs" to indicate that plain recovered sigs should be sent (#2783) (Alexander Block) 846fd9a Make LLMQ/InstantSend/ChainLocks code less spammy (#2781) (Alexander Block) 1a52ad0 Fix LogPrintf call in ::DoInvalidateBlock (Alessandro Rezzi) e3c5eef Multiple fixes/refactorings for ChainLocks (#2765) (Alexander Block) 9dda5d2 Implement LLMQ based InstantSend (#2735) (Alexander Block) 149e3e3 Various small cleanups (#2761) (UdjinM6) cc7450d Use ReleaseNodeVector and CopyNodeVector in PIVX specific code (Alessandro Rezzi) ed463a6 Do not hold cs_vNodes in CSigSharesManager::SendMessages() for too long (#2758) (UdjinM6) cd1809f Implement persistence for LLMQ based InstantSend (#2756) (Alexander Block) 924ee8f Don't be too harsh for invalid CLSIGs (#2742) (Alexander Block) f255314 Fix banning when local node doesn't have the vvec (#2739) (Alexander Block) Pull request description: each commit backports a different PR. The PR number is in the commit message. There are also 3 extra (trivial) commits added by me ACKs for top commit: 901976a Duddino: utACK 901976a Liquid369: uTACK 901976a Tree-SHA512: 70b53ae3fc014c23964cae3452f6c8270d96b3b375c0f172e04039ba6f3b537d56c38677e5e4005c8b810a82b447a64fc978c2d63344b9e9736ceff7db162a18
Built on top of #2721, decoupled from the DMN GUI branch.
Focused on the following points:
masternodeconfigduplicated initialization insidetiertwo/init.cpp. Same for thepEvoNotificationInterfaceclass.CWallet::GetMasternodeVinAndKeysandCWallet::GetVinAndKeysFromOutputfunctions.-resync.--> "masternode -> wallet/wallet -> masternode"
--> "chain -> legacy/stakemodifier -> stakeinput -> wallet/wallet -> evo/deterministicmns -> chain"
Next PR will be exclusively focused on the new tier two module.