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

Test Pinned contract does not loop forever #530

Merged
merged 1 commit into from
Jun 7, 2021
Merged

Conversation

alpe
Copy link
Contributor

@alpe alpe commented Jun 7, 2021

Resolves #451

@alpe alpe requested a review from ethanfrey June 7, 2021 09:29
@codecov
Copy link

codecov bot commented Jun 7, 2021

Codecov Report

Merging #530 (470b2da) into master (bbb1669) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #530   +/-   ##
=======================================
  Coverage   58.58%   58.58%           
=======================================
  Files          43       43           
  Lines        4508     4508           
=======================================
  Hits         2641     2641           
  Misses       1649     1649           
  Partials      218      218           
Impacted Files Coverage Δ
x/wasm/keeper/msg_dispatcher.go 95.94% <100.00%> (ø)

Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

anyMsg := []byte(`{}`)
mock.ExecuteFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64) (*wasmvmtypes.Response, uint64, error) {
loops++
return &wasmvmtypes.Response{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I was wondering what contract you modified for this.
A nice bit of Go code for to save the day

@ethanfrey ethanfrey merged commit 94f86e6 into master Jun 7, 2021
@ethanfrey ethanfrey deleted the pinned_submsg_451 branch June 7, 2021 09:44
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.

Test pinned contract submessage loop
2 participants