miner: remove dead code, add gas price getter

This commit is contained in:
Péter Szilágyi 2016-11-24 15:24:49 +02:00
parent c04c8f10f0
commit 94c0519be2
No known key found for this signature in database
GPG Key ID: 119A76381CCB7DD2

View File

@ -50,8 +50,6 @@ type Miner struct {
worker *worker
MinAcceptedGasPrice *big.Int
threads int
coinbase common.Address
mining int32
@ -107,12 +105,15 @@ out:
}
}
func (m *Miner) GasPrice() *big.Int {
return new(big.Int).Set(m.worker.gasPrice)
}
func (m *Miner) SetGasPrice(price *big.Int) {
// FIXME block tests set a nil gas price. Quick dirty fix
if price == nil {
return
}
m.worker.setGasPrice(price)
}