aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/rpc_helper.rs18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/rpc/rpc_helper.rs b/src/rpc/rpc_helper.rs
index 12d073b6..1bad495b 100644
--- a/src/rpc/rpc_helper.rs
+++ b/src/rpc/rpc_helper.rs
@@ -327,7 +327,13 @@ impl RpcHelper {
Ok(successes)
} else {
let errors = errors.iter().map(|e| format!("{}", e)).collect::<Vec<_>>();
- Err(Error::Quorum(quorum, successes.len(), to.len(), errors))
+ Err(Error::Quorum(
+ quorum,
+ None,
+ successes.len(),
+ to.len(),
+ errors,
+ ))
}
}
@@ -469,7 +475,7 @@ impl RpcHelper {
}
}
- if set_counters.iter().all(|x| x.0 > quorum) {
+ if set_counters.iter().all(|x| x.0 >= quorum) {
// Success
// Continue all other requets in background
@@ -492,6 +498,12 @@ impl RpcHelper {
// Failure, could not get quorum
let errors = errors.iter().map(|e| format!("{}", e)).collect::<Vec<_>>();
- Err(Error::Quorum(quorum, successes.len(), peers.len(), errors))
+ Err(Error::Quorum(
+ quorum,
+ Some(to_sets.len()),
+ successes.len(),
+ peers.len(),
+ errors,
+ ))
}
}