MCPcopy Index your code
hub / github.com/chain/Core / submitSingle

Method submitSingle

core/transact.go:138–149  ·  view source on GitHub ↗
(ctx context.Context, tpl *txbuilder.Template, waitUntil string)

Source from the content-addressed store, hash-verified

136}
137
138func (a *API) submitSingle(ctx context.Context, tpl *txbuilder.Template, waitUntil string) (interface{}, error) {
139 if tpl.Transaction == nil {
140 return nil, errors.Wrap(txbuilder.ErrMissingRawTx)
141 }
142
143 err := a.finalizeTxWait(ctx, tpl, waitUntil)
144 if err != nil {
145 return nil, errors.Wrapf(err, "tx %s", tpl.Transaction.ID.String())
146 }
147
148 return map[string]string{"id": tpl.Transaction.ID.String()}, nil
149}
150
151// recordSubmittedTx records a lower bound height at which the tx
152// was first submitted to the tx pool. If this request fails for

Callers 2

submitMethod · 0.95
TestTransferFunction · 0.95

Calls 2

finalizeTxWaitMethod · 0.95
StringMethod · 0.65

Tested by 1

TestTransferFunction · 0.76