From 831d2a43980fe162731f6bcdf902febfded026b3 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Tue, 13 Sep 2022 19:50:17 +0900 Subject: [PATCH] tendermint: set value to TotalVotingPower Signed-off-by: Jun Kimura --- chains/tendermint/query.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chains/tendermint/query.go b/chains/tendermint/query.go index 9edf17f1..0d895760 100644 --- a/chains/tendermint/query.go +++ b/chains/tendermint/query.go @@ -323,7 +323,12 @@ func (c *Chain) QueryValsetAtHeight(height clienttypes.Height) (*tmproto.Validat } tmValSet.GetProposer() - return tmValSet.ToProto() + protoValSet, err := tmValSet.ToProto() + if err != nil { + return nil, err + } + protoValSet.TotalVotingPower = tmValSet.TotalVotingPower() + return protoValSet, err } func (c *Chain) toTmValidators(vals stakingtypes.Validators) ([]*tmtypes.Validator, error) {