File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1038,15 +1038,16 @@ bool CTxLockVote::IsValid(CNode* pnode, CConnman& connman) const
1038
1038
}
1039
1039
1040
1040
// Verify that masternodeProTxHash belongs to the same MN referred by the collateral
1041
- // Only v13 nodes will send us locks with this field set, and only after spork15 activation
1041
+ // This is a leftover from the legacy non-deterministic MN list where we used the collateral to identify MNs
1042
+ // TODO eventually remove the collateral from CTxLockVote
1042
1043
if (!masternodeProTxHash.IsNull ()) {
1043
- masternode_info_t mnInfo ;
1044
- if (!mnodeman. GetMasternodeInfo (masternodeProTxHash, mnInfo) || mnInfo. outpoint != outpointMasternode) {
1044
+ auto dmn = mnList. GetValidMN (masternodeProTxHash) ;
1045
+ if (!dmn || dmn-> collateralOutpoint != outpointMasternode) {
1045
1046
LogPrint (" instantsend" , " CTxLockVote::IsValid -- invalid masternodeProTxHash %s\n " , masternodeProTxHash.ToString ());
1046
1047
return false ;
1047
1048
}
1048
- } else if (deterministicMNManager-> IsDIP3Active ()) {
1049
- LogPrint (" instantsend" , " CTxLockVote::IsValid -- missing masternodeProTxHash while DIP3 is active \n " );
1049
+ } else {
1050
+ LogPrint (" instantsend" , " CTxLockVote::IsValid -- missing masternodeProTxHash\n " );
1050
1051
return false ;
1051
1052
}
1052
1053
You can’t perform that action at this time.
0 commit comments