mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Add ==
and !=
operators to CDeterministicMNState
This commit is contained in:
parent
8845d4f7d8
commit
fba4687581
@ -112,6 +112,28 @@ public:
|
||||
public:
|
||||
std::string ToString() const;
|
||||
void ToJson(UniValue& obj) const;
|
||||
|
||||
friend bool operator==(const CDeterministicMNState& a, const CDeterministicMNState& b)
|
||||
{
|
||||
return a.nRegisteredHeight == b.nRegisteredHeight
|
||||
&& a.nLastPaidHeight == b.nLastPaidHeight
|
||||
&& a.nPoSePenalty == b.nPoSePenalty
|
||||
&& a.nPoSeRevivedHeight == b.nPoSeRevivedHeight
|
||||
&& a.nPoSeBanHeight == b.nPoSeBanHeight
|
||||
&& a.nRevocationReason == b.nRevocationReason
|
||||
&& a.confirmedHash == b.confirmedHash
|
||||
&& a.confirmedHashWithProRegTxHash == b.confirmedHashWithProRegTxHash
|
||||
&& a.keyIDOwner == b.keyIDOwner
|
||||
&& a.pubKeyOperator == b.pubKeyOperator
|
||||
&& a.keyIDVoting == b.keyIDVoting
|
||||
&& a.addr == b.addr
|
||||
&& a.scriptPayout == b.scriptPayout
|
||||
&& a.scriptOperatorPayout == b.scriptOperatorPayout;
|
||||
}
|
||||
friend bool operator!=(const CDeterministicMNState& a, const CDeterministicMNState& b)
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
};
|
||||
typedef std::shared_ptr<CDeterministicMNState> CDeterministicMNStatePtr;
|
||||
typedef std::shared_ptr<const CDeterministicMNState> CDeterministicMNStateCPtr;
|
||||
|
Loading…
Reference in New Issue
Block a user