]> Git Repo - VerusCoin.git/commitdiff
Staking printout
authormiketout <[email protected]>
Sat, 15 Dec 2018 10:47:21 +0000 (02:47 -0800)
committermiketout <[email protected]>
Sat, 15 Dec 2018 10:47:21 +0000 (02:47 -0800)
src/miner.cpp

index 03a0b551dc171e0ce461c4056785e7c87cefbc90..e580266f4e9abc03d09689af457563b36d084b77 100644 (file)
@@ -1038,6 +1038,8 @@ void static VerusStaker(CWallet *pwallet)
     } while (pindexPrev != pindexCur);
 
     try {
+        static int32_t lastStakingHeight = 0;
+
         while (true)
         {
             waitForPeers(chainparams);
@@ -1045,13 +1047,19 @@ void static VerusStaker(CWallet *pwallet)
 
             // Create new block
             unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
+
             if ( Mining_height != pindexPrev->GetHeight()+1 )
             {
-                printf("Staking height %d for %s\n", pindexPrev->GetHeight() + 1, ASSETCHAINS_SYMBOL);
                 Mining_height = pindexPrev->GetHeight()+1;
                 Mining_start = (uint32_t)time(NULL);
             }
 
+            if ( Mining_height != lastStakingHeight )
+            {
+                printf("Staking height %d for %s\n", Mining_height, ASSETCHAINS_SYMBOL);
+                lastStakingHeight = Mining_height;
+            }
+
             // Check for stop or if block needs to be rebuilt
             boost::this_thread::interruption_point();
 
This page took 0.028394 seconds and 4 git commands to generate.