Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce founder payout to 10% from block 2000 #8

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ bool CTransaction::CheckTransaction(CValidationState &state, uint256 hashTx, boo

// Check for founders inputs
if ((nHeight > 0) && (nHeight < 210000)) {
int64 founder_coins = nHeight < 2000 ? 2 : 1;

bool found_1 = false;
bool found_2 = false;
Expand Down Expand Up @@ -659,19 +660,19 @@ bool CTransaction::CheckTransaction(CValidationState &state, uint256 hashTx, boo
}

BOOST_FOREACH(const CTxOut& output, vout) {
if (output.scriptPubKey == FOUNDER_1_SCRIPT && output.nValue == (int64)(2 * COIN)) {
if (output.scriptPubKey == FOUNDER_1_SCRIPT && output.nValue == (int64)(founder_coins * COIN)) {
found_1 = true;
}
if (output.scriptPubKey == FOUNDER_2_SCRIPT && output.nValue == (int64)(2 * COIN)) {
if (output.scriptPubKey == FOUNDER_2_SCRIPT && output.nValue == (int64)(founder_coins * COIN)) {
found_2 = true;
}
if (output.scriptPubKey == FOUNDER_3_SCRIPT && output.nValue == (int64)(2 * COIN)) {
if (output.scriptPubKey == FOUNDER_3_SCRIPT && output.nValue == (int64)(founder_coins * COIN)) {
found_3 = true;
}
if (output.scriptPubKey == FOUNDER_4_SCRIPT && output.nValue == (int64)(2 * COIN)) {
if (output.scriptPubKey == FOUNDER_4_SCRIPT && output.nValue == (int64)(founder_coins * COIN)) {
found_4 = true;
}
if (output.scriptPubKey == FOUNDER_5_SCRIPT && output.nValue == (int64)(2 * COIN)) {
if (output.scriptPubKey == FOUNDER_5_SCRIPT && output.nValue == (int64)(founder_coins * COIN)) {
found_5 = true;
}
}
Expand Down Expand Up @@ -5708,6 +5709,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)

// To founders and investors
if ((pindexBest->nHeight+1 > 0) && (pindexBest->nHeight+1 < 210000)) {
int64 founder_coins = pindexBest->nHeight+1 < 2000 ? 2 : 1;

// Take some reward away from us
txNew.vout[0].nValue = -10 * COIN;
Expand Down Expand Up @@ -5735,11 +5737,11 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
}

// And give it to the founders
txNew.vout.push_back(CTxOut(2 * COIN, CScript(FOUNDER_1_SCRIPT.begin(), FOUNDER_1_SCRIPT.end())));
txNew.vout.push_back(CTxOut(2 * COIN, CScript(FOUNDER_2_SCRIPT.begin(), FOUNDER_2_SCRIPT.end())));
txNew.vout.push_back(CTxOut(2 * COIN, CScript(FOUNDER_3_SCRIPT.begin(), FOUNDER_3_SCRIPT.end())));
txNew.vout.push_back(CTxOut(2 * COIN, CScript(FOUNDER_4_SCRIPT.begin(), FOUNDER_4_SCRIPT.end())));
txNew.vout.push_back(CTxOut(2 * COIN, CScript(FOUNDER_5_SCRIPT.begin(), FOUNDER_5_SCRIPT.end())));
txNew.vout.push_back(CTxOut(founder_coins * COIN, CScript(FOUNDER_1_SCRIPT.begin(), FOUNDER_1_SCRIPT.end())));
txNew.vout.push_back(CTxOut(founder_coins * COIN, CScript(FOUNDER_2_SCRIPT.begin(), FOUNDER_2_SCRIPT.end())));
txNew.vout.push_back(CTxOut(founder_coins * COIN, CScript(FOUNDER_3_SCRIPT.begin(), FOUNDER_3_SCRIPT.end())));
txNew.vout.push_back(CTxOut(founder_coins * COIN, CScript(FOUNDER_4_SCRIPT.begin(), FOUNDER_4_SCRIPT.end())));
txNew.vout.push_back(CTxOut(founder_coins * COIN, CScript(FOUNDER_5_SCRIPT.begin(), FOUNDER_5_SCRIPT.end())));

}

Expand Down