From e281ca4a3d2d62b6759db82bd5da3585c5f88322 Mon Sep 17 00:00:00 2001 From: Intel Date: Sun, 20 Jul 2014 18:36:43 +0300 Subject: [PATCH] Fixed bug with coinbase timestamp Sometimes coinbase timestamp was newer than block timestamp which caused rejected blocks. --- src/server/poolserver/NetworkMgr/NetworkMgr.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/poolserver/NetworkMgr/NetworkMgr.cpp b/src/server/poolserver/NetworkMgr/NetworkMgr.cpp index 4994789..d43d4f5 100644 --- a/src/server/poolserver/NetworkMgr/NetworkMgr.cpp +++ b/src/server/poolserver/NetworkMgr/NetworkMgr.cpp @@ -63,6 +63,9 @@ void NetworkMgr::UpdateBlockTemplate() BinaryData pubkey = Util::ASCIIToBin(sConfig.Get("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) {