diff options
author | Felix Lange <fjl@twurst.com> | 2017-01-05 19:59:17 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2017-01-05 19:59:17 +0800 |
commit | e171bf74f8b6d15c2ae51e259d703ee5b729a298 (patch) | |
tree | b7924c1c57d69d433cb8c6645d0b2e57743daeee /eth/handler_test.go | |
parent | bbc4ea4ae8e8a962deae3d5693d9d4a9376eab88 (diff) | |
download | dexon-e171bf74f8b6d15c2ae51e259d703ee5b729a298.tar dexon-e171bf74f8b6d15c2ae51e259d703ee5b729a298.tar.gz dexon-e171bf74f8b6d15c2ae51e259d703ee5b729a298.tar.bz2 dexon-e171bf74f8b6d15c2ae51e259d703ee5b729a298.tar.lz dexon-e171bf74f8b6d15c2ae51e259d703ee5b729a298.tar.xz dexon-e171bf74f8b6d15c2ae51e259d703ee5b729a298.tar.zst dexon-e171bf74f8b6d15c2ae51e259d703ee5b729a298.zip |
core/types: remove redundant SignECDSA wrappers, rename to SignTx
Diffstat (limited to 'eth/handler_test.go')
-rw-r--r-- | eth/handler_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/eth/handler_test.go b/eth/handler_test.go index f599e9e86..6900f7808 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -311,13 +311,13 @@ func testGetNodeData(t *testing.T, protocol int) { switch i { case 0: // In block 1, the test bank sends account #1 some ether. - tx, _ := types.NewTransaction(block.TxNonce(testBank.Address), acc1Addr, big.NewInt(10000), params.TxGas, nil, nil).SignECDSA(signer, testBankKey) + tx, _ := types.SignTx(types.NewTransaction(block.TxNonce(testBank.Address), acc1Addr, big.NewInt(10000), params.TxGas, nil, nil), signer, testBankKey) block.AddTx(tx) case 1: // In block 2, the test bank sends some more ether to account #1. // acc1Addr passes it on to account #2. - tx1, _ := types.NewTransaction(block.TxNonce(testBank.Address), acc1Addr, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(signer, testBankKey) - tx2, _ := types.NewTransaction(block.TxNonce(acc1Addr), acc2Addr, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(signer, acc1Key) + tx1, _ := types.SignTx(types.NewTransaction(block.TxNonce(testBank.Address), acc1Addr, big.NewInt(1000), params.TxGas, nil, nil), signer, testBankKey) + tx2, _ := types.SignTx(types.NewTransaction(block.TxNonce(acc1Addr), acc2Addr, big.NewInt(1000), params.TxGas, nil, nil), signer, acc1Key) block.AddTx(tx1) block.AddTx(tx2) case 2: @@ -403,13 +403,13 @@ func testGetReceipt(t *testing.T, protocol int) { switch i { case 0: // In block 1, the test bank sends account #1 some ether. - tx, _ := types.NewTransaction(block.TxNonce(testBank.Address), acc1Addr, big.NewInt(10000), params.TxGas, nil, nil).SignECDSA(signer, testBankKey) + tx, _ := types.SignTx(types.NewTransaction(block.TxNonce(testBank.Address), acc1Addr, big.NewInt(10000), params.TxGas, nil, nil), signer, testBankKey) block.AddTx(tx) case 1: // In block 2, the test bank sends some more ether to account #1. // acc1Addr passes it on to account #2. - tx1, _ := types.NewTransaction(block.TxNonce(testBank.Address), acc1Addr, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(signer, testBankKey) - tx2, _ := types.NewTransaction(block.TxNonce(acc1Addr), acc2Addr, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(signer, acc1Key) + tx1, _ := types.SignTx(types.NewTransaction(block.TxNonce(testBank.Address), acc1Addr, big.NewInt(1000), params.TxGas, nil, nil), signer, testBankKey) + tx2, _ := types.SignTx(types.NewTransaction(block.TxNonce(acc1Addr), acc2Addr, big.NewInt(1000), params.TxGas, nil, nil), signer, acc1Key) block.AddTx(tx1) block.AddTx(tx2) case 2: |