1
0
mirror of https://github.com/GOSTSec/poolserver synced 2025-02-06 12:04:29 +00:00

Fixed bug with coinbase timestamp

Sometimes coinbase timestamp was newer than block timestamp which caused rejected blocks.
This commit is contained in:
Intel 2014-07-20 18:36:43 +03:00
parent f14e829744
commit e281ca4a3d

View File

@ -63,6 +63,9 @@ void NetworkMgr::UpdateBlockTemplate()
BinaryData pubkey = Util::ASCIIToBin(sConfig.Get<std::string>("MiningAddress"));
block->tx.push_back(Bitcoin::CreateCoinbaseTX(_blockHeight, pubkey, response["coinbasevalue"].GetInt(), Util::ASCIIToBin("D7PoolBeta")));
// Fix nTime for coinbase tx
block->tx[0].time = block->time;
// Add other transactions
JSON trans = response["transactions"];
for (uint64 tidx = 0; tidx < trans.Size(); ++tidx) {