Enable txindex=1 as default #37

Closed
kodxana wants to merge 211 commits from master into master
Showing only changes of commit 7533672993 - Show all commits

View file

@ -211,11 +211,12 @@ func computeNonWitnessPkScript(sigScript []byte) (PkScript, error) {
// The redeem script will always be the last data push of the
// signature script, so we'll parse the script into opcodes to
// obtain it.
parsedOpcodes, err := parseScript(sigScript)
const scriptVersion = 0
err := checkScriptParses(scriptVersion, sigScript)
if err != nil {
return PkScript{}, err
}
redeemScript := parsedOpcodes[len(parsedOpcodes)-1].data
redeemScript := finalOpcodeData(scriptVersion, sigScript)
scriptHash := hash160(redeemScript)
script, err := payToScriptHashScript(scriptHash)