Skip to content
Snippets Groups Projects
Commit 9c9f70f6 authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

Merge branch 'hotfix/BindingsUpdates' into 'release'

Expose GetNodeRegistrationStatus to the bindings

See merge request !313
parents a424681a a5faf82f
No related branches found
No related tags found
2 merge requests!510Release,!313Expose GetNodeRegistrationStatus to the bindings
...@@ -83,13 +83,25 @@ func (c *Cmix) WaitForNetwork(timeoutMS int) bool { ...@@ -83,13 +83,25 @@ func (c *Cmix) WaitForNetwork(timeoutMS int) bool {
// NetworkFollowerStatus gets the state of the network follower. It returns a // NetworkFollowerStatus gets the state of the network follower. It returns a
// status with the following values: // status with the following values:
// Stopped - 0 //
// Running - 2000 // Status:
// Stopping - 3000 // - Stopped - 0
// - Running - 2000
// - Stopping - 3000
func (c *Cmix) NetworkFollowerStatus() int { func (c *Cmix) NetworkFollowerStatus() int {
return int(c.api.NetworkFollowerStatus()) return int(c.api.NetworkFollowerStatus())
} }
// GetNodeRegistrationStatus returns the current state of node registration.
//
// Returns:
// - The number of nodes with which the user is registered.
// - The number of nodes present in the NDF.
// - An error will most likely occur if the network is unhealthy.
func (c *Cmix) GetNodeRegistrationStatus() (int, int, error) {
return c.api.GetNodeRegistrationStatus()
}
// HasRunningProcessies checks if any background threads are running and returns // HasRunningProcessies checks if any background threads are running and returns
// true if one or more are. // true if one or more are.
// //
......
package bindings
...@@ -445,9 +445,9 @@ func (c *Cmix) GetEventReporter() event.Reporter { ...@@ -445,9 +445,9 @@ func (c *Cmix) GetEventReporter() event.Reporter {
} }
// GetNodeRegistrationStatus gets the current state of nodes registration. It // GetNodeRegistrationStatus gets the current state of nodes registration. It
// returns the total number of nodes in the NDF and the number of those that are // returns the number of nodes that the user is currently registered with and
// currently registered with. An error is returned if the network is not // the total number of nodes in the NDF. An error is returned if the network
// healthy. // is not healthy.
func (c *Cmix) GetNodeRegistrationStatus() (int, int, error) { func (c *Cmix) GetNodeRegistrationStatus() (int, int, error) {
// Return an error if the network is not healthy // Return an error if the network is not healthy
if !c.GetCmix().IsHealthy() { if !c.GetCmix().IsHealthy() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment