diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-01-06 21:55:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-06 21:55:55 +0800 |
commit | 59b8245bbced3c0511623ecaa8b7d4e0434343cd (patch) | |
tree | f3965293859731b4bc3a588cb152b87c4790e27d /core/tx_pool_test.go | |
parent | 8f9daaa3ba71c3b6bdcc24adfdc987e6f3a2e184 (diff) | |
parent | e171bf74f8b6d15c2ae51e259d703ee5b729a298 (diff) | |
download | go-tangerine-59b8245bbced3c0511623ecaa8b7d4e0434343cd.tar go-tangerine-59b8245bbced3c0511623ecaa8b7d4e0434343cd.tar.gz go-tangerine-59b8245bbced3c0511623ecaa8b7d4e0434343cd.tar.bz2 go-tangerine-59b8245bbced3c0511623ecaa8b7d4e0434343cd.tar.lz go-tangerine-59b8245bbced3c0511623ecaa8b7d4e0434343cd.tar.xz go-tangerine-59b8245bbced3c0511623ecaa8b7d4e0434343cd.tar.zst go-tangerine-59b8245bbced3c0511623ecaa8b7d4e0434343cd.zip |
Merge pull request #3516 from fjl/types-drop-sign-ecdsa
core/types: remove redundant SignECDSA wrappers, rename to SignTx
Diffstat (limited to 'core/tx_pool_test.go')
-rw-r--r-- | core/tx_pool_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/tx_pool_test.go b/core/tx_pool_test.go index f5fcac19f..98a34b757 100644 --- a/core/tx_pool_test.go +++ b/core/tx_pool_test.go @@ -32,7 +32,7 @@ import ( ) func transaction(nonce uint64, gaslimit *big.Int, key *ecdsa.PrivateKey) *types.Transaction { - tx, _ := types.NewTransaction(nonce, common.Address{}, big.NewInt(100), gaslimit, big.NewInt(1), nil).SignECDSA(types.HomesteadSigner{}, key) + tx, _ := types.SignTx(types.NewTransaction(nonce, common.Address{}, big.NewInt(100), gaslimit, big.NewInt(1), nil), types.HomesteadSigner{}, key) return tx } @@ -238,7 +238,7 @@ func TestRemoveTx(t *testing.T) { func TestNegativeValue(t *testing.T) { pool, key := setupTxPool() - tx, _ := types.NewTransaction(0, common.Address{}, big.NewInt(-1), big.NewInt(100), big.NewInt(1), nil).SignECDSA(types.HomesteadSigner{}, key) + tx, _ := types.SignTx(types.NewTransaction(0, common.Address{}, big.NewInt(-1), big.NewInt(100), big.NewInt(1), nil), types.HomesteadSigner{}, key) from, _ := deriveSender(tx) currentState, _ := pool.currentState() currentState.AddBalance(from, big.NewInt(1)) @@ -287,9 +287,9 @@ func TestTransactionDoubleNonce(t *testing.T) { resetState() signer := types.HomesteadSigner{} - tx1, _ := types.NewTransaction(0, common.Address{}, big.NewInt(100), big.NewInt(100000), big.NewInt(1), nil).SignECDSA(signer, key) - tx2, _ := types.NewTransaction(0, common.Address{}, big.NewInt(100), big.NewInt(1000000), big.NewInt(2), nil).SignECDSA(signer, key) - tx3, _ := types.NewTransaction(0, common.Address{}, big.NewInt(100), big.NewInt(1000000), big.NewInt(1), nil).SignECDSA(signer, key) + tx1, _ := types.SignTx(types.NewTransaction(0, common.Address{}, big.NewInt(100), big.NewInt(100000), big.NewInt(1), nil), signer, key) + tx2, _ := types.SignTx(types.NewTransaction(0, common.Address{}, big.NewInt(100), big.NewInt(1000000), big.NewInt(2), nil), signer, key) + tx3, _ := types.SignTx(types.NewTransaction(0, common.Address{}, big.NewInt(100), big.NewInt(1000000), big.NewInt(1), nil), signer, key) // Add the first two transaction, ensure higher priced stays only if err := pool.add(tx1); err != nil { |