Skip to content

Commit

Permalink
dont save 0 dc packet reports in iot verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgrunewald committed Feb 23, 2024
1 parent bc62240 commit 7132d5e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions iot_verifier/src/packet_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,15 @@ impl PacketLoader {
file_info_stream
.into_stream(&mut transaction)
.await?
.map(|valid_packet| {
(
ValidPacket::from(valid_packet.clone()),
GatewayDCShare::share_from_packet(&valid_packet),
)
.filter_map(|valid_packet| async move {
if valid_packet.num_dcs > 0 {
Some((
ValidPacket::from(valid_packet.clone()),
GatewayDCShare::share_from_packet(&valid_packet),
))
} else {
None
}
})
.map(anyhow::Ok)
.try_fold(
Expand Down

0 comments on commit 7132d5e

Please sign in to comment.