fn batch_is_ready_to_notify( state: &AppState, batch_state: &BatchNotifyState, batch_id: u64, ) -> bool