aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/miner/worker.go b/miner/worker.go
index aa2132a51..86970ec07 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -278,7 +278,7 @@ func (self *worker) wait() {
glog.V(logger.Error).Infoln("Invalid block found during mining")
continue
}
- if err := core.ValidateHeader(self.eth.BlockProcessor().Pow, block.Header(), parent, true); err != nil && err != core.BlockFutureErr {
+ if err := core.ValidateHeader(self.eth.BlockProcessor().Pow, block.Header(), parent, true, false); err != nil && err != core.BlockFutureErr {
glog.V(logger.Error).Infoln("Invalid header on mined block:", err)
continue
}
@@ -434,8 +434,8 @@ func (self *worker) commitNewWork() {
tstart := time.Now()
parent := self.chain.CurrentBlock()
tstamp := tstart.Unix()
- if tstamp <= int64(parent.Time()) {
- tstamp = int64(parent.Time()) + 1
+ if parent.Time().Cmp(new(big.Int).SetInt64(tstamp)) != 1 {
+ tstamp = parent.Time().Int64() + 1
}
// this will ensure we're not going off too far in the future
if now := time.Now().Unix(); tstamp > now+4 {
@@ -448,12 +448,12 @@ func (self *worker) commitNewWork() {
header := &types.Header{
ParentHash: parent.Hash(),
Number: num.Add(num, common.Big1),
- Difficulty: core.CalcDifficulty(uint64(tstamp), parent.Time(), parent.Number(), parent.Difficulty()),
+ Difficulty: core.CalcDifficulty(uint64(tstamp), parent.Time().Uint64(), parent.Number(), parent.Difficulty()),
GasLimit: core.CalcGasLimit(parent),
GasUsed: new(big.Int),
Coinbase: self.coinbase,
Extra: self.extra,
- Time: uint64(tstamp),
+ Time: big.NewInt(tstamp),
}
previous := self.current
td>- Fix crash upon Gnucash importscheidell2012-01-192-0/+33 * - Update to 4.6.1miwi2011-11-133-5/+170 * - Update dependencies after KDE ports upgrade.avilla2011-10-172-3/+1 * - Chase devel/gwenhywfar has a shlib version bumpswills2011-10-031-0/+1 * - Update to 4.6.0beech2011-08-313-21/+45 * Chase devel/gwenhywfar shlib bump.kwm2011-08-011-0/+1 * Only check for libgwengui-qt4.so when the KBANKING option is selected.kwm2011-03-021-2/+2 * Update to 4.5.3.kwm2011-03-015-84/+42 * Chase after net/openldap24-server update.delphij2011-02-251-0/+1 * - finance/kmymoney-kde4: Update to 4.5.2fluffy2010-12-303-4/+76 * - Chase security/libksba shlib version bumpglarkin2010-12-161-0/+1 * Update to 4.5.1makc2010-11-183-111/+35 * - Update finance/kmymoney-kde4 to 4.5 releasefluffy2010-09-257-49/+162 * Fix build with upcoming KDE 4.5makc2010-08-221-0/+1 * - Add missing patchfluffy2010-06-141-0/+11 * - Update finance/kmymoney-kde4 to 3.98.1fluffy2010-06-134-12/+9 * Bounce PORTREVISION for gettext-related ports. Have fun, ya'll.ade2010-05-311-1/+1 * Update libical to 0.44.marcus2010-05-221-2/+2 * - Make pointyhat tinderbox happy by removing extra @dirrmry for common localefluffy2010-05-142-2/+1 * - Handle extra oxygen 68x68 iconfluffy2010-05-041-0/+2 * [MAINTAINER] finance/kmymoney-kde4: Fix buildfluffy2010-05-041-1/+1 * - finance/kmymoney-kde4: KDE4 version of KMyMoneyfluffy2010-05-0412-1397/+1134 * - Reassign to ports@ as maintainer does not have time anymore.wxs2010-04-131-1/+1 * - Fix problem with sqlite during updatesylvio2010-03-312-18/+12 * - update to 1.4.1dinoex2010-03-281-0/+1 * - Update to 1.0.3sylvio2010-03-0210-217/+1004 * - update to jpeg-8dinoex2010-02-051-1/+1 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-1/+1 * -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-031-1/+1 * - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-311-1/+1 * Use LTMAIN and LIBTOOL instead of hardcore.mezz2009-07-062-2/+6 * - Fix build (needs Xext)pav2009-01-071-0/+1 * - Fixed pkg-plist problems and NOPORTDOCS handlingglarkin2008-11-123-14/+61 * - Fixed recursive make invocation that called FreeBSD make insteadglarkin2008-11-104-133/+237 * - Update to 0.8.9glarkin2008-10-146-39/+118 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-1/+1 * Remove always-false/true conditions based on OSVERSION 500000edwin2007-10-041-7/+1 * For now, remove the locale directories for es_ARedwin2007-09-252-0/+3 * [patch] finance/kmymoney2: update to 0.8.5edwin2007-09-103-6/+17 * - Welcome X.org 7.2 \o/.flz2007-05-201-1/+1 * - chase textproc/opensp's libosp version upgradeitetcu2007-01-251-1/+2 * - Chase recent libofx updaterafan2006-11-241-1/+1 * - Update to 0.8.5miwi2006-09-063-9/+14 * Update to 0.8.3.lawrance2006-04-093-36/+13 * Update to 0.8.2.lawrance2006-04-0725-300/+87 * Conversion to a single libtool environment.ade2006-02-232-4/+5 * SHA256ifyedwin2006-01-221-0/+1 * Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-1/+1 * Bump PORTREVISION to chase the glib20 shared library update.marcus2005-11-051-0/+1 * Fix bogus ui files in preparation for Qt 3.3.5lofi2005-09-2921-0/+294 * - Update to 0.7.5sem2005-08-014-141/+372 * Bump PORTREVISION to chase the glib20 shared lib version change.marcus2005-03-121-1/+1 * Add patch to enter overdue scheduled paymentsvs2005-01-22