From 3b76414e55a8af40c93736b2f10e762cba73346a Mon Sep 17 00:00:00 2001 From: Albert Le Batteux Date: Wed, 26 Jun 2024 14:52:10 +0200 Subject: [PATCH] fix(tm2): rpc status validator power (#2447) Error discovered working on https://github.com/gnolang/gno/issues/2430 On `/status` all node are showed with `voting_power=1` ![image](https://github.com/gnolang/gno/assets/8089712/09b3bd4c-3060-4681-a7a1-82c425734d8e) This fixes it :) --- tm2/pkg/bft/rpc/core/status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tm2/pkg/bft/rpc/core/status.go b/tm2/pkg/bft/rpc/core/status.go index 9bc5f3ea6fc..950bac7ddf7 100644 --- a/tm2/pkg/bft/rpc/core/status.go +++ b/tm2/pkg/bft/rpc/core/status.go @@ -125,7 +125,7 @@ func validatorAtHeight(h int64) *types.Validator { lastBlockHeight, vals := consensusState.GetValidators() if lastBlockHeight == h { for _, val := range vals { - if val.Address != privValAddress { + if val.Address == privValAddress { return val } }