// Execute the leader functions of the given message func (m *CommitEntryMsg) LeaderExecute(state interfaces.IState) { // Check if we have yet to see an entry. If we have seen one (NoEntryYet == false) then // this commit is invalid. if state.NoEntryYet(m.CommitEntry.EntryHash, m.CommitEntry.GetTimestamp()) { state.LeaderExecuteCommitEntry(m) } else { state.FollowerExecuteCommitEntry(m) } }
// Execute the leader functions of the given message func (m *CommitChainMsg) LeaderExecute(state interfaces.IState) { // Check if we have yet to see an entry. If we have seen one (NoEntryYet == false) then // we can record it. if state.NoEntryYet(m.CommitChain.EntryHash, m.CommitChain.GetTimestamp()) { state.LeaderExecuteCommitChain(m) } else { state.FollowerExecuteCommitChain(m) } }