MCPcopy Create free account
hub / github.com/copernet/copernicus / Test_scriptCompressor_isToScriptID

Function Test_scriptCompressor_isToScriptID

model/txout/compress_test.go:127–139  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

125}
126
127func Test_scriptCompressor_isToScriptID(t *testing.T) {
128 var s *script.Script
129 sc := newScriptCompressor(&s)
130 assert.Nil(t, sc.isToScriptID())
131
132 bs := make([]byte, 23)
133 bs[0] = opcodes.OP_HASH160
134 bs[1] = 20
135 bs[22] = opcodes.OP_EQUAL
136 s = script.NewScriptRaw(bs)
137 sc = newScriptCompressor(&s)
138 assert.NotNil(t, sc.isToScriptID())
139}
140
141func Test_scriptCompressor_isToPubKey(t *testing.T) {
142 var s *script.Script

Callers

nothing calls this directly

Calls 2

newScriptCompressorFunction · 0.85
isToScriptIDMethod · 0.80

Tested by

no test coverage detected