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

Method IsPayToScriptHash

model/script/script.go:638–644  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

636}
637
638func (s *Script) IsPayToScriptHash() bool {
639 size := len(s.data)
640 return size == 23 &&
641 s.data[0] == opcodes.OP_HASH160 &&
642 s.data[1] == 0x14 &&
643 s.data[22] == opcodes.OP_EQUAL
644}
645
646func (s *Script) IsUnspendable() bool {
647 return (s.Size() > 0 && s.data[0] == opcodes.OP_RETURN) || s.Size() > MaxScriptSize

Callers 4

VerifyScriptFunction · 0.80
getP2SHSigOpCountFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected