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 of stakerId to the HandleCommit function.
Implementation
Pass staker instead of stakerId and modify the HandleCommit function accordingly.
Rationale
Staker value is fetched in https://github.com/razor-network/razor-go/blob/33bdf45d066526da1eaa2ac4da8e7f92e5d2f7e2/cmd/vote.go#L154
But while calling
HandleCommitit 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
stakerinstead ofstakerIdto theHandleCommitfunction.Implementation
Pass
stakerinstead ofstakerIdand modify the HandleCommit function accordingly.