From a61c0f06cfde0909e99950e9f41d88a4d69e6aa2 Mon Sep 17 00:00:00 2001 From: Jonathan Gillham Date: Mon, 13 Oct 2014 13:47:44 +0100 Subject: [PATCH] Removed unnecessary signTxOutputCustomReader. --- script.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/script.go b/script.go index a1e86c072..4e0e165cf 100644 --- a/script.go +++ b/script.go @@ -6,11 +6,9 @@ package btcscript import ( "bytes" - "crypto/rand" "encoding/binary" "errors" "fmt" - "io" "time" "github.com/conformal/btcec" @@ -1116,15 +1114,8 @@ func SignatureScript(tx *btcwire.MsgTx, idx int, subscript []byte, hashType SigH return NewScriptBuilder().AddData(sig).AddData(pkData).Script(), nil } -func signTxOutput(tx *btcwire.MsgTx, idx int, subScript []byte, hashType SigHashType, - key *btcec.PrivateKey) ([]byte, error) { - - return signTxOutputCustomReader(rand.Reader, tx, idx, subScript, - hashType, key) -} - -func signTxOutputCustomReader(reader io.Reader, tx *btcwire.MsgTx, idx int, - subScript []byte, hashType SigHashType, key *btcec.PrivateKey) ([]byte, error) { +func signTxOutput(tx *btcwire.MsgTx, idx int, subScript []byte, + hashType SigHashType, key *btcec.PrivateKey) ([]byte, error) { parsedScript, err := parseScript(subScript) if err != nil { return nil, fmt.Errorf("cannot parse output script: %v", err)