governance: Fix signature check in CGovernanceObject::Sign (#3973)

This commit is contained in:
dustinface 2021-02-01 16:23:58 +01:00 committed by GitHub
parent 7c5710f64b
commit edc286be46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -305,7 +305,7 @@ void CGovernanceObject::SetMasternodeOutpoint(const COutPoint& outpoint)
bool CGovernanceObject::Sign(const CBLSSecretKey& key) bool CGovernanceObject::Sign(const CBLSSecretKey& key)
{ {
CBLSSignature sig = key.Sign(GetSignatureHash()); CBLSSignature sig = key.Sign(GetSignatureHash());
if (!key.IsValid()) { if (!sig.IsValid()) {
return false; return false;
} }
sig.GetBuf(vchSig); sig.GetBuf(vchSig);