func TestMessage(level uint32, fragment FragID) *Message { wg := graphalg.Weight(fragment) return &Message{ U: &Message_Test{ Test: &Message_TestMsg{ Level: level, Fragment: &wg, }, }, } }
func InitiateMessage(level uint32, fragment FragID, state NodeState) *Message { wg := graphalg.Weight(fragment) return &Message{ U: &Message_Initiate{ Initiate: &Message_InitiateMsg{ Level: level, Fragment: &wg, NodeState: Message_InitiateMsg_NodeState(state), }, }, } }