(txHash hash.Hash)
| 113 | } |
| 114 | |
| 115 | func 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 | |
| 130 | func addBgServerFlag(cmd *Command) { |
| 131 | cmd.Flag.StringVar(&tmpPath, "tmp-path", "", |
no test coverage detected