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

[state] Return err if receipt is nil #3759

Merged
merged 4 commits into from Jan 18, 2023
Merged

Conversation

Liuhaai
Copy link
Member

@Liuhaai Liuhaai commented Jan 12, 2023

Description

  1. Refactoring code
  2. An err is returned when receipt is nil
  3. Add protocols into failed tests

Fixes #(issue)
fix #3555

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@Liuhaai Liuhaai changed the title Fix issue 3555 [state] Fix issue 3555 Jan 12, 2023
@Liuhaai Liuhaai changed the title [state] Fix issue 3555 [state] Return nil if receipt is nil Jan 12, 2023
@Liuhaai Liuhaai changed the title [state] Return nil if receipt is nil [state] Return err if receipt is nil Jan 12, 2023
@Liuhaai Liuhaai marked this pull request as draft January 12, 2023 08:53
@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Merging #3759 (428252a) into master (263ff82) will increase coverage by 0.68%.
The diff coverage is 82.51%.

@@            Coverage Diff             @@
##           master    #3759      +/-   ##
==========================================
+ Coverage   74.47%   75.15%   +0.68%     
==========================================
  Files         269      299      +30     
  Lines       23925    25201    +1276     
==========================================
+ Hits        17818    18940    +1122     
- Misses       5174     5287     +113     
- Partials      933      974      +41     
Impacted Files Coverage Δ
action/actctx.go 90.62% <ø> (+6.25%) ⬆️
action/action.go 82.35% <ø> (ø)
action/action_deserializer.go 57.14% <ø> (ø)
action/candidate_update.go 88.88% <0.00%> (-4.14%) ⬇️
action/consignment_transfer.go 90.41% <ø> (ø)
action/const.go 100.00% <ø> (ø)
action/execution.go 83.78% <ø> (ø)
action/grantreward.go 68.57% <ø> (ø)
action/protocol/account/protocol.go 86.90% <ø> (ø)
action/protocol/account/transfer.go 84.61% <ø> (ø)
... and 276 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -36,7 +36,7 @@ var (
)

func init() {
initTestDefaultConfig()
initTestDefaultConfig(&Default)
Copy link
Member

Choose a reason for hiding this comment

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

think we should remove this?

func TestDefault() Genesis {
ge := defaultConfig()
initTestDefaultConfig(&ge)
return ge
Copy link
Member

Choose a reason for hiding this comment

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

make test, and use TestDefault() wherever the test fails

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it can be changed in another pr. This pr is to fix receipt issue.

@Liuhaai Liuhaai marked this pull request as ready for review January 14, 2023 00:59
@sonarcloud
Copy link

sonarcloud bot commented Jan 18, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
6.5% 6.5% Duplication

@Liuhaai Liuhaai merged commit bf2a606 into iotexproject:master Jan 18, 2023
Liuhaai added a commit to Liuhaai/iotex-core that referenced this pull request Feb 13, 2023
dustinxie pushed a commit that referenced this pull request Feb 18, 2023
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.

[workingset] Investigate nil receipt
4 participants