Skip to content

Commit

Permalink
Unknown Updates Check (Raptor3um#372)
Browse files Browse the repository at this point in the history
* Fixed unknown rules check.  Minor typo cleanup.

* Removed debugging work.

* debug cleanup
  • Loading branch information
CodeIsTheKey authored Apr 20, 2024
1 parent cd0c1c6 commit 0f25fe0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/llmq/quorums_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Consensus {
LLMQ_NONE = 0xFF,
LLMQ_INVALID = 0x00, // Do not use - flag to indicate new serialization
LLMQ_50_60 = 1, // 50 members, 30 (60%) threshold, one per hour
LLMQ_400_60 = 2, // 400 members, 240 (60%) threshols, one every 12 hours
LLMQ_400_60 = 2, // 400 members, 240 (60%) threshold, one every 12 hours
LLMQ_400_85 = 3, // 400 members, 340 (85%) threshold, one every 24 hours
LLMQ_100_67 = 4, // 100 members, 67 (67%) threshold, one per hour

Expand Down
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,7 @@ void CConnman::ThreadSocketHandler() {
int64_t nLastCleanupNodes = 0;

while (!interruptNet) {
// Handle sockets before we do the next rounf of disconnects. This allows us to flush send buffers one last time
// Handle sockets before we do the next round of disconnects. This allows us to flush send buffers one last time
// before actually closing sockets. Receiving is however skipped in case a peer is pending to be disconnected
SocketHandler();
if (GetTimeMillis() - nLastCleanupNodes > 1000) {
Expand Down
4 changes: 2 additions & 2 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2843,7 +2843,7 @@ EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
const CBlockIndex *pindex = pindexNew;

uint32_t nExpectedVersion = Updates().ComputeBlockVersion(pindex);
if (pindexNew->nVersion != nExpectedVersion) {
if ((pindexNew->nVersion | nExpectedVersion) != nExpectedVersion) {
const std::string strWarning = strprintf(_("Warning: unknown new rules activated: Expected: 0x%08x, Actual: 0x%08x"), nExpectedVersion, pindexNew->nVersion);
AppendWarning(warningMessages, strWarning);
}
Expand All @@ -2852,7 +2852,7 @@ EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
for (int i = 0; i < 100 && pindex != nullptr; i++) {
nExpectedVersion = Updates().ComputeBlockVersion(pindex->pprev);
if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION &&
(pindex->nVersion & ~nExpectedVersion) != 0)
(pindex->nVersion | nExpectedVersion) != nExpectedVersion)
++nUpgraded;
pindex = pindex->pprev;
}
Expand Down

0 comments on commit 0f25fe0

Please sign in to comment.