@@ -53,9 +53,9 @@ async def test_subscribe_for_ph(simulator_and_wallet: OldSimulatorsAndWallets, s
5353 junk_ph = bytes32 (32 * b"\a " )
5454 fake_wallet_peer = fn_server .all_connections [peer_id ]
5555 msg = wallet_protocol .RegisterForPhUpdates ([zero_ph ], uint32 (0 ))
56- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , fake_wallet_peer )
56+ msg_response = await full_node_api .register_for_ph_updates (msg , fake_wallet_peer )
5757
58- assert msg_response .type == ProtocolMessageTypes .respond_to_ph_update .value
58+ assert msg_response .type == ProtocolMessageTypes .respond_to_ph_updates .value
5959 data_response = RespondToCoinUpdates .from_bytes (msg_response .data )
6060 assert data_response .coin_states == []
6161
@@ -68,8 +68,8 @@ async def test_subscribe_for_ph(simulator_and_wallet: OldSimulatorsAndWallets, s
6868 await full_node_api .farm_new_transaction_block (FarmNewBlockProtocol (zero_ph ))
6969
7070 msg = wallet_protocol .RegisterForPhUpdates ([zero_ph ], uint32 (0 ))
71- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , fake_wallet_peer )
72- assert msg_response .type == ProtocolMessageTypes .respond_to_ph_update .value
71+ msg_response = await full_node_api .register_for_ph_updates (msg , fake_wallet_peer )
72+ assert msg_response .type == ProtocolMessageTypes .respond_to_ph_updates .value
7373 data_response = RespondToCoinUpdates .from_bytes (msg_response .data )
7474 # we have already subscribed to this puzzle hash, it will be ignored
7575 # we still receive the updates (see below)
@@ -101,7 +101,7 @@ async def test_subscribe_for_ph(simulator_and_wallet: OldSimulatorsAndWallets, s
101101 # Test subscribing to more coins
102102 one_ph = bytes32 (32 * b"\1 " )
103103 msg = wallet_protocol .RegisterForPhUpdates ([one_ph ], uint32 (0 ))
104- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , fake_wallet_peer )
104+ msg_response = await full_node_api .register_for_ph_updates (msg , fake_wallet_peer )
105105 peak = full_node_api .full_node .blockchain .get_peak ()
106106
107107 for i in range (num_blocks ):
@@ -163,8 +163,8 @@ async def test_subscribe_for_ph(simulator_and_wallet: OldSimulatorsAndWallets, s
163163 assert funds == fn_amount
164164
165165 msg_1 = wallet_protocol .RegisterForPhUpdates ([puzzle_hash ], uint32 (0 ))
166- msg_response_1 = await full_node_api .register_interest_in_puzzle_hash (msg_1 , fake_wallet_peer )
167- assert msg_response_1 .type == ProtocolMessageTypes .respond_to_ph_update .value
166+ msg_response_1 = await full_node_api .register_for_ph_updates (msg_1 , fake_wallet_peer )
167+ assert msg_response_1 .type == ProtocolMessageTypes .respond_to_ph_updates .value
168168 data_response_1 = RespondToCoinUpdates .from_bytes (msg_response_1 .data )
169169 assert len (data_response_1 .coin_states ) == 2 * num_blocks # 2 per height farmer / pool reward
170170
@@ -244,9 +244,9 @@ async def test_subscribe_for_coin_id(simulator_and_wallet: OldSimulatorsAndWalle
244244 coin_to_spend = my_coins [0 ].coin
245245
246246 msg = wallet_protocol .RegisterForCoinUpdates ([coin_to_spend .name ()], uint32 (0 ))
247- msg_response = await full_node_api .register_interest_in_coin (msg , fake_wallet_peer )
247+ msg_response = await full_node_api .register_for_coin_updates (msg , fake_wallet_peer )
248248 assert msg_response is not None
249- assert msg_response .type == ProtocolMessageTypes .respond_to_coin_update .value
249+ assert msg_response .type == ProtocolMessageTypes .respond_to_coin_updates .value
250250 data_response = RespondToCoinUpdates .from_bytes (msg_response .data )
251251 assert data_response .coin_states [0 ].coin == coin_to_spend
252252
@@ -286,9 +286,9 @@ async def test_subscribe_for_coin_id(simulator_and_wallet: OldSimulatorsAndWalle
286286 assert added_target is not None
287287
288288 msg = wallet_protocol .RegisterForCoinUpdates ([added_target .name ()], uint32 (0 ))
289- msg_response = await full_node_api .register_interest_in_coin (msg , fake_wallet_peer )
289+ msg_response = await full_node_api .register_for_coin_updates (msg , fake_wallet_peer )
290290 assert msg_response is not None
291- assert msg_response .type == ProtocolMessageTypes .respond_to_coin_update .value
291+ assert msg_response .type == ProtocolMessageTypes .respond_to_coin_updates .value
292292 data_response = RespondToCoinUpdates .from_bytes (msg_response .data )
293293 assert len (data_response .coin_states ) == 0
294294
@@ -338,7 +338,7 @@ async def test_subscribe_for_ph_reorg(simulator_and_wallet: OldSimulatorsAndWall
338338 await full_node_api .farm_new_transaction_block (FarmNewBlockProtocol (zero_ph ))
339339
340340 msg = wallet_protocol .RegisterForPhUpdates ([puzzle_hash ], uint32 (0 ))
341- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , fake_wallet_peer )
341+ msg_response = await full_node_api .register_for_ph_updates (msg , fake_wallet_peer )
342342 assert msg_response is not None
343343 await full_node_api .farm_new_transaction_block (FarmNewBlockProtocol (puzzle_hash ))
344344
@@ -425,7 +425,7 @@ async def test_subscribe_for_coin_id_reorg(simulator_and_wallet: OldSimulatorsAn
425425
426426 for coin_rec in coin_records :
427427 msg = wallet_protocol .RegisterForCoinUpdates ([coin_rec .name ], uint32 (0 ))
428- msg_response = await full_node_api .register_interest_in_coin (msg , fake_wallet_peer )
428+ msg_response = await full_node_api .register_for_coin_updates (msg , fake_wallet_peer )
429429 assert msg_response is not None
430430
431431 fork_height = uint32 (expected_height - num_blocks - 5 )
@@ -481,8 +481,8 @@ async def test_subscribe_for_hint(simulator_and_wallet: OldSimulatorsAndWallets,
481481
482482 fake_wallet_peer = fn_server .all_connections [peer_id ]
483483 msg = wallet_protocol .RegisterForPhUpdates ([hint ], uint32 (0 ))
484- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , fake_wallet_peer )
485- assert msg_response .type == ProtocolMessageTypes .respond_to_ph_update .value
484+ msg_response = await full_node_api .register_for_ph_updates (msg , fake_wallet_peer )
485+ assert msg_response .type == ProtocolMessageTypes .respond_to_ph_updates .value
486486 data_response = RespondToCoinUpdates .from_bytes (msg_response .data )
487487 assert len (data_response .coin_states ) == 0
488488
@@ -512,8 +512,8 @@ async def test_subscribe_for_hint(simulator_and_wallet: OldSimulatorsAndWallets,
512512 assert notified_state .items [0 ].coin == Coin (coin_spent .name (), hint_puzzle_hash , amount )
513513
514514 msg = wallet_protocol .RegisterForPhUpdates ([hint ], uint32 (0 ))
515- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , fake_wallet_peer )
516- assert msg_response .type == ProtocolMessageTypes .respond_to_ph_update .value
515+ msg_response = await full_node_api .register_for_ph_updates (msg , fake_wallet_peer )
516+ assert msg_response .type == ProtocolMessageTypes .respond_to_ph_updates .value
517517 response = RespondToCoinUpdates .from_bytes (msg_response .data )
518518 # we have already subscribed to this puzzle hash. The full node will
519519 # ignore the duplicate
@@ -548,8 +548,8 @@ async def test_subscribe_for_puzzle_hash_coin_hint_duplicates(
548548 await full_node_api .process_spend_bundles (bundles = [tx ])
549549 # Query the coin states and make sure it doesn't contain duplicated entries
550550 msg = wallet_protocol .RegisterForPhUpdates ([ph ], uint32 (0 ))
551- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , wallet_connection )
552- assert msg_response .type == ProtocolMessageTypes .respond_to_ph_update .value
551+ msg_response = await full_node_api .register_for_ph_updates (msg , wallet_connection )
552+ assert msg_response .type == ProtocolMessageTypes .respond_to_ph_updates .value
553553 response = RespondToCoinUpdates .from_bytes (msg_response .data )
554554 assert len (response .coin_states ) > 0
555555 assert len (set (response .coin_states )) == len (response .coin_states )
@@ -586,10 +586,10 @@ async def test_subscribe_for_hint_long_sync(
586586 fake_wallet_peer = fn_server .all_connections [peer_id ]
587587 fake_wallet_peer_1 = fn_server_1 .all_connections [peer_id_1 ]
588588 msg = wallet_protocol .RegisterForPhUpdates ([hint ], uint32 (0 ))
589- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , fake_wallet_peer )
590- await full_node_api_1 .register_interest_in_puzzle_hash (msg , fake_wallet_peer_1 )
589+ msg_response = await full_node_api .register_for_ph_updates (msg , fake_wallet_peer )
590+ await full_node_api_1 .register_for_ph_updates (msg , fake_wallet_peer_1 )
591591
592- assert msg_response .type == ProtocolMessageTypes .respond_to_ph_update .value
592+ assert msg_response .type == ProtocolMessageTypes .respond_to_ph_updates .value
593593 data_response = RespondToCoinUpdates .from_bytes (msg_response .data )
594594 assert len (data_response .coin_states ) == 0
595595
@@ -655,8 +655,8 @@ async def test_ph_subscribe_limits(simulator_and_wallet: OldSimulatorsAndWallets
655655 full_node_api .full_node .config ["max_subscribe_items" ] = 2
656656 assert full_node_api .is_trusted (con ) is False
657657 msg = wallet_protocol .RegisterForPhUpdates (phs , uint32 (0 ))
658- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , con )
659- assert msg_response .type == ProtocolMessageTypes .respond_to_ph_update .value
658+ msg_response = await full_node_api .register_for_ph_updates (msg , con )
659+ assert msg_response .type == ProtocolMessageTypes .respond_to_ph_updates .value
660660 s = full_node_api .full_node .subscriptions
661661 assert s .puzzle_subscription_count () == 2
662662 assert s .has_puzzle_subscription (phs [0 ])
@@ -666,8 +666,8 @@ async def test_ph_subscribe_limits(simulator_and_wallet: OldSimulatorsAndWallets
666666 full_node_api .full_node .config ["trusted_max_subscribe_items" ] = 4
667667 full_node_api .full_node .config ["trusted_peers" ] = {server_2 .node_id .hex (): server_2 .node_id .hex ()}
668668 assert full_node_api .is_trusted (con ) is True
669- msg_response = await full_node_api .register_interest_in_puzzle_hash (msg , con )
670- assert msg_response .type == ProtocolMessageTypes .respond_to_ph_update .value
669+ msg_response = await full_node_api .register_for_ph_updates (msg , con )
670+ assert msg_response .type == ProtocolMessageTypes .respond_to_ph_updates .value
671671 assert s .puzzle_subscription_count () == 4
672672 assert s .has_puzzle_subscription (phs [0 ])
673673 assert s .has_puzzle_subscription (phs [1 ])
@@ -696,8 +696,8 @@ async def test_coin_subscribe_limits(simulator_and_wallet: OldSimulatorsAndWalle
696696 full_node_api .full_node .config ["max_subscribe_items" ] = 2
697697 assert full_node_api .is_trusted (con ) is False
698698 msg = wallet_protocol .RegisterForCoinUpdates (coins , uint32 (0 ))
699- msg_response = await full_node_api .register_interest_in_coin (msg , con )
700- assert msg_response .type == ProtocolMessageTypes .respond_to_coin_update .value
699+ msg_response = await full_node_api .register_for_coin_updates (msg , con )
700+ assert msg_response .type == ProtocolMessageTypes .respond_to_coin_updates .value
701701 s = full_node_api .full_node .subscriptions
702702 assert s .coin_subscription_count () == 2
703703 assert s .has_coin_subscription (coins [0 ])
@@ -707,8 +707,8 @@ async def test_coin_subscribe_limits(simulator_and_wallet: OldSimulatorsAndWalle
707707 full_node_api .full_node .config ["trusted_max_subscribe_items" ] = 4
708708 full_node_api .full_node .config ["trusted_peers" ] = {server_2 .node_id .hex (): server_2 .node_id .hex ()}
709709 assert full_node_api .is_trusted (con ) is True
710- msg_response = await full_node_api .register_interest_in_coin (msg , con )
711- assert msg_response .type == ProtocolMessageTypes .respond_to_coin_update .value
710+ msg_response = await full_node_api .register_for_coin_updates (msg , con )
711+ assert msg_response .type == ProtocolMessageTypes .respond_to_coin_updates .value
712712 assert s .coin_subscription_count () == 4
713713 assert s .has_coin_subscription (coins [0 ])
714714 assert s .has_coin_subscription (coins [1 ])
0 commit comments