Skip to content

Commit

Permalink
Small code simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
Senyoret1 committed Nov 11, 2018
1 parent a6c24ea commit 30ac70c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions liteclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package liteclient
import (
"encoding/hex"
"encoding/json"
"log"

"github.com/skycoin/skycoin/src/cipher"
"github.com/skycoin/skycoin/src/coin"
Expand Down Expand Up @@ -143,17 +142,7 @@ func buildTransaction(inputsBody string, outputsBody string, signatureList []str
} else {
newTransaction.Sigs = make([]cipher.Sig, len(signatureList))
for i, sig := range signatureList {
decodedSig, e := hex.DecodeString(sig)
if e != nil {
panic(e)
}

s := cipher.Sig{}
if len(decodedSig) != len(s) {
log.Panic("Invalid signature length")
}
copy(s[:], decodedSig[:])
newTransaction.Sigs[i] = s
newTransaction.Sigs[i] = cipher.MustSigFromHex(sig)
}
}
newTransaction.UpdateHeader()
Expand Down

0 comments on commit 30ac70c

Please sign in to comment.