From ee74f78c273b1d8a6288267082b335cc63d4c5f7 Mon Sep 17 00:00:00 2001 From: "James C. Owens" Date: Sun, 1 Oct 2023 14:18:55 -0400 Subject: [PATCH] Implement missing block version checks in AcceptBlock for v13. --- src/validation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/validation.cpp b/src/validation.cpp index ee78d93bf5..5500005648 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1934,6 +1934,7 @@ bool AcceptBlock(CBlock& block, bool generated_by_me) EXCLUSIVE_LOCKS_REQUIRED(c || (IsV10Enabled(nHeight) && block.nVersion < 10) || (IsV11Enabled(nHeight) && block.nVersion < 11) || (IsV12Enabled(nHeight) && block.nVersion < 12) + || (IsV13Enabled(nHeight) && block.nVersion < 13) ) { return block.DoS(20, error("%s: reject too old nVersion = %d", __func__, block.nVersion)); } else if ((!IsProtocolV2(nHeight) && block.nVersion >= 7) @@ -1942,6 +1943,7 @@ bool AcceptBlock(CBlock& block, bool generated_by_me) EXCLUSIVE_LOCKS_REQUIRED(c || (!IsV10Enabled(nHeight) && block.nVersion >= 10) || (!IsV11Enabled(nHeight) && block.nVersion >= 11) || (!IsV12Enabled(nHeight) && block.nVersion >= 12) + || (!IsV13Enabled(nHeight) && block.nVersion >= 13) ) { return block.DoS(100, error("%s: reject too new nVersion = %d", __func__, block.nVersion)); }