Skip to content

[Optimize]: make show state more maintainable#3899

Merged
NGDAdmin merged 2 commits intoneo-project:masterfrom
Wi1l-B0t:optimzie.show-state
Apr 17, 2025
Merged

[Optimize]: make show state more maintainable#3899
NGDAdmin merged 2 commits intoneo-project:masterfrom
Wi1l-B0t:optimzie.show-state

Conversation

@Wi1l-B0t
Copy link
Contributor

Description

Refactor show state command to make it more readable and maintainable.

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

@Wi1l-B0t Wi1l-B0t changed the title [Optimize[: make show state more readable [Optimize[: make show state more maintainable Apr 15, 2025
@Wi1l-B0t Wi1l-B0t changed the title [Optimize[: make show state more maintainable [Optimize]: make show state more maintainable Apr 15, 2025
cschuchardt88
cschuchardt88 previously approved these changes Apr 15, 2025
@shargon
Copy link
Member

shargon commented Apr 16, 2025

Conflicts

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

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

Conflicts to resolve but are minor.

I thought that there were new functionalities but it is a refactor, such as organizing "GetCpuUsage".

@Wi1l-B0t
Copy link
Contributor Author

Conflicts

fixed

@Wi1l-B0t
Copy link
Contributor Author

Conflicts to resolve but are minor.

I thought that there were new functionalities but it is a refactor, such as organizing "GetCpuUsage".

Split this large method into multi smaller and clearer parts

@Jim8y Jim8y requested a review from shargon April 17, 2025 02:36
@Jim8y Jim8y added the NGD Review This pr is an UT/Benchmark PR, NGD can review. label Apr 17, 2025
@Jim8y Jim8y requested a review from NGDAdmin April 17, 2025 03:00
Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

It's better to use UtcNow for time differences, in my country for example we change the time two times per year, if this happens between it will get incorrect results

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

But it's ok for me, we can change it later

@NGDAdmin NGDAdmin merged commit 8116aab into neo-project:master Apr 17, 2025
7 checks passed
Jim8y added a commit to Jim8y/neo that referenced this pull request Apr 17, 2025
* master:
  DBFTPlugin: include consensus time into block interval (neo-project#3900)
  Isolate unit tests (neo-project#3904)
  Use DateTime.UtcNow (neo-project#3902)
  Update workflow (neo-project#3901)
  optimize: show state more readable (neo-project#3899)
  Optimize KeyedCollectionSlim (neo-project#3877)
  Native: move MillisecondsPerBlock setting to native Policy (neo-project#3895)
  optimize: history command support (neo-project#3892)
  Ensure that view interops can't be changed outside (neo-project#3812)
@Wi1l-B0t Wi1l-B0t deleted the optimzie.show-state branch April 19, 2025 08:42
cschuchardt88 pushed a commit to cschuchardt88/neo that referenced this pull request Jun 8, 2025
Co-authored-by: Jimmy <jinghui@wayne.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NGD Review This pr is an UT/Benchmark PR, NGD can review. Ready to Merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants