Enable txindex=1 as default #37
1 changed files with 3 additions and 3 deletions
|
@ -836,6 +836,7 @@ func TestCalcSignatureHash(t *testing.T) {
|
||||||
err)
|
err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const scriptVersion = 0
|
||||||
for i, test := range tests {
|
for i, test := range tests {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
// Skip first line -- contains comments only.
|
// Skip first line -- contains comments only.
|
||||||
|
@ -855,15 +856,14 @@ func TestCalcSignatureHash(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
subScript, _ := hex.DecodeString(test[1].(string))
|
subScript, _ := hex.DecodeString(test[1].(string))
|
||||||
parsedScript, err := parseScript(subScript)
|
if err := checkScriptParses(scriptVersion, subScript); err != nil {
|
||||||
if err != nil {
|
|
||||||
t.Errorf("TestCalcSignatureHash failed test #%d: "+
|
t.Errorf("TestCalcSignatureHash failed test #%d: "+
|
||||||
"Failed to parse sub-script: %v", i, err)
|
"Failed to parse sub-script: %v", i, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
hashType := SigHashType(testVecF64ToUint32(test[3].(float64)))
|
hashType := SigHashType(testVecF64ToUint32(test[3].(float64)))
|
||||||
hash, err := calcSignatureHash(parsedScript, hashType, &tx,
|
hash, err := CalcSignatureHash(subScript, hashType, &tx,
|
||||||
int(test[2].(float64)))
|
int(test[2].(float64)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("TestCalcSignatureHash failed test #%d: "+
|
t.Errorf("TestCalcSignatureHash failed test #%d: "+
|
||||||
|
|
Loading…
Reference in a new issue