Merge PR #2346: bugfix in validatorset query and refactor transaction search
This commit is contained in:
parent
2263cea118
commit
a3df7af428
|
@ -43,7 +43,7 @@ func getBlock(cliCtx context.CLIContext, height *int64) ([]byte, error) {
|
|||
}
|
||||
|
||||
if !cliCtx.TrustNode {
|
||||
check, err := cliCtx.Certify(*height)
|
||||
check, err := cliCtx.Certify(res.Block.Height)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ func getValidators(cliCtx context.CLIContext, height *int64) ([]byte, error) {
|
|||
}
|
||||
|
||||
if !cliCtx.TrustNode {
|
||||
check, err := cliCtx.Certify(*height)
|
||||
check, err := cliCtx.Certify(validatorsRes.BlockHeight)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ func searchTxs(cliCtx context.CLIContext, cdc *codec.Codec, tags []string) ([]In
|
|||
}
|
||||
}
|
||||
|
||||
info, err := FormatTxResults(cdc, cliCtx, res.Txs)
|
||||
info, err := FormatTxResults(cdc, res.Txs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ func searchTxs(cliCtx context.CLIContext, cdc *codec.Codec, tags []string) ([]In
|
|||
}
|
||||
|
||||
// parse the indexed txs into an array of Info
|
||||
func FormatTxResults(cdc *codec.Codec, cliCtx context.CLIContext, res []*ctypes.ResultTx) ([]Info, error) {
|
||||
func FormatTxResults(cdc *codec.Codec, res []*ctypes.ResultTx) ([]Info, error) {
|
||||
var err error
|
||||
out := make([]Info, len(res))
|
||||
for i := range res {
|
||||
|
|
|
@ -40,5 +40,5 @@ func queryTxs(node rpcclient.Client, cliCtx context.CLIContext, cdc *codec.Codec
|
|||
}
|
||||
}
|
||||
|
||||
return tx.FormatTxResults(cdc, cliCtx, res.Txs)
|
||||
return tx.FormatTxResults(cdc, res.Txs)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue