Pre MN Pool Block creation Fixed
@@ -521,7 +521,18 @@ Value getblocktemplate(const Array& params, bool fHelp)
result.push_back(Pair("bits", HexBits(pblock->nBits)));
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
+
// ---- Masternode info ---
+
+ bool bMasternodePayments = false;
+
+ if(fTestNet){
+ if(pindexPrev->nHeight+1 >= BLOCK_START_MASTERNODE_PAYMENTS_TESTNET) bMasternodePayments = true;
+ } else {
+ if(pindexPrev->nHeight+1 >= BLOCK_START_MASTERNODE_PAYMENTS) bMasternodePayments = true;
+ }
+ if(fDebug) { printf("GetBlockTemplate(): Masternode Payments : %i\n", bMasternodePayments); }
+ if(payee != CScript() && bMasternodePayments){
if(!masternodePayments.GetBlockPayee(pindexPrev->nHeight+1, payee)){
//no masternode detected
int winningNode = GetCurrentMasterNode(1);
@@ -540,15 +551,6 @@ Value getblocktemplate(const Array& params, bool fHelp)
}
}
- bool bMasternodePayments = false;
-
- if(fTestNet){
- if(pindexPrev->nHeight+1 >= BLOCK_START_MASTERNODE_PAYMENTS_TESTNET) bMasternodePayments = true;
- } else {
- if(pindexPrev->nHeight+1 >= BLOCK_START_MASTERNODE_PAYMENTS) bMasternodePayments = true;
- }
- if(fDebug) { printf("GetBlockTemplate(): Masternode Payments : %i\n", bMasternodePayments); }
- if(payee != CScript()){
CTxDestination address1;
ExtractDestination(payee, address1);
CBitcoinAddress address2(address1);
