mirror of
https://github.com/GOSTSec/poolserver
synced 2025-02-06 03:54:28 +00:00
Fixed bug with coinbase timestamp
Sometimes coinbase timestamp was newer than block timestamp which caused rejected blocks.
This commit is contained in:
parent
f14e829744
commit
e281ca4a3d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user