Fetching staker from stakerId is duplicated. #932
Labels
code cleanup
Improvements to make the code clean and more readable.
good first issue
Good for newcomers
Rationale
Staker value is fetched in https://github.com/razor-network/razor-go/blob/33bdf45d066526da1eaa2ac4da8e7f92e5d2f7e2/cmd/vote.go#L154
But while calling
HandleCommit
it is again fetched, increasing the number of RPC call.https://github.com/razor-network/razor-go/blob/33bdf45d066526da1eaa2ac4da8e7f92e5d2f7e2/cmd/vote.go#L279
This can be avoided if we pass
staker
instead ofstakerId
to theHandleCommit
function.Implementation
Pass
staker
instead ofstakerId
and modify the HandleCommit function accordingly.The text was updated successfully, but these errors were encountered: