aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gen_tttransaction.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-11-13 19:47:27 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-03 20:45:35 +0800
commit6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 (patch)
treec92974f8b82209073ad1ee3faec6e149f834bf69 /tests/gen_tttransaction.go
parentb8caba97099ee5eed33c3b80dd4ea540722e7d8f (diff)
downloaddexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.gz
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.bz2
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.lz
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.xz
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.zst
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.zip
all: switch gas limits from big.Int to uint64
Diffstat (limited to 'tests/gen_tttransaction.go')
-rw-r--r--tests/gen_tttransaction.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gen_tttransaction.go b/tests/gen_tttransaction.go
index b6759be91..840bdfdd8 100644
--- a/tests/gen_tttransaction.go
+++ b/tests/gen_tttransaction.go
@@ -17,7 +17,7 @@ var _ = (*ttTransactionMarshaling)(nil)
func (t ttTransaction) MarshalJSON() ([]byte, error) {
type ttTransaction struct {
Data hexutil.Bytes `gencodec:"required"`
- GasLimit *math.HexOrDecimal256 `gencodec:"required"`
+ GasLimit math.HexOrDecimal64 `gencodec:"required"`
GasPrice *math.HexOrDecimal256 `gencodec:"required"`
Nonce math.HexOrDecimal64 `gencodec:"required"`
Value *math.HexOrDecimal256 `gencodec:"required"`
@@ -28,7 +28,7 @@ func (t ttTransaction) MarshalJSON() ([]byte, error) {
}
var enc ttTransaction
enc.Data = t.Data
- enc.GasLimit = (*math.HexOrDecimal256)(t.GasLimit)
+ enc.GasLimit = (math.HexOrDecimal64)(t.GasLimit)
enc.GasPrice = (*math.HexOrDecimal256)(t.GasPrice)
enc.Nonce = math.HexOrDecimal64(t.Nonce)
enc.Value = (*math.HexOrDecimal256)(t.Value)
@@ -42,7 +42,7 @@ func (t ttTransaction) MarshalJSON() ([]byte, error) {
func (t *ttTransaction) UnmarshalJSON(input []byte) error {
type ttTransaction struct {
Data hexutil.Bytes `gencodec:"required"`
- GasLimit *math.HexOrDecimal256 `gencodec:"required"`
+ GasLimit *math.HexOrDecimal64 `gencodec:"required"`
GasPrice *math.HexOrDecimal256 `gencodec:"required"`
Nonce *math.HexOrDecimal64 `gencodec:"required"`
Value *math.HexOrDecimal256 `gencodec:"required"`
@@ -62,7 +62,7 @@ func (t *ttTransaction) UnmarshalJSON(input []byte) error {
if dec.GasLimit == nil {
return errors.New("missing required field 'gasLimit' for ttTransaction")
}
- t.GasLimit = (*big.Int)(dec.GasLimit)
+ t.GasLimit = uint64(*dec.GasLimit)
if dec.GasPrice == nil {
return errors.New("missing required field 'gasPrice' for ttTransaction")
}