Skip to content

Commit

Permalink
fix(baseapp): abci must set headerinfo timestamp when populating the …
Browse files Browse the repository at this point in the history
…context
  • Loading branch information
hussein-aitlahcen committed Dec 4, 2024
1 parent 08bada9 commit 71d4154
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,7 @@ func (app *BaseApp) CreateQueryContextWithCheckHeader(height int64, prove, check
WithHeaderInfo(coreheader.Info{
ChainID: app.chainID,
Height: height,
Time: header.Time,
}).
WithBlockHeader(*header).
WithBlockHeight(height)
Expand All @@ -1316,7 +1317,11 @@ func (app *BaseApp) CreateQueryContextWithCheckHeader(height int64, prove, check
if ok {
cInfo, err := rms.GetCommitInfo(height)
if cInfo != nil && err == nil {
ctx = ctx.WithHeaderInfo(coreheader.Info{Height: height, Time: cInfo.Timestamp})
ctx = ctx.WithHeaderInfo(coreheader.Info{
ChainID: app.chainID,
Height: height,
Time: cInfo.Timestamp,
})
}
}
}
Expand Down

0 comments on commit 71d4154

Please sign in to comment.