Skip to content

Commit

Permalink
reorder wait group done (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
devyetii authored Dec 22, 2023
1 parent fc7adee commit 5697527
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/transaction/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ func SendTransactionSync(txn *Transaction, miners []string) error {
if err != nil {
fails <- err
}
wg.Done()
}() //nolint
}
wg.Wait()
Expand Down Expand Up @@ -297,9 +298,6 @@ func SendTransactionSync(txn *Transaction, miners []string) error {
}

func sendTransactionToURL(url string, txn *Transaction, wg *sync.WaitGroup) ([]byte, error) {
if wg != nil {
defer wg.Done()
}
postReq, err := util.NewHTTPPostRequest(url, txn)
if err != nil {
//Logger.Error("Error in serializing the transaction", txn, err.Error())
Expand Down

0 comments on commit 5697527

Please sign in to comment.