From 46342b2e8a46d7c437258527efd451472ff0a359 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Tue, 17 Oct 2017 19:41:43 +0300 Subject: [PATCH] update nCollateralMinConfBlockHash for local (hot) masternode on mn start (#1689) --- src/activemasternode.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp index dbe40f645..02808dc14 100644 --- a/src/activemasternode.cpp +++ b/src/activemasternode.cpp @@ -308,6 +308,12 @@ void CActiveMasternode::ManageStateLocal(CConnman& connman) return; } + { + LOCK(cs_main); + // remember the hash of the block where masternode collateral had minimum required confirmations + mnb.nCollateralMinConfBlockHash = chainActive[GetUTXOHeight(outpoint) + Params().GetConsensus().nMasternodeMinimumConfirmations - 1]->GetBlockHash(); + } + fPingerEnabled = true; nState = ACTIVE_MASTERNODE_STARTED;