MCPcopy Create free account
hub / github.com/btcsuite/btcd / scriptTestWitnessOffset

Function scriptTestWitnessOffset

txscript/reference_test.go:64–74  ·  view source on GitHub ↗

scriptTestWitnessOffset returns the field offset caused by optional witness data at the beginning of a script_tests.json entry.

(test []interface{})

Source from the content-addressed store, hash-verified

62// scriptTestWitnessOffset returns the field offset caused by optional witness
63// data at the beginning of a script_tests.json entry.
64func scriptTestWitnessOffset(test []interface{}) int {
65 if len(test) == 0 {
66 return 0
67 }
68
69 if _, ok := test[0].([]interface{}); ok {
70 return 1
71 }
72
73 return 0
74}
75
76// scriptTestName returns a descriptive test name for the given reference script
77// test data.

Callers 3

scriptTestNameFunction · 0.85
hasTaprootScriptTestFunction · 0.85
testScriptsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…