MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / wait

Function wait

cmd/cql/internal/cfg.go:115–128  ·  view source on GitHub ↗
(txHash hash.Hash)

Source from the content-addressed store, hash-verified

113}
114
115func wait(txHash hash.Hash) (err error) {
116 var ctx, cancel = context.WithTimeout(context.Background(), waitTxConfirmationMaxDuration)
117 defer cancel()
118 var state pi.TransactionState
119 state, err = client.WaitTxConfirmation(ctx, txHash)
120 ConsoleLog.WithFields(logrus.Fields{
121 "tx_hash": txHash,
122 "tx_state": state,
123 }).WithError(err).Info("wait transaction confirmation")
124 if err == nil && state != pi.TransactionStateConfirmed {
125 err = errors.New("bad transaction state")
126 }
127 return
128}
129
130func addBgServerFlag(cmd *Command) {
131 cmd.Flag.StringVar(&tmpPath, "tmp-path", "",

Callers 4

runDropFunction · 0.85
runTransferFunction · 0.85
runGrantFunction · 0.85
runCreateFunction · 0.85

Calls 5

WaitTxConfirmationFunction · 0.92
InfoMethod · 0.80
WithErrorMethod · 0.80
WithFieldsMethod · 0.80
NewMethod · 0.65

Tested by

no test coverage detected