From 6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 13 Nov 2017 13:47:27 +0200 Subject: all: switch gas limits from big.Int to uint64 --- tests/transaction_test_util.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/transaction_test_util.go') 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) -- cgit v1.2.3