aboutsummaryrefslogtreecommitdiff
path: root/src/block
diff options
context:
space:
mode:
Diffstat (limited to 'src/block')
-rw-r--r--src/block/manager.rs7
-rw-r--r--src/block/resync.rs2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/block/manager.rs b/src/block/manager.rs
index 2bb9c23d..0ca8bc31 100644
--- a/src/block/manager.rs
+++ b/src/block/manager.rs
@@ -354,8 +354,7 @@ impl BlockManager {
/// Send block to nodes that should have it
pub async fn rpc_put_block(&self, hash: Hash, data: Bytes) -> Result<(), Error> {
- // TODO: use quorums among latest write set
- let who = self.replication.storage_nodes(&hash);
+ let who = self.replication.write_sets(&hash);
let (header, bytes) = DataBlock::from_buffer(data, self.compression_level)
.await
@@ -365,9 +364,9 @@ impl BlockManager {
self.system
.rpc_helper()
- .try_call_many(
+ .try_write_many_sets(
&self.endpoint,
- &who[..],
+ &who,
put_block_rpc,
RequestStrategy::with_priority(PRIO_NORMAL | PRIO_SECONDARY)
.with_quorum(self.replication.write_quorum()),
diff --git a/src/block/resync.rs b/src/block/resync.rs
index 122d0142..15f210e4 100644
--- a/src/block/resync.rs
+++ b/src/block/resync.rs
@@ -434,7 +434,7 @@ impl BlockResyncManager {
.rpc_helper()
.try_call_many(
&manager.endpoint,
- &need_nodes[..],
+ &need_nodes,
put_block_message,
RequestStrategy::with_priority(PRIO_BACKGROUND)
.with_quorum(need_nodes.len()),