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

Method RemoveOpcode

model/script/script.go:399–408  ·  view source on GitHub ↗
(code byte)

Source from the content-addressed store, hash-verified

397}
398
399func (s *Script) RemoveOpcode(code byte) *Script {
400 parsedOpCodes := make([]opcodes.ParsedOpCode, 0, len(s.ParsedOpCodes))
401 for _, e := range s.ParsedOpCodes {
402 if e.OpValue == code {
403 continue
404 }
405 parsedOpCodes = append(parsedOpCodes, e)
406 }
407 return NewScriptOps(parsedOpCodes)
408}
409
410func ReadScript(reader io.Reader, maxAllowed uint32, fieldName string) (script []byte, err error) {
411 count, err := util.ReadVarInt(reader)

Callers 2

TestScript_RemoveOpcodeFunction · 0.80
SignatureHashFunction · 0.80

Calls 1

NewScriptOpsFunction · 0.85

Tested by 1

TestScript_RemoveOpcodeFunction · 0.64