Changeset View
Changeset View
Standalone View
Standalone View
src/script/sighashtype.h
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | public: | ||||
template <typename Stream> void Serialize(Stream &s) const { | template <typename Stream> void Serialize(Stream &s) const { | ||||
::Serialize(s, getRawSigHashType()); | ::Serialize(s, getRawSigHashType()); | ||||
} | } | ||||
template <typename Stream> void Unserialize(Stream &s) { | template <typename Stream> void Unserialize(Stream &s) { | ||||
::Unserialize(s, sigHash); | ::Unserialize(s, sigHash); | ||||
} | } | ||||
/** | |||||
* Handy operators. | |||||
*/ | |||||
friend constexpr bool operator==(const SigHashType &a, | |||||
const SigHashType &b) { | |||||
return a.sigHash == b.sigHash; | |||||
} | |||||
friend constexpr bool operator!=(const SigHashType &a, | |||||
const SigHashType &b) { | |||||
return !(a == b); | |||||
} | |||||
}; | }; | ||||
#endif // BITCOIN_SCRIPT_SIGHASHTYPE_H | #endif // BITCOIN_SCRIPT_SIGHASHTYPE_H |