iotex-core icon indicating copy to clipboard operation
iotex-core copied to clipboard

[ioctl] fix nil point panic

Open huof6829 opened this issue 3 years ago • 2 comments

Description

make run in standalone mode. input ioctl node delegate/probationlist . output shows:

panic: runtime error: invalid memory address or nil pointer dereference 

Fixes #(issue)

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

huof6829 avatar Sep 20 '22 10:09 huof6829

Codecov Report

Merging #3642 (9a66981) into master (e9732a1) will decrease coverage by 0.17%. The diff coverage is 77.81%.

@@            Coverage Diff             @@
##           master    #3642      +/-   ##
==========================================
- Coverage   74.95%   74.77%   -0.18%     
==========================================
  Files         269      269              
  Lines       23819    23888      +69     
==========================================
+ Hits        17854    17863       +9     
- Misses       5039     5095      +56     
- Partials      926      930       +4     
Impacted Files Coverage Δ
db/trie/mptrie/node.go 100.00% <ø> (ø)
ioctl/newcmd/node/nodedelegate.go 70.19% <0.00%> (-0.95%) :arrow_down:
ioctl/newcmd/node/nodeprobationlist.go 90.90% <0.00%> (-4.33%) :arrow_down:
action/protocol/execution/evm/evm.go 44.57% <26.66%> (-0.86%) :arrow_down:
db/trie/mptrie/hashnode.go 36.36% <41.17%> (-54.55%) :arrow_down:
db/trie/mptrie/merklepatriciatrie.go 78.73% <46.80%> (-12.70%) :arrow_down:
db/trie/mptrie/leafiterator.go 62.06% <50.00%> (ø)
action/protocol/execution/evm/evmstatedbadapter.go 65.87% <64.28%> (-0.04%) :arrow_down:
db/trie/mptrie/extensionnode.go 91.91% <94.28%> (-1.07%) :arrow_down:
db/trie/mptrie/branchnode.go 97.60% <98.66%> (-1.01%) :arrow_down:
... and 10 more

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

codecov[bot] avatar Sep 20 '22 10:09 codecov[bot]

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
27.3% 27.3% Duplication

sonarqubecloud[bot] avatar Sep 23 '22 12:09 sonarqubecloud[bot]