Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/main.cpp b/src/main.cpp
- index acc6134..41d0220 100644
- --- a/src/main.cpp
- +++ b/src/main.cpp
- @@ -1091,9 +1091,60 @@ inline int64_t GetDevaluatedBlock( float rate, int nCycle )
- return (int64_t) ( base * COIN );
- }
- +/* Use lower block interval and block starting offset (VAULT_BLOCK_1) on testnet */
- +#define VAULT_BLOCK_REWARD 25000
- +#define VAULT_BLOCK_INTERVAL 5152
- +#define VAULT_BLOCK_1 37712
- +#define NUM_VAULT_BLOCKS 10
- +
- +/*
- +https://bitcointalk.org/index.php?topic=577437.msg7295018#msg7295018
- +
- +"Vault blocks": blocks with a high reward that are immediateley payed to the Mjollnircoin Vault when mined. Once the block is payed to the Vault, it will be auctioned and the highest bidder wins the vaulted block which is then payed out to the winner either directly or through an Escrow Service. The assumption here is, that when Mjollnircoin hits the Bittrex Exchange the value goes go up (which would then not be a bad investment)
- +
- +The reward of such a vaulted block should be high enough to make it worthwhile and the starting bid should be such that we only need a scarse number of
- +these blocks (perhaps as few as 10, with a reward of 25000 MNR for example).
- +
- +Also see function CreateNewBlock
- +
- +*/
- +
- +/*
- +Mjollnircoin [testnet] Public Key: 04ae281bb5684205f7b8bde7ae173c9db6050945d4cd28e09d600a94de4e2102835edc3561de20a2058c8ab7041de9375d60395999b517642b7aaed618f08338e9
- +Mjollnircoin [testnet] Address: nTe5gRgdjkJJ9zd2hfrQdamiMXGpyiPGNo
- +*/
- +
- +#define MNR_VAULT_PUBKEY_TESTNET "04ae281bb5684205f7b8bde7ae173c9db6050945d4cd28e09d600a94de4e2102835edc3561de20a2058c8ab7041de9375d60395999b517642b7aaed618f08338e9"
- +#define MNR_VAULT_PUBKEY_PRODNET "0427f6049984f779586b9a2835714b79bf4284111cd5248b30b408087ae375bd45918fb4b14325a494208932e8d41c02cf1e3327a5b8077993b35e397eaab674c7"
- +
- +inline int64_t GetVaultBlockValue( )
- +{
- + return (int64_t) ( VAULT_BLOCK_REWARD * COIN );
- +}
- +
- +bool static isVaultBlock(int nHeight)
- +{
- + if( nHeight == VAULT_BLOCK_1 )
- + return true;
- +
- + for( int i = 1; i < NUM_VAULT_BLOCKS; i ++ ) {
- + if( nHeight == ((i * VAULT_BLOCK_INTERVAL) + VAULT_BLOCK_1))
- + return true;
- + }
- + return false;
- +}
- +/* end of vault blocks */
- +
- int64 static GetBlockValue(int nHeight, int64 nFees)
- {
- int64 nSubsidy = 0;
- +
- + /* deploy in testnet */
- + if( fTestNet && isVaultBlock( nHeight ) ) {
- + nSubsidy = GetVaultBlockValue();
- + return (nSubsidy + nFees);
- + }
- +
- if( nHeight < 1000 ) {
- nSubsidy = 125 * COIN;
- }
- @@ -4682,9 +4733,20 @@ CBlockTemplate* CreateNewBlock(CReserveKey& reservekey)
- nLastBlockSize = nBlockSize;
- printf("CreateNewBlock(): total size %"PRI64u"\n", nBlockSize);
- - pblock->vtx[0].vout[0].nValue = GetBlockValue(pindexPrev->nHeight+1, nFees);
- - pblocktemplate->vTxFees[0] = -nFees;
- -
- + if( fTestNet && isVaultBlock( pindexPrev->nHeight + 1 ) ) {
- + pblock->vtx[0].vout[0].nValue = GetBlockValue(pindexPrev->nHeight+1, nFees);
- + pblock->vtx[0].vout[0].scriptPubKey = CScript() << ParseHex( (fTestNet ? MNR_VAULT_PUBKEY_TESTNET : MNR_VAULT_PUBKEY_PRODNET)) << OP_CHECKSIG;
- + printf("CreateNewBlock(): %d MNR Vault Block discovered! This block will be auctioned at https://bitcointalk.org/index.php?topic=577437.0\n", VAULT_BLOCK_REWARD);
- + printf("CreateNewBlock(): There are %d of these Vault Blocks in total, starting at Block %d and released every other %dth block.\n", NUM_VAULT_BLOCKS, VAULT_BLOCK_1, VAULT_BLOCK_INTERVAL);
- + printf("CreateNewBlock(): The purpose of the fund is to bring Mjollnircoin to an Exchange with a decent Volume and further promotion.\n");
- + printf("CreateNewBlock(): Public accounting of the Vault is located here: http://brokkir.github.io/mjollnircoin/vault.html.\n");
- + }
- + else {
- + pblock->vtx[0].vout[0].nValue = GetBlockValue(pindexPrev->nHeight+1, nFees);
- + }
- +
- + pblocktemplate->vTxFees[0] = -nFees;
- +
- // Fill in header
- pblock->hashPrevBlock = pindexPrev->GetBlockHash();
- pblock->UpdateTime(pindexPrev);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement