crank context timeouts

This commit is contained in:
Ethan Buchman
2017-11-15 01:42:15 +00:00
parent e69d36d54f
commit a969e24177
5 changed files with 15 additions and 8 deletions

View File

@@ -151,7 +151,7 @@ func BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
// | tx | Tx | nil | true | The transaction |
func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
// subscribe to tx being committed in block
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond)
ctx, cancel := context.WithTimeout(context.Background(), subscribeTimeout)
defer cancel()
deliverTxResCh := make(chan interface{})
q := types.EventQueryTx(tx)