more append-entries logic and test coverage