File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -565,7 +565,7 @@ CQuorumCPtr CSigningManager::SelectQuorumForSigning(Consensus::LLMQType llmqType
565565 if (signHeight > chainActive.Height ()) {
566566 return nullptr ;
567567 }
568- startBlock = chainActive[signHeight]->GetBlockHash ();
568+ startBlock = chainActive[signHeight - SIGN_HEIGHT_OFFSET ]->GetBlockHash ();
569569 }
570570
571571 auto quorums = quorumManager->ScanQuorums (llmqType, startBlock, poolSize);
Original file line number Diff line number Diff line change @@ -104,6 +104,11 @@ class CSigningManager
104104 friend class CSigSharesManager ;
105105 static const int64_t DEFAULT_MAX_RECOVERED_SIGS_AGE = 60 * 60 * 24 * 7 ; // keep them for a week
106106
107+ // when selecting a quorum for signing and verification, we use CQuorumManager::SelectQuorum with this offset as
108+ // starting height for scanning. This is because otherwise the resulting signatures would not be verifiable by nodes
109+ // which are not 100% at the chain tip.
110+ static const int SIGN_HEIGHT_OFFSET = 8 ;
111+
107112private:
108113 CCriticalSection cs;
109114
You can’t perform that action at this time.
0 commit comments