File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ const (
42
42
func DefaultGas () * big.Int { return new (big.Int ).Set (defaultGas ) }
43
43
44
44
func (self * XEth ) DefaultGasPrice () * big.Int {
45
+ if self .gpo == nil {
46
+ self .gpo = eth .NewGasPriceOracle (self .backend )
47
+ }
45
48
return self .gpo .SuggestPrice ()
46
49
}
47
50
@@ -96,7 +99,6 @@ func New(ethereum *eth.Ethereum, frontend Frontend) *XEth {
96
99
transactionQueue : make (map [int ]* hashQueue ),
97
100
messages : make (map [int ]* whisperFilter ),
98
101
agent : miner .NewRemoteAgent (),
99
- gpo : eth .NewGasPriceOracle (ethereum ),
100
102
}
101
103
if ethereum .Whisper () != nil {
102
104
xeth .whisper = NewWhisper (ethereum .Whisper ())
@@ -233,6 +235,7 @@ func (self *XEth) WithState(statedb *state.StateDB) *XEth {
233
235
xeth := & XEth {
234
236
backend : self .backend ,
235
237
frontend : self .frontend ,
238
+ gpo : self .gpo ,
236
239
}
237
240
238
241
xeth .state = NewState (xeth , statedb )
You can’t perform that action at this time.
0 commit comments