Fix a block condition where cb is called immediately

This commit is contained in:
Jae Kwon 2016-02-08 15:38:18 -08:00
parent a7523015f7
commit 6a209ba3a8
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ func BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
// Note: tx must be signed
func BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
resCh := make(chan *tmsp.Response)
resCh := make(chan *tmsp.Response, 1)
err := mempoolReactor.BroadcastTx(tx, func(res *tmsp.Response) {
resCh <- res
})