@@ -401,7 +401,11 @@ async def test_wallet_clawback_clawback(self, wallet_environments: WalletTestFra
401
401
402
402
test_fee = 10
403
403
resp = await api_0 .spend_clawback_coins (
404
- {"coin_ids" : [normal_puzhash .hex (), merkle_coin .name ().hex ()], "fee" : test_fee }
404
+ {
405
+ "coin_ids" : [normal_puzhash .hex (), merkle_coin .name ().hex ()],
406
+ "fee" : test_fee ,
407
+ ** wallet_environments .tx_config .to_json_dict (),
408
+ }
405
409
)
406
410
assert resp ["success" ]
407
411
assert len (resp ["transaction_ids" ]) == 1
@@ -530,7 +534,11 @@ async def test_wallet_clawback_sent_self(self, wallet_environments: WalletTestFr
530
534
merkle_coin = tx .additions [0 ] if tx .additions [0 ].amount == tx_amount else tx .additions [1 ]
531
535
test_fee = 10
532
536
resp = await api_0 .spend_clawback_coins (
533
- {"coin_ids" : [merkle_coin .name ().hex (), normal_puzhash .hex ()], "fee" : test_fee }
537
+ {
538
+ "coin_ids" : [merkle_coin .name ().hex (), normal_puzhash .hex ()],
539
+ "fee" : test_fee ,
540
+ ** wallet_environments .tx_config .to_json_dict (),
541
+ }
534
542
)
535
543
assert resp ["success" ]
536
544
assert len (resp ["transaction_ids" ]) == 1
@@ -663,7 +671,11 @@ async def test_wallet_clawback_claim_manual(self, wallet_environments: WalletTes
663
671
merkle_coin = tx .additions [0 ] if tx .additions [0 ].amount == tx_amount else tx .additions [1 ]
664
672
test_fee = 10
665
673
resp = await api_1 .spend_clawback_coins (
666
- {"coin_ids" : [merkle_coin .name ().hex (), normal_puzhash .hex ()], "fee" : test_fee }
674
+ {
675
+ "coin_ids" : [merkle_coin .name ().hex (), normal_puzhash .hex ()],
676
+ "fee" : test_fee ,
677
+ ** wallet_environments .tx_config .to_json_dict (),
678
+ }
667
679
)
668
680
assert resp ["success" ]
669
681
assert len (resp ["transaction_ids" ]) == 1
@@ -2133,6 +2145,24 @@ async def test_forced_new_puzzle_hash(self, wallet_environments: WalletTestFrame
2133
2145
assert tx .spend_bundle is not None
2134
2146
assert len (list (set (coin .puzzle_hash for coin in tx .spend_bundle .additions ()))) == 2
2135
2147
2148
+ @pytest .mark .parametrize (
2149
+ "wallet_environments" ,
2150
+ [{"num_environments" : 1 , "blocks_needed" : [1 ], "reuse_puzhash" : True , "trusted" : True }],
2151
+ indirect = True ,
2152
+ )
2153
+ @pytest .mark .limit_consensus_modes
2154
+ @pytest .mark .anyio
2155
+ async def test_puzzle_hashes_not_committed (self , wallet_environments : WalletTestFramework ) -> None :
2156
+ env = wallet_environments .environments [0 ]
2157
+ wallet = env .xch_wallet
2158
+
2159
+ # Our framework
2160
+ async with wallet .wallet_state_manager .new_action_scope (
2161
+ wallet_environments .tx_config ,
2162
+ push = False ,
2163
+ ) as action_scope :
2164
+ await action_scope .get_puzzle_hash (wallet .wallet_state_manager , override_reuse_puzhash_with = False )
2165
+
2136
2166
2137
2167
def test_get_wallet_db_path_v2_r1 () -> None :
2138
2168
root_path : Path = Path ("/x/y/z/.chia/mainnet" ).resolve ()
0 commit comments