// Returns true if this is a message for this server to execute as // a leader. func (m *CommitEntryMsg) Leader(state interfaces.IState) bool { //TODO: implement properly return state.LeaderFor(nil) /* switch state.GetNetworkNumber() { case 0: // Main Network panic("Not implemented yet") case 1: // Test Network panic("Not implemented yet") case 2: // Local Network panic("Not implemented yet") default: panic("Not implemented yet") }*/ }
// Returns true if this is a message for this server to execute as // a leader. func (m *FactoidTransaction) Leader(state interfaces.IState) bool { return state.LeaderFor(constants.FACTOID_CHAINID) }
// Returns true if this is a message for this server to execute as // a leader. func (m *RevealEntryMsg) Leader(state interfaces.IState) bool { return state.LeaderFor(m.Entry.GetHash().Bytes()) }
// Returns true if this is a message for this server to execute as // a leader. func (m *CommitChainMsg) Leader(state interfaces.IState) bool { return state.LeaderFor(constants.EC_CHAINID) }