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

Function NewTemplate

protocol/txbuilder/template.go:23–33  ·  view source on GitHub ↗
(maxTime time.Time, tags []byte)

Source from the content-addressed store, hash-verified

21const latestOutputVersion = 2
22
23func NewTemplate(maxTime time.Time, tags []byte) *Template {
24 tpl := new(Template)
25 if tags != nil {
26 tpl.SetTransactionTags(tags)
27 }
28 maxTimeMS := bc.Millis(maxTime)
29 if tpl.MaxTimeMS == 0 || tpl.MaxTimeMS > maxTimeMS {
30 tpl.MaxTimeMS = maxTimeMS
31 }
32 return tpl
33}
34
35// Template contains the ingredients for a transaction: Issuances,
36// Inputs, Outputs, and Retirements, plus transaction tags and min- and

Callers 1

mainFunction · 0.92

Calls 2

MillisFunction · 0.92
SetTransactionTagsMethod · 0.80

Tested by

no test coverage detected