aboutsummaryrefslogtreecommitdiffstats
path: root/tests/transaction_test_util.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-04-10 18:34:55 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-04-10 18:34:55 +0800
commit6d20d634ca424fc11665d5e0e560534ae8ec774b (patch)
tree92cc947a6d377131718027aa193ec76452e3df05 /tests/transaction_test_util.go
parent6dc2146ed70a992e0a0419823257a842ceedc8fa (diff)
downloadgo-tangerine-6d20d634ca424fc11665d5e0e560534ae8ec774b.tar
go-tangerine-6d20d634ca424fc11665d5e0e560534ae8ec774b.tar.gz
go-tangerine-6d20d634ca424fc11665d5e0e560534ae8ec774b.tar.bz2
go-tangerine-6d20d634ca424fc11665d5e0e560534ae8ec774b.tar.lz
go-tangerine-6d20d634ca424fc11665d5e0e560534ae8ec774b.tar.xz
go-tangerine-6d20d634ca424fc11665d5e0e560534ae8ec774b.tar.zst
go-tangerine-6d20d634ca424fc11665d5e0e560534ae8ec774b.zip
Enable more tx tests by expecting most common encoding of values
Diffstat (limited to 'tests/transaction_test_util.go')
-rw-r--r--tests/transaction_test_util.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/transaction_test_util.go b/tests/transaction_test_util.go
index 800891887..1b2ee88b1 100644
--- a/tests/transaction_test_util.go
+++ b/tests/transaction_test_util.go
@@ -30,7 +30,7 @@ type TransactionTest struct {
Transaction TtTransaction
}
-func RunTransactionTests(file string, notWorking map[string]bool) error {
+func RunTransactionTests(file string, notWorking map[string]bool) error {
bt := make(map[string]TransactionTest)
if err := LoadJSON(file, &bt); err != nil {
return err
@@ -60,7 +60,7 @@ func runTest(txTest TransactionTest) (err error) {
}
tx := new(types.Transaction)
rlp.DecodeBytes(rlpBytes, tx)
-
+ //fmt.Println("HURR tx: %v", tx)
sender, err := tx.From()
if err != nil {
return err
@@ -120,15 +120,15 @@ func convertTestTypes(txTest TransactionTest) (sender, to common.Address,
txInputData = mustConvertBytes(txTest.Transaction.Data)
rlpBytes = mustConvertBytes(txTest.Rlp)
- gasLimit = mustConvertBigIntHex(txTest.Transaction.GasLimit)
- gasPrice = mustConvertBigIntHex(txTest.Transaction.GasPrice)
- value = mustConvertBigIntHex(txTest.Transaction.Value)
+ gasLimit = mustConvertBigInt10(txTest.Transaction.GasLimit)
+ gasPrice = mustConvertBigInt10(txTest.Transaction.GasPrice)
+ value = mustConvertBigInt10(txTest.Transaction.Value)
r = common.Bytes2Big(mustConvertBytes(txTest.Transaction.R))
s = common.Bytes2Big(mustConvertBytes(txTest.Transaction.S))
nonce = mustConvertUintHex(txTest.Transaction.Nonce)
- v = mustConvertUintHex(txTest.Transaction.V)
+ v = mustConvertUint(txTest.Transaction.V)
return sender, to, txInputData, rlpBytes, gasLimit, gasPrice, value, r, s, nonce, v, nil
}