pushCommitted

suspend fun pushCommitted(entry: LogEntry): LogEntry

Push entry onto committed and advance commitIndex to entry's index.

node.pushCommitted(LogEntry(index = 1, term = 1, command = byteArrayOf(42)))
val entry = node.committed.first()

suspend fun pushCommitted(command: ByteArray): LogEntry

Convenience: create a LogEntry at the next auto-incremented index (term=1) with command, push it onto committed, and return it.

node.pushCommitted("set x=1".encodeToByteArray())
val entry = node.committed.first()