Example #1
0
func (m *EOM) FollowerExecute(state interfaces.IState) error {

	state.GetFactoidState().EndOfPeriod(int(m.Minute))

	switch state.GetNetworkNumber() {
	case constants.NETWORK_MAIN: // Main Network
		panic("Not implemented yet")
	case constants.NETWORK_TEST: // Test Network
		panic("Not implemented yet")
	case constants.NETWORK_LOCAL: // Local Network

	default:
		panic(fmt.Sprintf("Not implemented yet: Network Number %d", state.GetNetworkNumber()))
	}

	// fmt.Println(state.GetServerState(), constants.SERVER_MODE)

	if m.Minute == 9 {
		state.ProcessEndOfBlock()
		if state.GetServerState() == constants.SERVER_MODE {
			state.LeaderInMsgQueue() <- m
		}
	}

	return nil
}