-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: remove dependency of llmq/chainlocks, llmq/quorum_block_processor, ehf_signals on PeerManager #6292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove dependency of llmq/chainlocks, llmq/quorum_block_processor, ehf_signals on PeerManager #6292
Conversation
b3fc5f6 to
5e489bc
Compare
src/llmq/dkgsessionhandler.cpp
Outdated
| auto inv_opt = quorumBlockProcessor.AddMineableCommitment(fqc); | ||
| if (inv_opt.has_value()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could combine
src/llmq/ehf_signals.cpp
Outdated
| // skip deployments that do not use dip0023 or that have already been mined | ||
| if (!deployment.useEHF || ehfSignals.find(deployment.bit) != ehfSignals.end()) continue; | ||
|
|
||
| MNHFTxPayload mnhfPayload; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
595c4cd this commit shouldn't be included here? If it's a fix? I'm confused by it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally LGTM, don't love 5e489bc feels like it makes struct MessageProcessingResult too complicated
|
This pull request has conflicts, please rebase. |
…r dependency over PeerManager
5e489bc to
5739e77
Compare
5739e77 to
32683b3
Compare
1st force-push to resolve conflict
2nd force-push to address comments |
|
build fails |
32683b3 to
ebff21f
Compare
ebff21f to
d0f1778
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK d0f1778
| } | ||
|
|
||
| void CChainLocksHandler::HandleNewRecoveredSig(const llmq::CRecoveredSig& recoveredSig) | ||
| MessageProcessingResult CChainLocksHandler::HandleNewRecoveredSig(const llmq::CRecoveredSig& recoveredSig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused, this method doesn't doesn't return any error values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HandleNewRecoveredSig is override of interface method
[[nodiscard]] virtual MessageProcessingResult HandleNewRecoveredSig(const CRecoveredSig& recoveredSig) = 0;
which belongs to CRecoveredSigsListener.
Some classes which implements CRecoveredSigsListener has errors to return, some - doesn't. See other commits, for example: https://github.com/dashpay/dash/pull/6292/files/#diff-f7c0d20797337d77a9cfbf40c4f627ec68ed5a12e2f1193fa91c32cf285d9e34R526 - returns MisbehavingError when ProcessNewChainlock or https://github.com/dashpay/dash/pull/6292/files/#diff-93616b1f609ab7dc32d07bcdd3de3611d59bb285cbd6dba5a3bc5b4c70e6c867R131 - return TX
| } | ||
|
|
||
| void CEHFSignalsHandler::HandleNewRecoveredSig(const CRecoveredSig& recoveredSig) | ||
| MessageProcessingResult CEHFSignalsHandler::HandleNewRecoveredSig(const CRecoveredSig& recoveredSig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same?
src/protocol.h
Outdated
| std::optional<CInv> m_inventory; | ||
| std::optional<CInv> m_to_erase; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confused what the difference is between these? maybe document this API a bit?
9cf789d to
c77216e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK c77216e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK c77216e
Issue being fixed or feature implemented
It reduces circular dependencies and simplify code.
What was done?
Removed circular dependency over PeerManager for llmq::QuorumBlockProcessor, llmq::CEhfSignals, llmq::ChainLocks, and several extra useful refactorings: see commits.
How Has This Been Tested?
Run
test/lint/lint-circular-dependencies.shBreaking Changes
N/A
Checklist: