diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-11-13 19:47:27 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-01-03 20:45:35 +0800 |
commit | 6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 (patch) | |
tree | c92974f8b82209073ad1ee3faec6e149f834bf69 /tests/transaction_test_util.go | |
parent | b8caba97099ee5eed33c3b80dd4ea540722e7d8f (diff) | |
download | go-tangerine-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar go-tangerine-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.gz go-tangerine-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.bz2 go-tangerine-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.lz go-tangerine-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.xz go-tangerine-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.zst go-tangerine-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.zip |
all: switch gas limits from big.Int to uint64
Diffstat (limited to 'tests/transaction_test_util.go')
-rw-r--r-- | tests/transaction_test_util.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/transaction_test_util.go b/tests/transaction_test_util.go index 472b3d6f2..2028d2a27 100644 --- a/tests/transaction_test_util.go +++ b/tests/transaction_test_util.go @@ -46,7 +46,7 @@ type ttJSON struct { type ttTransaction struct { Data []byte `gencodec:"required"` - GasLimit *big.Int `gencodec:"required"` + GasLimit uint64 `gencodec:"required"` GasPrice *big.Int `gencodec:"required"` Nonce uint64 `gencodec:"required"` Value *big.Int `gencodec:"required"` @@ -58,7 +58,7 @@ type ttTransaction struct { type ttTransactionMarshaling struct { Data hexutil.Bytes - GasLimit *math.HexOrDecimal256 + GasLimit math.HexOrDecimal64 GasPrice *math.HexOrDecimal256 Nonce math.HexOrDecimal64 Value *math.HexOrDecimal256 @@ -100,8 +100,8 @@ func (tt *ttTransaction) verify(signer types.Signer, tx *types.Transaction) erro if !bytes.Equal(tx.Data(), tt.Data) { return fmt.Errorf("Tx input data mismatch: got %x want %x", tx.Data(), tt.Data) } - if tx.Gas().Cmp(tt.GasLimit) != 0 { - return fmt.Errorf("GasLimit mismatch: got %v, want %v", tx.Gas(), tt.GasLimit) + if tx.Gas() != tt.GasLimit { + return fmt.Errorf("GasLimit mismatch: got %d, want %d", tx.Gas(), tt.GasLimit) } if tx.GasPrice().Cmp(tt.GasPrice) != 0 { return fmt.Errorf("GasPrice mismatch: got %v, want %v", tx.GasPrice(), tt.GasPrice) |