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

Method RestrictMaxTime

protocol/txbuilder/template.go:157–162  ·  view source on GitHub ↗

RestrictMaxTime sets the template's max time to the given value if it's earlier than the maxtime already present.

(t time.Time)

Source from the content-addressed store, hash-verified

155// RestrictMaxTime sets the template's max time to the given value if
156// it's earlier than the maxtime already present.
157func (tpl *Template) RestrictMaxTime(t time.Time) {
158 ms := bc.Millis(t)
159 if ms < tpl.MaxTimeMS {
160 tpl.MaxTimeMS = ms
161 }
162}
163
164// OnRollback registers a function that can be
165// used to attempt to undo any side effects of building

Callers 1

TestTxBuilderFunction · 0.95

Calls 1

MillisFunction · 0.92

Tested by 1

TestTxBuilderFunction · 0.76