MCPcopy Create free account
hub / github.com/chain/Core / code

Method code

core/txbuilder/constraint.go:51–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49type outputIDConstraint bc.Hash
50
51func (o outputIDConstraint) code() []byte {
52 builder := vmutil.NewBuilder()
53 builder.AddData(bc.Hash(o).Bytes())
54 builder.AddOp(vm.OP_OUTPUTID)
55 builder.AddOp(vm.OP_EQUAL)
56 return builder.Program
57}
58
59// refdataConstraint requires the refdatahash of the transaction (if
60// tx is true) or the input (if tx is false) to match that of the

Callers

nothing calls this directly

Calls 4

AddDataMethod · 0.95
AddOpMethod · 0.95
BytesMethod · 0.45
HashMethod · 0.45

Tested by

no test coverage detected