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

feat(RPC) - GetLastSigningPower on public harmony API #4766

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rpc/harmony/harmony.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,10 @@ func (s *PublicHarmonyService) GetNumPendingCrossLinks() (int, error) {

return len(links), nil
}

// GetLastSigningPower get last signed power
func (s *PublicHarmonyService) GetLastSigningPower(
ctx context.Context,
) (float64, error) {
return s.hmy.NodeAPI.GetLastSigningPower()
}
7 changes: 0 additions & 7 deletions rpc/harmony/public_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,3 @@ func (s *PublicDebugService) SetLogVerbosity(ctx context.Context, level int) (ma
utils.SetLogVerbosity(verbosity)
return map[string]interface{}{"verbosity": verbosity.String()}, nil
}

// GetLastSigningPower get last signed power
func (s *PublicDebugService) GetLastSigningPower(
ctx context.Context,
) (float64, error) {
return s.hmy.NodeAPI.GetLastSigningPower()
}
2 changes: 1 addition & 1 deletion test/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function launch_localnet() {
args=("${args[@]}" --run.legacy)
;;
validator)
args=("${args[@]}" --run.legacy "--rpc.debug=true")
args=("${args[@]}" --run.legacy)
;;
esac

Expand Down