aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/transaction.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-05 03:41:24 +0800
committerobscuren <geffobscura@gmail.com>2015-04-05 03:41:24 +0800
commiteb1c26746d08e6a725fbd64b10f28105684e54db (patch)
tree1ba3f0f70d06f9cf585e1de052a0731bac57a9ef /core/types/transaction.go
parenteb8f0b85f750b7843bb3909116ea71f85a1988a6 (diff)
downloadgo-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.go20
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 {