Fromat moved code in `channel_state.rs`