You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #7178: refactor: remove dependencies of CInstantSendManager on mempool, signer, chainstate
a98d36c fix: set cached tip for isman without validationinterface (Konstantin Akimov)
770819e fix: code review comment by pastaclaw (Konstantin Akimov)
0c6db64 refactor: review fixes for CInstantSendManager decoupling (UdjinM6)
2f47b9e refactor: removed unused includes (Konstantin Akimov)
17db40f refactor: drop dependency of CInstantSendManager on chainlocks (Konstantin Akimov)
f506a00 refactor: drop dependency of CInstantSendManager on llmq::CSigningManager (Konstantin Akimov)
843716a refactor: move usages sigman directly to NetInstantSend (Konstantin Akimov)
1e88ac3 refactor: drop helper interface InstantSendSignerParent (Konstantin Akimov)
9c84ed3 refactor: re-order clean-up calls for confirmed block for instant-send handling (Konstantin Akimov)
8d0a772 refactor: remove dependency of CInstantSendManager on signer (Konstantin Akimov)
9c0e03f refactor: remove dependency of CInstantSendManager on chainstate (Konstantin Akimov)
2a06aec refactor: use only cached height of tip, don't retrieve it directly ever (Konstantin Akimov)
32916a4 refactor: move ResolveBlockConflicts to NetInstantSend (Konstantin Akimov)
5937d78 refactor: move all notification handlers from CInstantSendManager to NetInstantSend (Konstantin Akimov)
7785d7c refactor: drop dependency of mempool from instantsend/instantsend (Konstantin Akimov)
654ba8a refactor: move usages of mempool from CInstantSendManager to NetInstantSend (Konstantin Akimov)
a469587 refactor: simplify ProcessInstantSendLock by using PeerManager on place instead of returning std::variant (Konstantin Akimov)
2c23869 refactor: move ProcessInstantSendLock to NetInstantSend (Konstantin Akimov)
Pull request description:
## Issue being fixed or feature implemented
Basically, CInstantSendManager's responsibility is remembering all known instant-send locks (by using `CInstantSendDb`) and it is used all over codebase to answer a question a basic but important question "Is transaction X locked?".
In details, there are 4 public interfaces that are used to answer that question:
- is transaction instant-send locked? `IsLocked`
- is transaction / IS lock known? `IsKnown`, `AlreadyHave`
- is instant-send enabled? (spork's related features, relevant for testnet & regtest only)
- get me IS lock! (`GetInstantSendLockByTxid`, `GetInstantSendLockByHash`).
In the reality, current implementation of CInstantSendManager has knowledges about multiple systems and components that are irrelevant, but not really needed to provide this base functionality.
## What was done?
Removed dependency of CInstantSendManager on `instantsend::InstantSendSigner`, `llmq::CSigningManager`, `CChainState`, `chainlock::Chainlocks`, `CTxMemPool`.
Removing dependency on CMasternodeSync is excluded from this PR because it requires bitcoin/bitcoin#25073 to be done first.
## How Has This Been Tested?
Run unit & functional tests, linters.
## Breaking Changes
N/A
## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
ACKs for top commit:
UdjinM6:
utACK a98d36c
Tree-SHA512: a03b843f20fa08d9771a66eb4a5273d0340f0072f6568914d703ef8a31643e14e157bdb03171499a38b84603a8ae6906e99610a9d0d18de93347c6eec5c03f46
0 commit comments