Skip to content

Commit

Permalink
Update shard chain to be a reference within the harness (so it can be…
Browse files Browse the repository at this point in the history
… passed around)
  • Loading branch information
villanuevawill committed Sep 26, 2019
1 parent d4292b8 commit 0c9a785
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shard_node/shard_chain/src/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ where
pub beacon_chain: Arc<BeaconChain<CommonBeaconTypes<L, E>>>,
pub keypairs: Vec<Keypair>,
pub beacon_spec: ChainSpec,
pub shard_chain: ShardChain<CommonShardTypes<T, U>, CommonBeaconTypes<L, E>>,
pub shard_chain: Arc<ShardChain<CommonShardTypes<T, U>, CommonBeaconTypes<L, E>>>,
pub shard_spec: ChainSpec,
_phantom_t: PhantomData<T>,
_phantom_u: PhantomData<U>,
Expand Down Expand Up @@ -141,12 +141,13 @@ where
beacon_chain_reference.clone(),
)
.expect("Terminate if beacon chain generation fails");
let shard_chain_reference = Arc::new(shard_chain);

Self {
beacon_chain: beacon_chain_reference.clone(),
keypairs,
beacon_spec,
shard_chain: shard_chain,
shard_chain: shard_chain_reference.clone(),
shard_spec,
_phantom_t: PhantomData,
_phantom_u: PhantomData,
Expand Down

0 comments on commit 0c9a785

Please sign in to comment.