Skip to content

Commit

Permalink
Merge PR #2346: bugfix in validatorset query and refactor transaction…
Browse files Browse the repository at this point in the history
… search
  • Loading branch information
HaoyangLiu authored and cwgoes committed Sep 17, 2018
1 parent 2263cea commit a3df7af
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/rpc/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions client/tx/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion x/stake/client/rest/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit a3df7af

Please sign in to comment.