浏览代码

miner: added log message for mining operation. #912

obscuren 10 年之前
父节点
当前提交
6ecba12650
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      miner/miner.go

+ 4 - 0
miner/miner.go

@@ -7,6 +7,8 @@ import (
 	"github.com/ethereum/go-ethereum/core"
 	"github.com/ethereum/go-ethereum/core"
 	"github.com/ethereum/go-ethereum/core/state"
 	"github.com/ethereum/go-ethereum/core/state"
 	"github.com/ethereum/go-ethereum/core/types"
 	"github.com/ethereum/go-ethereum/core/types"
+	"github.com/ethereum/go-ethereum/logger"
+	"github.com/ethereum/go-ethereum/logger/glog"
 	"github.com/ethereum/go-ethereum/pow"
 	"github.com/ethereum/go-ethereum/pow"
 )
 )
 
 
@@ -47,6 +49,8 @@ func (m *Miner) SetGasPrice(price *big.Int) {
 }
 }
 
 
 func (self *Miner) Start(coinbase common.Address) {
 func (self *Miner) Start(coinbase common.Address) {
+	glog.V(logger.Info).Infoln("Starting mining operation")
+
 	self.mining = true
 	self.mining = true
 	self.worker.coinbase = coinbase
 	self.worker.coinbase = coinbase
 	self.worker.start()
 	self.worker.start()