mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-24 22:32:15 +00:00
Apply suggestions from code review
Co-Authored-By: melekes <anton.kalyaev@gmail.com>
This commit is contained in:
parent
ca70680728
commit
ecf1d3980a
@ -415,7 +415,7 @@ func BlockResults(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlockR
|
|||||||
tmquery.MustParse(fmt.Sprintf("%s = %d", types.TxHeightKey, height)),
|
tmquery.MustParse(fmt.Sprintf("%s = %d", types.TxHeightKey, height)),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "Failed to search indexer for txs")
|
return nil, errors.Wrap(err, "failed to search indexer for txs")
|
||||||
}
|
}
|
||||||
deliverTxs = make([]*abci.ResponseDeliverTx, len(results))
|
deliverTxs = make([]*abci.ResponseDeliverTx, len(results))
|
||||||
for i, r := range results {
|
for i, r := range results {
|
||||||
@ -429,7 +429,7 @@ func BlockResults(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlockR
|
|||||||
for i, tx := range block.Data.Txs {
|
for i, tx := range block.Data.Txs {
|
||||||
r, err := txIndexer.Get(tx.Hash())
|
r, err := txIndexer.Get(tx.Hash())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(err, "Failed to get Tx (%X) from indexer", tx.Hash())
|
return nil, errors.Wrapf(err, "failed to get Tx (%X) from indexer", tx.Hash())
|
||||||
}
|
}
|
||||||
if r == nil {
|
if r == nil {
|
||||||
return nil, fmt.Errorf("Tx (%X) not found", tx.Hash())
|
return nil, fmt.Errorf("Tx (%X) not found", tx.Hash())
|
||||||
|
@ -45,7 +45,7 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrNoABCIResponses = errors.New("Could not find results")
|
ErrNoABCIResponses = errors.New("could not find results")
|
||||||
)
|
)
|
||||||
|
|
||||||
func (e ErrUnknownBlock) Error() string {
|
func (e ErrUnknownBlock) Error() string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user