We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2256c96 commit bc4cd20Copy full SHA for bc4cd20
spv/verify.go
@@ -54,13 +54,10 @@ func Verify(t *transaction.Transaction,
54
55
inputTotal := uint64(0)
56
for vin, input := range tx.Inputs {
57
- if input.SourceTransaction == nil {
+ sourceOutput := input.SourceTxOutput()
58
+ if sourceOutput == nil {
59
return false, fmt.Errorf("input %d has no source transaction", vin)
60
}
- if input.UnlockingScript == nil || len(*input.UnlockingScript) == 0 {
61
- return false, fmt.Errorf("input %d has no unlocking script", vin)
62
- }
63
- sourceOutput := input.SourceTransaction.Outputs[input.SourceTxOutIndex]
64
inputTotal += sourceOutput.Satoshis
65
sourceTxid := input.SourceTransaction.TxID().String()
66
if _, ok := verifiedTxids[sourceTxid]; !ok {
0 commit comments