in fastpay_core/src/authority.rs [260:278]
fn handle_account_info_request(
&self,
request: AccountInfoRequest,
) -> Result<AccountInfoResponse, FastPayError> {
fp_ensure!(self.in_shard(&request.sender), FastPayError::WrongShard);
let account = self.account_state(&request.sender)?;
let mut response = account.make_account_info(request.sender);
if let Some(seq) = request.request_sequence_number {
if let Some(cert) = account.confirmed_log.get(usize::from(seq)) {
response.requested_certificate = Some(cert.clone());
} else {
fp_bail!(FastPayError::CertificateNotfound)
}
}
if let Some(idx) = request.request_received_transfers_excluding_first_nth {
response.requested_received_transfers = account.received_log[idx..].to_vec();
}
Ok(response)
}