summaryrefslogtreecommitdiffstats
path: root/src/swarm/blob.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/swarm/blob.rs')
-rw-r--r--src/swarm/blob.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/swarm/blob.rs b/src/swarm/blob.rs
index 8c891ae..42cfbf3 100644
--- a/src/swarm/blob.rs
+++ b/src/swarm/blob.rs
@@ -171,8 +171,10 @@ async fn prepare(state: &AppState, id: BlobId) -> Option<Arc<Prepared>> {
}
async fn reply(state: &AppState, peer: &str, id: BlobId, body: BlobBody) {
+ let (epoch, epoch_seq) = state.epoch_stamp().await;
let message = ParsedMessage::Blob(BlobMessage {
- epoch: state.local_epoch(),
+ epoch,
+ epoch_seq,
id,
body,
});
@@ -223,8 +225,10 @@ impl Drop for Registration<'_> {
}
async fn request(state: &AppState, peer: &str, id: BlobId, chunks: Vec<u32>) {
+ let (epoch, epoch_seq) = state.epoch_stamp().await;
let message = ParsedMessage::Blob(BlobMessage {
- epoch: state.local_epoch(),
+ epoch,
+ epoch_seq,
id,
body: BlobBody::Request { chunks },
});