Skip to content

Commit d99c8ff

Browse files
committed
Fix
1 parent 9fb1db0 commit d99c8ff

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

src/peer_container.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,13 @@ pub struct SynchronousGameCradle {
340340
}
341341

342342
pub struct SynchronousGameCradleConfig<'a> {
343-
game_types: BTreeMap<GameType, Program>,
344-
have_potato: bool,
345-
identity: &'a ChiaIdentity,
346-
my_contribution: Amount,
347-
their_contribution: Amount,
348-
channel_timeout: Timeout,
349-
reward_puzzle_hash: PuzzleHash,
343+
pub game_types: BTreeMap<GameType, Program>,
344+
pub have_potato: bool,
345+
pub identity: &'a ChiaIdentity,
346+
pub my_contribution: Amount,
347+
pub their_contribution: Amount,
348+
pub channel_timeout: Timeout,
349+
pub reward_puzzle_hash: PuzzleHash,
350350
}
351351

352352
impl SynchronousGameCradle {

src/tests/peer/outsim.rs

+19-15
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use crate::outside::{
2424
};
2525
use crate::peer_container::{
2626
report_coin_changes_to_peer, FullCoinSetAdapter, GameCradle, MessagePeerQueue, MessagePipe,
27-
SynchronousGameCradle, WatchEntry, WatchReport,
27+
SynchronousGameCradle, SynchronousGameCradleConfig, WatchEntry, WatchReport,
2828
};
2929

3030
use crate::tests::calpoker::test_moves_1;
@@ -828,23 +828,27 @@ fn run_calpoker_container_with_action_list(allocator: &mut AllocEncoder, moves:
828828

829829
let cradle1 = SynchronousGameCradle::new(
830830
&mut rng,
831-
game_type_map.clone(),
832-
true,
833-
&identities[0],
834-
Amount::new(100),
835-
Amount::new(100),
836-
Timeout::new(100),
837-
id1.puzzle_hash.clone(),
831+
SynchronousGameCradleConfig {
832+
game_types: game_type_map.clone(),
833+
have_potato: true,
834+
identity: &identities[0],
835+
my_contribution: Amount::new(100),
836+
their_contribution: Amount::new(100),
837+
channel_timeout: Timeout::new(100),
838+
reward_puzzle_hash: id1.puzzle_hash.clone(),
839+
},
838840
);
839841
let cradle2 = SynchronousGameCradle::new(
840842
&mut rng,
841-
game_type_map.clone(),
842-
false,
843-
&identities[1],
844-
Amount::new(100),
845-
Amount::new(100),
846-
Timeout::new(100),
847-
id2.puzzle_hash.clone(),
843+
SynchronousGameCradleConfig {
844+
game_types: game_type_map.clone(),
845+
have_potato: false,
846+
identity: &identities[1],
847+
my_contribution: Amount::new(100),
848+
their_contribution: Amount::new(100),
849+
channel_timeout: Timeout::new(100),
850+
reward_puzzle_hash: id2.puzzle_hash.clone(),
851+
},
848852
);
849853
let mut cradles = [cradle1, cradle2];
850854
let mut game_ids = Vec::default();

0 commit comments

Comments
 (0)