|
@ -18,7 +18,7 @@ func BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error) { |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, fmt.Errorf("Error broadcasting transaction: %v", err) |
|
|
return nil, fmt.Errorf("Error broadcasting transaction: %v", err) |
|
|
} |
|
|
} |
|
|
return &ctypes.ResultBroadcastTx{TxID: tx.Hash()}, nil |
|
|
|
|
|
|
|
|
return &ctypes.ResultBroadcastTx{Hash: tx.Hash()}, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Returns with the response from CheckTx
|
|
|
// Returns with the response from CheckTx
|
|
@ -36,7 +36,7 @@ func BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error) { |
|
|
Code: r.Code, |
|
|
Code: r.Code, |
|
|
Data: r.Data, |
|
|
Data: r.Data, |
|
|
Log: r.Log, |
|
|
Log: r.Log, |
|
|
TxID: tx.Hash(), |
|
|
|
|
|
|
|
|
Hash: tx.Hash(), |
|
|
}, nil |
|
|
}, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -68,7 +68,7 @@ func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) { |
|
|
return &ctypes.ResultBroadcastTxCommit{ |
|
|
return &ctypes.ResultBroadcastTxCommit{ |
|
|
CheckTx: checkTxR, |
|
|
CheckTx: checkTxR, |
|
|
DeliverTx: nil, |
|
|
DeliverTx: nil, |
|
|
TxID: tx.Hash(), |
|
|
|
|
|
|
|
|
Hash: tx.Hash(), |
|
|
}, nil |
|
|
}, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -88,7 +88,7 @@ func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) { |
|
|
return &ctypes.ResultBroadcastTxCommit{ |
|
|
return &ctypes.ResultBroadcastTxCommit{ |
|
|
CheckTx: checkTxR, |
|
|
CheckTx: checkTxR, |
|
|
DeliverTx: deliverTxR, |
|
|
DeliverTx: deliverTxR, |
|
|
TxID: tx.Hash(), |
|
|
|
|
|
|
|
|
Hash: tx.Hash(), |
|
|
Height: deliverTxRes.Height, |
|
|
Height: deliverTxRes.Height, |
|
|
}, nil |
|
|
}, nil |
|
|
case <-timer.C: |
|
|
case <-timer.C: |
|
@ -96,7 +96,7 @@ func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) { |
|
|
return &ctypes.ResultBroadcastTxCommit{ |
|
|
return &ctypes.ResultBroadcastTxCommit{ |
|
|
CheckTx: checkTxR, |
|
|
CheckTx: checkTxR, |
|
|
DeliverTx: nil, |
|
|
DeliverTx: nil, |
|
|
TxID: tx.Hash(), |
|
|
|
|
|
|
|
|
Hash: tx.Hash(), |
|
|
}, fmt.Errorf("Timed out waiting for transaction to be included in a block") |
|
|
}, fmt.Errorf("Timed out waiting for transaction to be included in a block") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|