Merge pull request #3516 from fjl/types-drop-sign-ecdsa

core/types: remove redundant SignECDSA wrappers, rename to SignTx
This commit is contained in:
Péter Szilágyi
2017-01-06 15:55:55 +02:00
committed by GitHub
16 changed files with 58 additions and 99 deletions

View File

@ -119,7 +119,7 @@ func (dl *downloadTester) makeChain(n int, seed byte, parent *types.Block, paren
// If the block number is multiple of 3, send a bonus transaction to the miner
if parent == dl.genesis && i%3 == 0 {
signer := types.MakeSigner(params.TestChainConfig, block.Number())
tx, err := types.NewTransaction(block.TxNonce(testAddress), common.Address{seed}, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(signer, testKey)
tx, err := types.SignTx(types.NewTransaction(block.TxNonce(testAddress), common.Address{seed}, big.NewInt(1000), params.TxGas, nil, nil), signer, testKey)
if err != nil {
panic(err)
}