From 186699abff45860774487ef81e686b984a50621c Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Wed, 4 Feb 2015 08:24:34 -0700 Subject: [PATCH] Masternode payment improvements / release notes --- doc/release-notes/release-notes-0.11.1.md | 3 +++ src/masternode.cpp | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/release-notes/release-notes-0.11.1.md b/doc/release-notes/release-notes-0.11.1.md index 69a281dde..34cddc9ed 100644 --- a/doc/release-notes/release-notes-0.11.1.md +++ b/doc/release-notes/release-notes-0.11.1.md @@ -16,6 +16,8 @@ and a new version of enforcement compatible with the newer Bitcoin architechure. - Added --instantxdepth, which will show X confirmations when a transaction lock is present - fix coin control crash https://github.com/bitcoin/bitcoin/pull/5700 - always get only confirmed coins by AvailableCoins for every DS relative action +- New languages supported Portuguese, German, Russian, Polish, Spanish, Vietnamese, French, +Italian, Catalan, Chinese, Danish, Finnish, Swedish, Czech, Turkish and Bavarian (and many more) Thanks to who contributed to this release, at least: @@ -23,6 +25,7 @@ Thanks to who contributed to this release, at least: - Vertoe - Udjin - Holger Schinzel +- Raze - Mario Müller - Crowning - Alexandre Devilliers diff --git a/src/masternode.cpp b/src/masternode.cpp index 2b2aa7392..c06d99319 100644 --- a/src/masternode.cpp +++ b/src/masternode.cpp @@ -717,6 +717,7 @@ void CMasternodePayments::CleanPaymentList() bool CMasternodePayments::ProcessBlock(int nBlockHeight) { + if(!enabled) return false; CMasternodePaymentWinner winner; @@ -749,7 +750,13 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight) break; } - if(winner.nBlockHeight == 0) return false; //no masternodes available + //if we can't find someone to get paid, pick randomly + if(winner.nBlockHeight == 0 && vecMasternodes.size() > 1) { + winner.score = 0; + winner.nBlockHeight = nBlockHeight; + winner.vin = vecMasternodes[0].vin; + winner.payee.SetDestination(vecMasternodes[0].pubkey.GetID()); + } if(Sign(winner)){ if(AddWinningMasternode(winner)){