Commit 9fb52c51 authored by obscuren's avatar obscuren

Changed V to byte. Closes #456

parent 6af078bd
...@@ -23,7 +23,7 @@ type Transaction struct { ...@@ -23,7 +23,7 @@ type Transaction struct {
Recipient []byte Recipient []byte
Amount *big.Int Amount *big.Int
Payload []byte Payload []byte
V uint64 V byte
R, S []byte R, S []byte
} }
...@@ -136,7 +136,7 @@ func (tx *Transaction) Sign(privk []byte) error { ...@@ -136,7 +136,7 @@ func (tx *Transaction) Sign(privk []byte) error {
tx.R = sig[:32] tx.R = sig[:32]
tx.S = sig[32:64] tx.S = sig[32:64]
tx.V = uint64(sig[64] + 27) tx.V = sig[64] + 27
return nil return nil
} }
...@@ -144,7 +144,7 @@ func (tx *Transaction) Sign(privk []byte) error { ...@@ -144,7 +144,7 @@ func (tx *Transaction) Sign(privk []byte) error {
func (tx *Transaction) SetSignatureValues(sig []byte) error { func (tx *Transaction) SetSignatureValues(sig []byte) error {
tx.R = sig[:32] tx.R = sig[:32]
tx.S = sig[32:64] tx.S = sig[32:64]
tx.V = uint64(sig[64] + 27) tx.V = sig[64] + 27
return nil return nil
} }
...@@ -173,7 +173,7 @@ func (tx *Transaction) RlpValueDecode(decoder *ethutil.Value) { ...@@ -173,7 +173,7 @@ func (tx *Transaction) RlpValueDecode(decoder *ethutil.Value) {
tx.Recipient = decoder.Get(3).Bytes() tx.Recipient = decoder.Get(3).Bytes()
tx.Amount = decoder.Get(4).BigInt() tx.Amount = decoder.Get(4).BigInt()
tx.Payload = decoder.Get(5).Bytes() tx.Payload = decoder.Get(5).Bytes()
tx.V = decoder.Get(6).Uint() tx.V = decoder.Get(6).Byte()
tx.R = decoder.Get(7).Bytes() tx.R = decoder.Get(7).Bytes()
tx.S = decoder.Get(8).Bytes() tx.S = decoder.Get(8).Bytes()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment