Bitcoin Forum
May 21, 2024, 08:43:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Pull coin info from client  (Read 398 times)
ajareselde (OP)
Legendary
*
Offline Offline

Activity: 1722
Merit: 1000

Satoshi is rolling in his grave. #bitcoin


View Profile
February 08, 2015, 01:31:26 PM
 #1

Hey guys, i need a bit of help with something.
Im trying to figure out how to  get end of pow phase info from client, does anyone know how to do that ?
There is one altcoin that was supposed to end its pow phase, but pow blocks keep going, and i want to know is that due to some error or what.
I cant get in touch with dev so ..

Any help is welcome, thanks
iGotSpots
Legendary
*
Offline Offline

Activity: 2548
Merit: 1054


CPU Web Mining 🕸️ on webmining.io


View Profile WWW
February 08, 2015, 02:37:54 PM
 #2

Hey guys, i need a bit of help with something.
Im trying to figure out how to  get end of pow phase info from client, does anyone know how to do that ?
There is one altcoin that was supposed to end its pow phase, but pow blocks keep going, and i want to know is that due to some error or what.
I cant get in touch with dev so ..

Any help is welcome, thanks

Check the source. These are usually in main.h or main.cpp

ajareselde (OP)
Legendary
*
Offline Offline

Activity: 1722
Merit: 1000

Satoshi is rolling in his grave. #bitcoin


View Profile
February 08, 2015, 03:16:52 PM
 #3

Hey guys, i need a bit of help with something.
Im trying to figure out how to  get end of pow phase info from client, does anyone know how to do that ?
There is one altcoin that was supposed to end its pow phase, but pow blocks keep going, and i want to know is that due to some error or what.
I cant get in touch with dev so ..

Any help is welcome, thanks

Check the source. These are usually in main.h or main.cpp

ok i will try, is there some particular string is should search?, it would cut me some time searching..
do u maybe know is the limit on pow usually set trigger on block number or total coin supplied ?
this thing is bugging me for some time now
ajareselde (OP)
Legendary
*
Offline Offline

Activity: 1722
Merit: 1000

Satoshi is rolling in his grave. #bitcoin


View Profile
February 09, 2015, 01:49:06 AM
 #4

Ok, i cant seam to find this on my own, so if there is someone that knows what particular string im supposed
to find i would be so happy :]

All i found is max allowed coins limit, and pos interest per year, and the rest is still unknown to me.
Help out guys,

cheers
jasemoney
Legendary
*
Offline Offline

Activity: 1610
Merit: 1008


Forget-about-it


View Profile
February 09, 2015, 04:50:06 AM
 #5

look in main.cpp file of the source
maybe a quarter the way down. look for the header
Quote
//////////////////////////////////////////////////////////////////////////////
//
// CBlock and CBlockIndex
//

maybe around line 1000ish

Quote
 int64 nSubsidy = 12 * COIN;

    if (nHeight > 83334)
    {
       nSubsidy = 0.6 * COIN;
       return nSubsidy + nFees;
    }

    return nSubsidy + nFees;
this coins is always POW but it was init64 nsubsidy 12 coins (initial subsidy 12 coins per block) when the heights under 83334
after that .6 coins per block.


edit* if you want us to find it for you in a source post a link to github and someone can most likely look quickly and paste back the answer and location in the source.

$MAID & $BTC other than that some short hodls and some long held garbage.
ajareselde (OP)
Legendary
*
Offline Offline

Activity: 1722
Merit: 1000

Satoshi is rolling in his grave. #bitcoin


View Profile
February 09, 2015, 12:39:01 PM
 #6

// miner's coin base reward
int64_t GetProofOfWorkReward(int64_t nFees)
{
    int64_t nSubsidy = 200 * COIN;
   
    if (pindexBest->nHeight == 1)
    {
      nSubsidy = 180000 * COIN;
      return nSubsidy + nFees;
    }
   
    else if (pindexBest->nHeight <= 100)
    {
      nSubsidy = 0 * COIN;
      return nSubsidy + nFees;
    }
   
    else if (pindexBest->nHeight > 20000)
    {
      nSubsidy = 20 * COIN;
      return nSubsidy + nFees;
    }
   
    if (fDebug && GetBoolArg("-printcreation"))
        printf("GetProofOfWorkReward() : create=%s nSubsidy=%"PRId64"\n", FormatMoney(nSubsidy).c_str(), nSubsidy);
   
    return nSubsidy + nFees;
}

const int DAILY_BLOCKCOUNT =  1440;
// miner's coin stake reward based on coin age spent (coin-days)
int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees)
{
    int64_t nRewardCoinYear;

    nRewardCoinYear = MAX_MINT_PROOF_OF_STAKE;

    int64_t nSubsidy = nCoinAge * nRewardCoinYear / 365 / COIN;


    if (fDebug && GetBoolArg("-printcreation"))
        printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRId64"\n", FormatMoney(nSubsidy).c_str(), nCoinAge);

    return nSubsidy + nFees;
}

static const int64_t nTargetTimespan = 10 * 60;  // 10 mins
//
// maximum nBits value could possible be required nTime after


So after block 20 000 reward 20 coins, but it says nothing more after that ?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!