diff --git a/manager/transfer.go b/manager/transfer.go index f0853bd..8d8a2f8 100644 --- a/manager/transfer.go +++ b/manager/transfer.go @@ -22,8 +22,9 @@ func waitConfirmations(s *Sync) error { return err } allConfirmed := false + waitCount := 0 waiting: - for !allConfirmed { + for !allConfirmed || waitCount >= 2 { utxolist, err := s.daemon.UTXOList(&defaultAccount, 1, 10000) if err != nil { return err @@ -37,6 +38,7 @@ waiting: if err != nil { return err } + waitCount++ continue waiting } } diff --git a/sdk/api.go b/sdk/api.go index fe188da..c36f713 100644 --- a/sdk/api.go +++ b/sdk/api.go @@ -146,7 +146,7 @@ func (a *APIConfig) SetChannelCert(certHex string, channelID string) error { body, _ := ioutil.ReadAll(res.Body) if res.StatusCode != http.StatusOK { util.SendErrorToSlack("Error %d while trying to call %s. Waiting to retry", res.StatusCode, endpoint) - log.Debugln(body) + log.Debugln(string(body)) time.Sleep(30 * time.Second) return a.SetChannelCert(certHex, channelID) }