Implement getting missing blocks when RC increases

Issue: RC increases also when the block ref entry is first put by the actual client.
At that point the client is probably already sending us the block content,
so we don't need to do a get...
We should add a delay before the task is added or find something to do.
This commit is contained in:
Alex Auvolat
2020-04-17 15:36:16 +02:00
parent 867646093b
commit e41ce4d815
9 changed files with 327 additions and 141 deletions
+5
View File
@@ -2,6 +2,8 @@ use err_derive::Error;
use hyper::StatusCode;
use std::io;
use crate::data::Hash;
#[derive(Debug, Error)]
pub enum Error {
#[error(display = "IO error: {}", _0)]
@@ -50,6 +52,9 @@ pub enum Error {
#[error(display = "Not found")]
NotFound,
#[error(display = "Corrupt data: does not match hash {:?}", _0)]
CorruptData(Hash),
#[error(display = "{}", _0)]
Message(String),
}