72
72
from chia .simulator .wallet_tools import WalletTool
73
73
from chia .solver .solver_service import SolverService
74
74
from chia .timelord .timelord_service import TimelordService
75
- from chia .types .peer_info import PeerInfo
75
+ from chia .types .peer_info import PeerInfo , UnresolvedPeerInfo
76
76
from chia .util .config import create_default_chia_config , lock_and_load_config
77
77
from chia .util .db_wrapper import generate_in_memory_db_uri
78
78
from chia .util .keychain import Keychain
92
92
from chia_rs .sized_ints import uint128
93
93
94
94
from chia ._tests .environments .wallet import WalletEnvironment , WalletState , WalletTestFramework
95
- from chia ._tests .util .setup_nodes import setup_farmer_multi_harvester
95
+ from chia ._tests .util .setup_nodes import setup_farmer_solver_multi_harvester
96
96
from chia .full_node .full_node_rpc_client import FullNodeRpcClient
97
97
from chia .simulator .block_tools import BlockTools , create_block_tools_async , test_constants
98
98
from chia .simulator .keyring import TempKeyring
@@ -866,7 +866,7 @@ async def farmer_one_harvester_simulator_wallet(
866
866
]
867
867
]:
868
868
async with setup_simulators_and_wallets_service (1 , 1 , blockchain_constants ) as (nodes , wallets , bt ):
869
- async with setup_farmer_multi_harvester (bt , 1 , tmp_path , bt .constants , start_services = True ) as (
869
+ async with setup_farmer_solver_multi_harvester (bt , 1 , tmp_path , bt .constants , start_services = True ) as (
870
870
harvester_services ,
871
871
farmer_service ,
872
872
_ ,
@@ -879,7 +879,9 @@ async def farmer_one_harvester_simulator_wallet(
879
879
880
880
@pytest .fixture (scope = "function" )
881
881
async def farmer_one_harvester (tmp_path : Path , get_b_tools : BlockTools ) -> AsyncIterator [FarmerOneHarvester ]:
882
- async with setup_farmer_multi_harvester (get_b_tools , 1 , tmp_path , get_b_tools .constants , start_services = True ) as _ :
882
+ async with setup_farmer_solver_multi_harvester (
883
+ get_b_tools , 1 , tmp_path , get_b_tools .constants , start_services = True
884
+ ) as _ :
883
885
yield _
884
886
885
887
@@ -890,36 +892,41 @@ async def farmer_one_harvester(tmp_path: Path, get_b_tools: BlockTools) -> Async
890
892
async def farmer_one_harvester_solver (
891
893
tmp_path : Path , get_b_tools : BlockTools
892
894
) -> AsyncIterator [FarmerOneHarvesterSolver ]:
893
- async with setup_farmer_multi_harvester (get_b_tools , 1 , tmp_path , get_b_tools .constants , start_services = True ) as (
894
- harvester_services ,
895
- farmer_service ,
896
- bt ,
897
- ):
898
- async with setup_solver (tmp_path / "solver" , bt , bt .constants ) as solver_service :
895
+ async with setup_solver (tmp_path / "solver" , get_b_tools , get_b_tools .constants ) as solver_service :
896
+ solver_peer = UnresolvedPeerInfo ("127.0.0.1" , solver_service ._server .get_port ())
897
+ async with setup_farmer_solver_multi_harvester (
898
+ get_b_tools , 1 , tmp_path , get_b_tools .constants , start_services = True , solver_peer = solver_peer
899
+ ) as (harvester_services , farmer_service , bt ):
899
900
yield harvester_services , farmer_service , solver_service , bt
900
901
901
902
902
903
@pytest .fixture (scope = "function" )
903
904
async def farmer_one_harvester_not_started (
904
905
tmp_path : Path , get_b_tools : BlockTools
905
906
) -> AsyncIterator [tuple [list [HarvesterService ], FarmerService , BlockTools ]]:
906
- async with setup_farmer_multi_harvester (get_b_tools , 1 , tmp_path , get_b_tools .constants , start_services = False ) as _ :
907
+ async with setup_farmer_solver_multi_harvester (
908
+ get_b_tools , 1 , tmp_path , get_b_tools .constants , start_services = False
909
+ ) as _ :
907
910
yield _
908
911
909
912
910
913
@pytest .fixture (scope = "function" )
911
914
async def farmer_two_harvester_not_started (
912
915
tmp_path : Path , get_b_tools : BlockTools
913
916
) -> AsyncIterator [tuple [list [HarvesterService ], FarmerService , BlockTools ]]:
914
- async with setup_farmer_multi_harvester (get_b_tools , 2 , tmp_path , get_b_tools .constants , start_services = False ) as _ :
917
+ async with setup_farmer_solver_multi_harvester (
918
+ get_b_tools , 2 , tmp_path , get_b_tools .constants , start_services = False
919
+ ) as _ :
915
920
yield _
916
921
917
922
918
923
@pytest .fixture (scope = "function" )
919
924
async def farmer_three_harvester_not_started (
920
925
tmp_path : Path , get_b_tools : BlockTools
921
926
) -> AsyncIterator [tuple [list [HarvesterService ], FarmerService , BlockTools ]]:
922
- async with setup_farmer_multi_harvester (get_b_tools , 3 , tmp_path , get_b_tools .constants , start_services = False ) as _ :
927
+ async with setup_farmer_solver_multi_harvester (
928
+ get_b_tools , 3 , tmp_path , get_b_tools .constants , start_services = False
929
+ ) as _ :
923
930
yield _
924
931
925
932
@@ -1302,7 +1309,7 @@ async def farmer_harvester_2_simulators_zero_bits_plot_filter(
1302
1309
]
1303
1310
1304
1311
[harvester_service ], farmer_service , _ = await async_exit_stack .enter_async_context (
1305
- setup_farmer_multi_harvester (bt , 1 , tmp_path , bt .constants , start_services = True )
1312
+ setup_farmer_solver_multi_harvester (bt , 1 , tmp_path , bt .constants , start_services = True )
1306
1313
)
1307
1314
1308
1315
yield farmer_service , harvester_service , simulators [0 ], simulators [1 ], bt
0 commit comments