Skip to content
Snippets Groups Projects
Commit c49e3c05 authored by Jake Taylor's avatar Jake Taylor
Browse files

added comments

parent 383a2c66
No related branches found
No related tags found
No related merge requests found
...@@ -339,6 +339,7 @@ func (c *Client) GetSwitchboard() interfaces.Switchboard { ...@@ -339,6 +339,7 @@ func (c *Client) GetSwitchboard() interfaces.Switchboard {
// events. // events.
func (c *Client) GetRoundEvents() interfaces.RoundEvents { func (c *Client) GetRoundEvents() interfaces.RoundEvents {
jww.INFO.Printf("GetRoundEvents()") jww.INFO.Printf("GetRoundEvents()")
jww.WARN.Printf("GetRoundEvents does not handle Client Errors edge case!")
return c.network.GetInstance().GetRoundEvents() return c.network.GetInstance().GetRoundEvents()
} }
......
...@@ -291,15 +291,15 @@ func (c *Client) RegisterRoundEventsHandler(rid int, cb RoundEventCallback, ...@@ -291,15 +291,15 @@ func (c *Client) RegisterRoundEventsHandler(rid int, cb RoundEventCallback,
} }
// RegisterMessageDeliveryCB allows the caller to get notified if the rounds a // RegisterMessageDeliveryCB allows the caller to get notified if the rounds a
// message was sent in sucesfully completed. Under the hood, this uses the same // message was sent in successfully completed. Under the hood, this uses the same
// interface as RegisterRoundEventsHandler, but provides a convienet way to use // interface as RegisterRoundEventsHandler, but provides a convent way to use
// the interface in its most common form, looking up the result of message // the interface in its most common form, looking up the result of message
// retreval // retrieval
// //
// The callbacks will return at timeoutMS if no state update occurs // The callbacks will return at timeoutMS if no state update occurs
// //
// This function takes the marshaled send report to ensure a memory leak does // This function takes the marshaled send report to ensure a memory leak does
// not occur as a result of both sides of the bindings holding a refrence to // not occur as a result of both sides of the bindings holding a reference to
// the same pointer. // the same pointer.
func (c *Client) RegisterMessageDeliveryCB(marshaledSendReport []byte, func (c *Client) RegisterMessageDeliveryCB(marshaledSendReport []byte,
mdc MessageDeliveryCallback, timeoutMS int) (*Unregister, error) { mdc MessageDeliveryCallback, timeoutMS int) (*Unregister, error) {
......
...@@ -173,6 +173,12 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) { ...@@ -173,6 +173,12 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
return return
} }
// FIXME: Should be able to trigger proper type of round event
// FIXME: without mutating the RoundInfo. Signature also needs verified
// FIXME: before keys are deleted
update.State = uint32(states.FAILED)
m.Instance.GetRoundEvents().TriggerRoundEvent(update)
// Delete all existing keys and trigger a re-registration with the relevant Node // Delete all existing keys and trigger a re-registration with the relevant Node
m.Session.Cmix().Remove(nid) m.Session.Cmix().Remove(nid)
m.Instance.GetAddGatewayChan() <- nGw m.Instance.GetAddGatewayChan() <- nGw
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment