Skip to content

add new node metric stats #440

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

Merged
merged 13 commits into from
Apr 3, 2025
Merged

add new node metric stats #440

merged 13 commits into from
Apr 3, 2025

Conversation

yungwine
Copy link
Collaborator

No description provided.

@yungwine yungwine changed the base branch from master to dev March 24, 2025 12:06
@igroman787
Copy link
Member

In my opinion, this code is hard to read in places.

For example, it would be possible to rework this piece of code so that the number of indents would not be more than 3 (in the code, the number of indents reached 6)
https://github.com/ton-blockchain/mytonctrl/pull/440/files#diff-da5c176b9d0f8070f8a9c0f5415a032199f6e41b111eeeccf21e8fecf02d9e60R3054-R3061

Or structure it according to one standard, for example like this:
https://github.com/ton-blockchain/mytonctrl/pull/440/files#diff-da5c176b9d0f8070f8a9c0f5415a032199f6e41b111eeeccf21e8fecf02d9e60R3075-R3078

In this piece of code, the 5-level variable dive could be replaced with a separate function to improve readability.
Using index elements with other dives does not improve code readability.
Using single-letter variables also does not improve code readability.
https://github.com/ton-blockchain/mytonctrl/pull/440/files#diff-da5c176b9d0f8070f8a9c0f5415a032199f6e41b111eeeccf21e8fecf02d9e60R3063-R3066

And this piece of code is just hard for me to understand:
https://github.com/ton-blockchain/mytonctrl/pull/440/files#diff-1f3fac37f503c3b4299364a77ba5fe64a5a2693be04a0612ac1abad8d876f913R329-R344

As an example of how I would like to see this code, I will take an old commit #398 and some changes in the code to improve its readability: d153e6f

Of course, it's possible that I've simply gotten older, which has made it harder for me to read other people's code.
But I'm convinced that if you make code easier for others to read, it will be much more valuable for others.

@igroman787 igroman787 merged commit 6910ce9 into ton-blockchain:dev Apr 3, 2025
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.

2 participants