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

core: fix getOnPersistWrapper for native contracts #1331

Merged
merged 1 commit into from
Aug 18, 2020
Merged

Conversation

AnnaShaleva
Copy link
Member

According to manifest, OnPersist.ReturnType is void, so we shouldn't
return anything from it. It's not so important, as we drop this value at
the end of OnPersist invocation.

@codecov
Copy link

codecov bot commented Aug 17, 2020

Codecov Report

Merging #1331 into master will increase coverage by 0.03%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1331      +/-   ##
==========================================
+ Coverage   68.30%   68.33%   +0.03%     
==========================================
  Files         216      216              
  Lines       18584    18587       +3     
==========================================
+ Hits        12694    12702       +8     
+ Misses       5201     5198       -3     
+ Partials      689      687       -2     
Impacted Files Coverage Δ
pkg/core/native/native_nep5.go 72.22% <50.00%> (-0.66%) ⬇️
pkg/smartcontract/parameter.go 83.55% <0.00%> (+1.00%) ⬆️
pkg/rpc/client/wsclient.go 84.56% <0.00%> (+1.34%) ⬆️
pkg/core/native/blocked_accounts.go 75.00% <0.00%> (+8.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58af143...279ebb1. Read the comment docs.

return stackitem.NewBool(f(ic) == nil)
err := f(ic)
if err != nil {
panic(fmt.Errorf("error during calling OnPersist for native contract: %w", err))
Copy link
Member

Choose a reason for hiding this comment

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

I think error during calling can be safely omitted here.

According to manifest, OnPersist.ReturnType is void, so we shouldn't
return anything from it. It's not so important, as we drop this value at
the end of OnPersist invocation.
@roman-khimov roman-khimov merged commit e726df8 into master Aug 18, 2020
@roman-khimov roman-khimov deleted the persist-fix branch August 18, 2020 09:14
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.

None yet

3 participants