| 916 | } |
| 917 | |
| 918 | bool SelectMasternodePayee(CScript& payeeScript) { |
| 919 | bool result = false; |
| 920 | if (MasternodePaymentsEnabled()) { |
| 921 | //spork |
| 922 | if (!masternodePayments.GetBlockPayee(chainActive.Height() + 1, payeeScript)) { |
| 923 | int winningNode = GetCurrentMasterNode(1); |
| 924 | if (winningNode >= 0) { |
| 925 | payeeScript = GetScriptForDestination(vecMasternodes[winningNode].pubkey.GetID()); |
| 926 | result = true; |
| 927 | } else { |
| 928 | LogPrintf("%s: Failed to detect masternode to pay\n", __func__); |
| 929 | } |
| 930 | } |
| 931 | } |
| 932 | return result; |
| 933 | } |
no test coverage detected