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

Go through and remove redundant if (IsDZelnodeActive()) checks #173

Closed
blondfrogs opened this issue Feb 25, 2022 · 6 comments
Closed

Go through and remove redundant if (IsDZelnodeActive()) checks #173

blondfrogs opened this issue Feb 25, 2022 · 6 comments
Assignees

Comments

@blondfrogs
Copy link
Member

Now that deterministic zelnodes is active on mainnet for a while. Some places don't need to check if it is active anymore.

This include rpc calls, and some consensus code. We should be careful when removing this check as in some places if could save time while syncing blocks earlier in the chain.

@w2vy
Copy link
Member

w2vy commented Apr 23, 2022

In the current master there are no references to IsDZelnodeActive, this issue can be closed

@blondfrogs
Copy link
Member Author

@w2vy what about IsDFluxnodeActive?

@w2vy
Copy link
Member

w2vy commented Apr 26, 2022

Good point, those I will look at to understand better and then we can talk about which can go.

@w2vy
Copy link
Member

w2vy commented Apr 26, 2022

@blondfrogs
I reviewed all the IsDFluxnodeActive calls and they are all inside src/rpc/zelnode.cpp and defined in src/zelnode/zelnode.cpp

I went back to v5.2.0 (before I touched anything) and the instances of IsDZelnodeActive were the same.

I do see in main.cpp (ConnectBlock), miner.cpp (CreateNewBlock) and zelnode.cpp (rebuildfluxnodedb)
where the block height is compared to StartFluxnodePayments

So it seems IsDFluxnodeActive is only used in the RPC calls.

@blondfrogs
Copy link
Member Author

@w2vy That sounds correct. Lets get together and see if we need them anymore.

@w2vy
Copy link
Member

w2vy commented May 17, 2022

closed with PR#192

@w2vy w2vy closed this as completed May 17, 2022
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

No branches or pull requests

2 participants