mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-23 19:31:18 +00:00
Merge pull request #453 from tendermint/feature/rename-txid-to-hash
Rename txid to hash
This commit is contained in:
commit
62860e4919
@ -12,7 +12,7 @@ IMPROVEMENTS:
|
||||
|
||||
- CLI now uses Cobra framework
|
||||
- TMROOT is now TMHOME (TMROOT will stop working in 0.10.0)
|
||||
- `/broadcast_tx_XXX` also returns the TxID (can be used to query for the tx)
|
||||
- `/broadcast_tx_XXX` also returns the Hash (can be used to query for the tx)
|
||||
- `/broadcast_tx_commit` also returns the height the block was committed in
|
||||
- ABCIResponses struct persisted to disk before calling Commit; makes handshake replay much cleaner
|
||||
- WAL uses #ENDHEIGHT instead of #HEIGHT (#HEIGHT will stop working in 0.10.0)
|
||||
|
@ -133,8 +133,8 @@ func TestAppCalls(t *testing.T) {
|
||||
}
|
||||
|
||||
// make sure we can lookup the tx with proof
|
||||
// ptx, err := c.Tx(bres.TxID, true)
|
||||
ptx, err := c.Tx(bres.TxID, true)
|
||||
// ptx, err := c.Tx(bres.Hash, true)
|
||||
ptx, err := c.Tx(bres.Hash, true)
|
||||
require.Nil(err, "%d: %+v", i, err)
|
||||
assert.Equal(txh, ptx.Height)
|
||||
assert.Equal(types.Tx(tx), ptx.Tx)
|
||||
|
@ -18,7 +18,7 @@ func BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
|
||||
if err != nil {
|
||||
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
|
||||
@ -36,7 +36,7 @@ func BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
|
||||
Code: r.Code,
|
||||
Data: r.Data,
|
||||
Log: r.Log,
|
||||
TxID: tx.Hash(),
|
||||
Hash: tx.Hash(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
|
||||
return &ctypes.ResultBroadcastTxCommit{
|
||||
CheckTx: checkTxR,
|
||||
DeliverTx: nil,
|
||||
TxID: tx.Hash(),
|
||||
Hash: tx.Hash(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
|
||||
return &ctypes.ResultBroadcastTxCommit{
|
||||
CheckTx: checkTxR,
|
||||
DeliverTx: deliverTxR,
|
||||
TxID: tx.Hash(),
|
||||
Hash: tx.Hash(),
|
||||
Height: deliverTxRes.Height,
|
||||
}, nil
|
||||
case <-timer.C:
|
||||
@ -96,7 +96,7 @@ func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
|
||||
return &ctypes.ResultBroadcastTxCommit{
|
||||
CheckTx: checkTxR,
|
||||
DeliverTx: nil,
|
||||
TxID: tx.Hash(),
|
||||
Hash: tx.Hash(),
|
||||
}, fmt.Errorf("Timed out waiting for transaction to be included in a block")
|
||||
}
|
||||
|
||||
|
@ -84,13 +84,13 @@ type ResultBroadcastTx struct {
|
||||
Data []byte `json:"data"`
|
||||
Log string `json:"log"`
|
||||
|
||||
TxID []byte `json:"tx_id"`
|
||||
Hash []byte `json:"hash"`
|
||||
}
|
||||
|
||||
type ResultBroadcastTxCommit struct {
|
||||
CheckTx *abci.ResponseCheckTx `json:"check_tx"`
|
||||
DeliverTx *abci.ResponseDeliverTx `json:"deliver_tx"`
|
||||
TxID []byte `json:"tx_id"`
|
||||
Hash []byte `json:"hash"`
|
||||
Height int `json:"height"`
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user