MCPcopy Create free account
hub / github.com/LUX-Core/lux / SignaturesValid

Method SignaturesValid

src/instantx.cpp:516–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514
515
516bool CTransactionLock::SignaturesValid() {
517
518 for (CConsensusVote vote : vecConsensusVotes) {
519 int n = GetMasternodeRank(vote.vinMasternode, vote.nBlockHeight, MIN_PROTO_VERSION);
520
521 if (n == -1) {
522 LogPrintf("InstantX::DoConsensusVote - Unknown Masternode\n");
523 return false;
524 }
525
526 if (n > INSTANTX_SIGNATURES_TOTAL) {
527 LogPrintf("InstantX::DoConsensusVote - Masternode not in the top %s\n", INSTANTX_SIGNATURES_TOTAL);
528 return false;
529 }
530
531 if (!vote.SignatureValid()) {
532 LogPrintf("InstantX::CTransactionLock::SignaturesValid - Signature not valid\n");
533 return false;
534 }
535 }
536
537 return true;
538}
539
540void CTransactionLock::AddSignature(CConsensusVote& cv) {
541 vecConsensusVotes.push_back(cv);

Callers

nothing calls this directly

Calls 2

GetMasternodeRankFunction · 0.85
SignatureValidMethod · 0.45

Tested by

no test coverage detected