src/spork.cpp
// grab the spork, otherwise say it's off
grab the spork, otherwise say it's off
grab the spork otherwise say it ' s off
bool IsSporkActive(int nSporkID)
{
    int64_t r = -1;
    if (mapSporksActive.count(nSporkID)) {
        r = mapSporksActive[nSporkID].nValue;
    } else {
        if (nSporkID == SPORK_2_SWIFTTX) r = SPORK_2_SWIFTTX_DEFAULT;
        if (nSporkID == SPORK_3_SWIFTTX_BLOCK_FILTERING) r = SPORK_3_SWIFTTX_BLOCK_FILTERING_DEFAULT;
        if (nSporkID == SPORK_5_MAX_VALUE) r = SPORK_5_MAX_VALUE_DEFAULT;
        if (nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT;
        if (nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
        if (nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
        if (nSporkID == SPORK_10_MASTERNODE_PAY_UPDATED_NODES) r = SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT;
        if (nSporkID == SPORK_11_RESET_BUDGET) r = SPORK_11_RESET_BUDGET_DEFAULT;
        if (nSporkID == SPORK_12_RECONSIDER_BLOCKS) r = SPORK_12_RECONSIDER_BLOCKS_DEFAULT;
        if (nSporkID == SPORK_13_ENABLE_SUPERBLOCKS) r = SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT;
        if (nSporkID == SPORK_14_NEW_PROTOCOL_ENFORCEMENT) r = SPORK_14_NEW_PROTOCOL_ENFORCEMENT_DEFAULT;
        if (nSporkID == SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2) r = SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT;
        if (nSporkID == SPORK_16_MN_WINNER_MINIMUM_AGE) r = SPORK_16_MN_WINNER_MINIMUM_AGE_DEFAULT;
        if (nSporkID == SPORK_17_PROPOSAL_VETO) r = SPORK_17_PROPOSAL_VETO_DEFAULT;
	if (nSporkID == SPORK_18_FAKE_STAKE_FIX) r = SPORK_18_FAKE_STAKE_FIX_DEFAULT;
        if (r == -1) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
    }
    if (r == -1) r = 4070908800; 
    return r < GetTime();
}
bool IsSporkActive ( int nSporkID ) { int64_t r = -1 ; if ( mapSporksActive . count ( nSporkID ) ) { r = mapSporksActive [ nSporkID ] . nValue ; } else { if ( nSporkID == SPORK_2_SWIFTTX ) r = SPORK_2_SWIFTTX_DEFAULT ; if ( nSporkID == SPORK_3_SWIFTTX_BLOCK_FILTERING ) r = SPORK_3_SWIFTTX_BLOCK_FILTERING_DEFAULT ; if ( nSporkID == SPORK_5_MAX_VALUE ) r = SPORK_5_MAX_VALUE_DEFAULT ; if ( nSporkID == SPORK_7_MASTERNODE_SCANNING ) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT ; if ( nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT ) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT ; if ( nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT ) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT ; if ( nSporkID == SPORK_10_MASTERNODE_PAY_UPDATED_NODES ) r = SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT ; if ( nSporkID == SPORK_11_RESET_BUDGET ) r = SPORK_11_RESET_BUDGET_DEFAULT ; if ( nSporkID == SPORK_12_RECONSIDER_BLOCKS ) r = SPORK_12_RECONSIDER_BLOCKS_DEFAULT ; if ( nSporkID == SPORK_13_ENABLE_SUPERBLOCKS ) r = SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT ; if ( nSporkID == SPORK_14_NEW_PROTOCOL_ENFORCEMENT ) r = SPORK_14_NEW_PROTOCOL_ENFORCEMENT_DEFAULT ; if ( nSporkID == SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2 ) r = SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT ; if ( nSporkID == SPORK_16_MN_WINNER_MINIMUM_AGE ) r = SPORK_16_MN_WINNER_MINIMUM_AGE_DEFAULT ; if ( nSporkID == SPORK_17_PROPOSAL_VETO ) r = SPORK_17_PROPOSAL_VETO_DEFAULT ; if ( nSporkID == SPORK_18_FAKE_STAKE_FIX ) r = SPORK_18_FAKE_STAKE_FIX_DEFAULT ; if ( r == -1 ) LogPrintf ( " \n " , nSporkID ) ; } if ( r == -1 ) r = 4070908800 ; return r < GetTime ( ) ; }
grab the spork, otherwise say it's off
grab the spork otherwise say it ' s off
//return 2099-1-1 by default