Skip to content

Commit 22fd384

Browse files
Update testnet
1 parent 5e3f08d commit 22fd384

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/miner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,8 @@ void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned
517517
static uint256 hashPrevBlock;
518518
if (hashPrevBlock != pblock->hashPrevBlock)
519519
{
520-
nExtraNonce = 0;
520+
if (!pblock->IsProofOfStake())
521+
nExtraNonce = 0;
521522
hashPrevBlock = pblock->hashPrevBlock;
522523
}
523524
++nExtraNonce;

src/rpc/mining.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ static bool GenerateBlock(ChainstateManager& chainman, CBlock& block, uint64_t&
130130
if (block.nNonce == std::numeric_limits<uint32_t>::max()) {
131131
return true;
132132
}
133-
LogPrintf("proof-of-work found\n hash: %s\n target: %s\n bits: %08x\n nonce: %u\n", block.GetPoWHash().ToString(), arith_uint256().SetCompact(block.nBits).ToString(), block.nBits, block.nNonce);
133+
if (chainparams.NetworkIDString() != CBaseChainParams::REGTEST)
134+
LogPrintf("proof-of-work found\n hash: %s\n target: %s\n bits: %08x\n nonce: %u\n", block.GetPoWHash().ToString(), arith_uint256().SetCompact(block.nBits).ToString(), block.nBits, block.nNonce);
134135

135136
std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block);
136137
if (!chainman.ProcessNewBlock(chainparams, shared_pblock, true, nullptr)) {

src/validation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,8 @@ CAmount GetBlockSubsidy(int nHeight, bool fProofOfStake, uint64_t nCoinAge, cons
12521252
} else {
12531253
if (nHeight == 0) // premine
12541254
nSubsidy = 30000000000 * COIN; // 30 billion
1255+
else if (Params().NetworkIDString() != CBaseChainParams::MAIN)
1256+
nSubsidy = 1000 * COIN;
12551257
else
12561258
nSubsidy = 1 * COIN;
12571259
}

0 commit comments

Comments
 (0)