@@ -129,8 +129,8 @@ func cTopics(t [][]string) [][]common.Hash {
129129 return topics
130130}
131131
132- func (self * XEth ) DefaultGas () * big.Int { return defaultGas }
133- func (self * XEth ) DefaultGasPrice () * big.Int { return defaultGasPrice }
132+ func (self * XEth ) DefaultGas () * big.Int { return new (big. Int ). Set ( defaultGas ) }
133+ func (self * XEth ) DefaultGasPrice () * big.Int { return new (big. Int ). Set ( defaultGasPrice ) }
134134
135135func (self * XEth ) RemoteMining () * miner.RemoteAgent { return self .agent }
136136
@@ -565,12 +565,13 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st
565565 value : common .Big (valueStr ),
566566 data : common .FromHex (dataStr ),
567567 }
568+
568569 if msg .gas .Cmp (big .NewInt (0 )) == 0 {
569- msg .gas = defaultGas
570+ msg .gas = self . DefaultGas ()
570571 }
571572
572573 if msg .gasPrice .Cmp (big .NewInt (0 )) == 0 {
573- msg .gasPrice = defaultGasPrice
574+ msg .gasPrice = self . DefaultGasPrice ()
574575 }
575576
576577 block := self .CurrentBlock ()
@@ -616,11 +617,11 @@ func (self *XEth) Transact(fromStr, toStr, valueStr, gasStr, gasPriceStr, codeSt
616617 // TODO: align default values to have the same type, e.g. not depend on
617618 // common.Value conversions later on
618619 if gas .Cmp (big .NewInt (0 )) == 0 {
619- gas = defaultGas
620+ gas = self . DefaultGas ()
620621 }
621622
622623 if price .Cmp (big .NewInt (0 )) == 0 {
623- price = defaultGasPrice
624+ price = self . DefaultGasPrice ()
624625 }
625626
626627 data = common .FromHex (codeStr )
0 commit comments