File tree 2 files changed +6
-1
lines changed
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
565
565
if (signHeight > chainActive.Height ()) {
566
566
return nullptr ;
567
567
}
568
- startBlock = chainActive[signHeight]->GetBlockHash ();
568
+ startBlock = chainActive[signHeight - SIGN_HEIGHT_OFFSET ]->GetBlockHash ();
569
569
}
570
570
571
571
auto quorums = quorumManager->ScanQuorums (llmqType, startBlock, poolSize);
Original file line number Diff line number Diff line change @@ -104,6 +104,11 @@ class CSigningManager
104
104
friend class CSigSharesManager ;
105
105
static const int64_t DEFAULT_MAX_RECOVERED_SIGS_AGE = 60 * 60 * 24 * 7 ; // keep them for a week
106
106
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
+
107
112
private:
108
113
CCriticalSection cs;
109
114
You can’t perform that action at this time.
0 commit comments