No longer require gas & gas price in transactions

Defaults to 0, which is then set to default values in XEth
This commit is contained in:
Taylor Gerring
2015-04-02 14:05:14 +02:00
parent 015453f5b3
commit b4eef59b6f
2 changed files with 19 additions and 8 deletions

View File

@@ -207,7 +207,7 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) {
args.Value = big.NewInt(num)
if ext.Gas == nil {
return NewValidationError("gas", "is required")
num = 0
} else {
if err := numString(ext.Gas, &num); err != nil {
return err
@@ -216,7 +216,7 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) {
args.Gas = big.NewInt(num)
if ext.GasPrice == nil {
return NewValidationError("gasprice", "is required")
num = 0
} else {
if err := numString(ext.GasPrice, &num); err != nil {
return err