core/types: make transactions immutable

This commit is contained in:
Felix Lange
2015-06-11 14:05:32 +02:00
committed by Jeffrey Wilcke
parent 9d8b512b27
commit 654564e164
8 changed files with 218 additions and 278 deletions

View File

@ -234,7 +234,7 @@ func (pool *fakeTxPool) GetTransactions() types.Transactions {
func newtx(from *crypto.Key, nonce uint64, datasize int) *types.Transaction {
data := make([]byte, datasize)
tx := types.NewTransactionMessage(common.Address{}, big.NewInt(0), big.NewInt(100000), big.NewInt(0), data)
tx.SetNonce(nonce)
tx := types.NewTransaction(nonce, common.Address{}, big.NewInt(0), big.NewInt(100000), big.NewInt(0), data)
tx, _ = tx.SignECDSA(from.PrivateKey)
return tx
}