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

Method Commit

protocol/txbuilder/template.go:194–205  ·  view source on GitHub ↗

Commit runs any pending template callbacks.

()

Source from the content-addressed store, hash-verified

192
193// Commit runs any pending template callbacks.
194func (tpl *Template) Commit() error {
195 for _, f := range tpl.callbacks {
196 err := f()
197 if err != nil {
198 tpl.Rollback()
199 return errors.Wrap(err, "running callbacks")
200 }
201 }
202 tpl.rollbacks = nil
203 tpl.callbacks = nil
204 return nil
205}
206
207func asHexBytes(b [][]byte) []i10rjson.HexBytes {
208 var res []i10rjson.HexBytes

Callers

nothing calls this directly

Calls 2

RollbackMethod · 0.95
WrapFunction · 0.92

Tested by

no test coverage detected