diff --git a/types/context.go b/types/context.go index 6547dcb44a9c..02d77ca46cb9 100644 --- a/types/context.go +++ b/types/context.go @@ -92,6 +92,9 @@ func (c Context) CometInfo() comet.Info { return c.comet func (c Context) HeaderInfo() header.Info { return c.headerInfo } // BlockHeader returns the header by value. +// Note, only ChainID, Time and Height are always filled by baseapp. +// In finalize block, the proposer address, validator hash and app hash are also filled. +// Use CometInfo service and/or the Consensus Keeper for getting more information. func (c Context) BlockHeader() cmtproto.Header { return c.header } diff --git a/x/auth/ante/expected_keepers.go b/x/auth/ante/expected_keepers.go index 2c6214a4ab68..12390198d7a7 100644 --- a/x/auth/ante/expected_keepers.go +++ b/x/auth/ante/expected_keepers.go @@ -28,5 +28,6 @@ type FeegrantKeeper interface { } type ConsensusKeeper interface { + AppVersion(ctx context.Context) (uint64, error) BlockParams(context.Context) (uint64, uint64, error) } diff --git a/x/auth/ante/testutil/expected_keepers_mocks.go b/x/auth/ante/testutil/expected_keepers_mocks.go index 0ce54e8a0a98..6342b25aa8ee 100644 --- a/x/auth/ante/testutil/expected_keepers_mocks.go +++ b/x/auth/ante/testutil/expected_keepers_mocks.go @@ -202,6 +202,21 @@ func (m *MockConsensusKeeper) EXPECT() *MockConsensusKeeperMockRecorder { return m.recorder } +// AppVersion mocks base method. +func (m *MockConsensusKeeper) AppVersion(ctx context.Context) (uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AppVersion", ctx) + ret0, _ := ret[0].(uint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AppVersion indicates an expected call of AppVersion. +func (mr *MockConsensusKeeperMockRecorder) AppVersion(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppVersion", reflect.TypeOf((*MockConsensusKeeper)(nil).AppVersion), ctx) +} + // BlockParams mocks base method. func (m *MockConsensusKeeper) BlockParams(arg0 context.Context) (uint64, uint64, error) { m.ctrl.T.Helper()