aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-02 06:05:48 +0800
committerobscuren <geffobscura@gmail.com>2014-07-02 06:05:48 +0800
commitfd1d0bbde7e76b3376a3a932930bc099f223d8ff (patch)
tree797651cec3edfc8b732e93d923264d71e6ece0d6 /ethchain
parentd7e396a98ccafb53b4f632228b670634baeb36a0 (diff)
downloadgo-tangerine-fd1d0bbde7e76b3376a3a932930bc099f223d8ff.tar.gz
go-tangerine-fd1d0bbde7e76b3376a3a932930bc099f223d8ff.tar.zst
go-tangerine-fd1d0bbde7e76b3376a3a932930bc099f223d8ff.zip
Updated to generic padding function
Diffstat (limited to 'ethchain')
-rw-r--r--ethchain/transaction.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/ethchain/transaction.go b/ethchain/transaction.go
index 11f786b36..da3f9bcf2 100644
--- a/ethchain/transaction.go
+++ b/ethchain/transaction.go
@@ -90,10 +90,9 @@ func (tx *Transaction) Signature(key []byte) []byte {
func (tx *Transaction) PublicKey() []byte {
hash := tx.Hash()
- r := make([]byte, 32-len(tx.r))
- s := make([]byte, 32-len(tx.s))
- r = append(r, ethutil.CopyBytes(tx.r)...)
- s = append(s, ethutil.CopyBytes(tx.s)...)
+ // TODO
+ r := ethutil.LeftPadBytes(tx.r, 32)
+ s := ethutil.LeftPadBytes(tx.s, 32)
sig := append(r, s...)
sig = append(sig, tx.v-27)