From 0d9b416cbcfd6092519704fae768a3e40b8fba65 Mon Sep 17 00:00:00 2001 From: Alexander Peters Date: Fri, 27 Sep 2024 13:11:30 +0200 Subject: [PATCH] fix(sims): Use liveness matrix for val sign status in sims (#21952) --- CHANGELOG.md | 4 ++-- x/simulation/mock_cometbft.go | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82fc8831f1..a100df6fad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,8 +54,8 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (sims) [#21613](https://github.com/cosmos/cosmos-sdk/pull/21613) Add sims2 framework and factory methods for simpler message factories in modules ### Bug Fixes - -* (sims) [21906](https://github.com/cosmos/cosmos-sdk/pull/21906) Skip sims test when running dry on validators +* (sims) [#21952](https://github.com/cosmos/cosmos-sdk/pull/21952) Use liveness matrix for validator sign status in sims +* (sims) [#21906](https://github.com/cosmos/cosmos-sdk/pull/21906) Skip sims test when running dry on validators * (cli) [#21919](https://github.com/cosmos/cosmos-sdk/pull/21919) Query address-by-acc-num by account_id instead of id. ### API Breaking Changes diff --git a/x/simulation/mock_cometbft.go b/x/simulation/mock_cometbft.go index c9572dd469..691494c64f 100644 --- a/x/simulation/mock_cometbft.go +++ b/x/simulation/mock_cometbft.go @@ -151,10 +151,13 @@ func RandomRequestFinalizeBlock( signed = false } + var commitStatus cmtproto.BlockIDFlag if signed { event("begin_block", "signing", "signed") + commitStatus = cmtproto.BlockIDFlagCommit } else { event("begin_block", "signing", "missed") + commitStatus = cmtproto.BlockIDFlagAbsent } voteInfos[i] = abci.VoteInfo{ @@ -162,7 +165,7 @@ func RandomRequestFinalizeBlock( Address: SumTruncated(mVal.val.PubKeyBytes), Power: mVal.val.Power, }, - BlockIdFlag: cmtproto.BlockIDFlagCommit, + BlockIdFlag: commitStatus, } }