Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(oralce):separate prepareRound from endBlock into beginBlock #3

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

leonz789
Copy link
Owner

@leonz789 leonz789 commented Jul 4, 2024

Description


Closes #XXX

@leonz789 leonz789 force-pushed the develop-oracle-beginblock branch from 7f176ae to 5ca1585 Compare July 6, 2024 17:50
func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {}
func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {
_ = keeper.GetCaches()
agc := keeper.GetAggregatorContext(ctx, am.keeper)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

path flow from Begin/EndBlock to a panic call
Comment on lines +115 to +122
for b, recentParams := range recentParamsMap {
if b <= from && b > prev {
pTmp = common.Params(*recentParams)
agc.SetParams(&pTmp)
prev = b
setCommonParams(*recentParams)
}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
@@ -46,7 +47,9 @@
dogfoodkeeper.Keeper{},
)

ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, log.NewNopLogger())
ctx := sdk.NewContext(stateStore, tmproto.Header{
Time: time.Now().UTC(),

Check warning

Code scanning / CodeQL

Calling the system time Warning test

Calling the system time may be a possible source of non-determinism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant