diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-05 03:41:24 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-05 03:41:24 +0800 |
commit | eb1c26746d08e6a725fbd64b10f28105684e54db (patch) | |
tree | 1ba3f0f70d06f9cf585e1de052a0731bac57a9ef /core/types/transaction.go | |
parent | eb8f0b85f750b7843bb3909116ea71f85a1988a6 (diff) | |
download | go-tangerine-eb1c26746d08e6a725fbd64b10f28105684e54db.tar.gz go-tangerine-eb1c26746d08e6a725fbd64b10f28105684e54db.tar.zst go-tangerine-eb1c26746d08e6a725fbd64b10f28105684e54db.zip |
Changed R S to big int and fixed tests
Diffstat (limited to 'core/types/transaction.go')
-rw-r--r-- | core/types/transaction.go | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/core/types/transaction.go b/core/types/transaction.go index f5aa89a15..6f438ad9d 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -28,11 +28,27 @@ type Transaction struct { } func NewContractCreationTx(amount, gasLimit, gasPrice *big.Int, data []byte) *Transaction { - return &Transaction{Recipient: nil, Amount: amount, GasLimit: gasLimit, Price: gasPrice, Payload: data} + return &Transaction{ + Recipient: nil, + Amount: amount, + GasLimit: gasLimit, + Price: gasPrice, + Payload: data, + R: new(big.Int), + S: new(big.Int), + } } func NewTransactionMessage(to common.Address, amount, gasAmount, gasPrice *big.Int, data []byte) *Transaction { - return &Transaction{Recipient: &to, Amount: amount, GasLimit: gasAmount, Price: gasPrice, Payload: data} + return &Transaction{ + Recipient: &to, + Amount: amount, + GasLimit: gasAmount, + Price: gasPrice, + Payload: data, + R: new(big.Int), + S: new(big.Int), + } } func NewTransactionFromBytes(data []byte) *Transaction { |