From 0810bcce3856bcf69c675d243d51555fdd47e970 Mon Sep 17 00:00:00 2001 From: Peter John Bushnell Date: Fri, 20 May 2022 16:21:38 +0100 Subject: [PATCH] Fix issue with Gov var height (#1253) --- configure.ac | 2 +- src/validation.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 9e218cf6e4..0c6c7a7fd4 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 2) define(_CLIENT_VERSION_MINOR, 7) -define(_CLIENT_VERSION_REVISION, 0) +define(_CLIENT_VERSION_REVISION, 1) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) diff --git a/src/validation.cpp b/src/validation.cpp index d275c7d76e..b359e405fb 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2845,8 +2845,8 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl CCustomCSView govCache(cache); // Add to existing ATTRIBUTES instead of overwriting. if (var->GetName() == "ATTRIBUTES") { - auto govVar = mnview.GetVariable(var->GetName()); - if (govVar->Import(var->Export()) && govVar->Validate(govCache) && govVar->Apply(govCache, pindex->nHeight) && govCache.SetVariable(*var)) { + auto govVar = mnview.GetAttributes(); + if (govVar->Import(var->Export()) && govVar->Validate(govCache) && govVar->Apply(govCache, pindex->nHeight) && govCache.SetVariable(*govVar)) { govCache.Flush(); } } else if (var->Validate(govCache) && var->Apply(govCache, pindex->nHeight) && govCache.SetVariable(*var)) {