MCPcopy Create free account
hub / github.com/chain/txvm / Tuple

Method Tuple

protocol/txvm/txvmutil/builder.go:81–87  ·  view source on GitHub ↗

Tuple executes fn, passing in a TupleBuilder that exposes pushdata operations. All operations performed on the TupleBuilder during fn are shadowed to b. When fn completes, Tuple writes to b instructions to construct a tuple of the pushed data.

(fn func(*TupleBuilder))

Source from the content-addressed store, hash-verified

79// When fn completes, Tuple writes to b instructions to
80// construct a tuple of the pushed data.
81func (b *Builder) Tuple(fn func(*TupleBuilder)) *Builder {
82 tb := TupleBuilder{b: b}
83 fn(&tb)
84 b.PushdataInt64(tb.count)
85 b.Op(op.Tuple)
86 return b
87}
88
89// TupleBuilder wraps a Builder, exposing only pushdata
90// operations.

Callers 3

issueFunction · 0.95
TestBuilderFunction · 0.45
SnapshotFunction · 0.45

Calls 2

PushdataInt64Method · 0.95
OpMethod · 0.95

Tested by 1

TestBuilderFunction · 0.36