forked from cerc-io/plugeth
miner: remove dead code, add gas price getter
This commit is contained in:
parent
c04c8f10f0
commit
94c0519be2
@ -50,8 +50,6 @@ type Miner struct {
|
|||||||
|
|
||||||
worker *worker
|
worker *worker
|
||||||
|
|
||||||
MinAcceptedGasPrice *big.Int
|
|
||||||
|
|
||||||
threads int
|
threads int
|
||||||
coinbase common.Address
|
coinbase common.Address
|
||||||
mining int32
|
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) {
|
func (m *Miner) SetGasPrice(price *big.Int) {
|
||||||
// FIXME block tests set a nil gas price. Quick dirty fix
|
// FIXME block tests set a nil gas price. Quick dirty fix
|
||||||
if price == nil {
|
if price == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
m.worker.setGasPrice(price)
|
m.worker.setGasPrice(price)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user