Skip to content

Commit ce28dbc

Browse files
committed
rebase - context api changes
1 parent 895c2d6 commit ce28dbc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

consensus/src/marshal/coding/actor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use commonware_cryptography::{
1616
};
1717
use commonware_macros::select;
1818
use commonware_p2p::Recipients;
19-
use commonware_runtime::{Clock, Handle, Metrics, Spawner};
19+
use commonware_runtime::{ContextCell, spawn_cell, Clock, Handle, Metrics, Spawner};
2020
use commonware_utils::futures::{AbortablePool, Aborter};
2121
use futures::{
2222
channel::{mpsc, oneshot},
@@ -75,7 +75,7 @@ where
7575
P: PublicKey,
7676
{
7777
/// Context held by the actor.
78-
context: E,
78+
context: ContextCell<E>,
7979

8080
/// Receiver for incoming messages to the actor.
8181
mailbox: mpsc::Receiver<Message<V, B, S, P>>,
@@ -126,7 +126,7 @@ where
126126
let (sender, mailbox) = mpsc::channel(1000);
127127
(
128128
Self {
129-
context,
129+
context: ContextCell::new(context),
130130
mailbox,
131131
buffer,
132132
block_codec_cfg,
@@ -141,7 +141,7 @@ where
141141

142142
/// Start the actor.
143143
pub fn start(mut self) -> Handle<()> {
144-
self.context.spawn_ref()(self.run())
144+
spawn_cell!(self.context, self.run().await)
145145
}
146146

147147
/// Run the shard actor.

consensus/src/marshal/coding/application.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ where
244244
let participants = self
245245
.supervisor
246246
.participants(round)
247-
.cloned()
248-
.expect("failed to get participants for round");
247+
.expect("failed to get participants for round")
248+
.to_vec();
249249

250250
debug!(
251251
round = %round,

0 commit comments

Comments
 (0)