governance: add threading annotations, add default values, adjust constructors#4465
governance: add threading annotations, add default values, adjust constructors#4465PastaPastaPasta wants to merge 10 commits intodashpay:developfrom
Conversation
|
I don't understand these test failures... Help wanted :) |
4b39759 to
a01374a
Compare
UdjinM6
left a comment
There was a problem hiding this comment.
mac build fails https://gitlab.com/dashpay/dash/-/jobs/1631527804
a01374a to
97c3c7a
Compare
|
We'll see how the mac build likes that. Pay special attention to 21abbc7 (will try to resolve todo in a near future PR), would like your feedback / ensure I'm not crazy when it comes to livecycles / saftey there |
|
This pull request has conflicts, please rebase. |
|
This pull request has conflicts, please rebase. |
|
rebased |
97c3c7a to
bcf64f9
Compare
|
I figured e80b67f would resolve these compilation errors, but I guess I'm missing something... |
|
This pull request has conflicts, please rebase. |
458532e to
8d5c586
Compare
Signed-off-by: pasta <[email protected]>
UdjinM6
left a comment
There was a problem hiding this comment.
mac build complains (werror) + see below
| void CGovernanceObject::UpdateLocalValidity() | ||
| { | ||
| LOCK(cs_main); | ||
| LOCK(cs); |
| return false; | ||
| } | ||
| if (fCheckCollateral && !IsCollateralValid(strError, fMissingConfirmations)) { | ||
| if (fCheckCollateral && !WITH_LOCK(cs_main, return IsCollateralValid(strError, fMissingConfirmations))) { |
| // RETRIEVE TRANSACTION IN QUESTION | ||
|
|
||
| if (!GetTransaction(nCollateralHash, txCollateral, Params().GetConsensus(), nBlockHash)) { | ||
| if (LOCK(cs); !GetTransaction(nCollateralHash, txCollateral, Params().GetConsensus(), nBlockHash)) { |
There was a problem hiding this comment.
- that's also a deadlock potentially
- cs should be held already as per
EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main)in .h, maybe addAssertLockHelds for both locks at the start of the method
| govobj.GetDataAsPlainString(), govobj.GetObjectType()); | ||
|
|
||
| if (govobj.GetObjectType() == GOVERNANCE_OBJECT_TRIGGER && !triggerman.AddNewTrigger(nHash)) { | ||
| if (govobj.GetObjectType() == GOVERNANCE_OBJECT_TRIGGER && !WITH_LOCK(governance.cs, return triggerman.AddNewTrigger(nHash))) { |
There was a problem hiding this comment.
for all governance.cs locks for triggerman here and below in this file - we hold cs already, no need to lock twice (I know you did this to silence werror probably but it feels like a wrong way to fix it)
|
This Pull Request may conflict if the Pull Requests below are merged first. #4649 |
|
This pull request has conflicts, please rebase. |
No description provided.