(maxTime time.Time, tags []byte)
| 21 | const latestOutputVersion = 2 |
| 22 | |
| 23 | func 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 |
no test coverage detected