@@ -834,7 +834,7 @@ def mk_coin_spend(coin: Coin, solution: Optional[str] = None) -> CoinSpend:
834834 return make_spend (
835835 coin ,
836836 SerializedProgram .to (None ),
837- SerializedProgram .to ( bytes . fromhex (solution ) if solution is not None else None ),
837+ SerializedProgram .fromhex (solution if solution is not None else "80" ),
838838 )
839839
840840
@@ -2641,14 +2641,15 @@ async def test_check_removals_with_block_creation(flags: int) -> None:
26412641
26422642@pytest .mark .anyio
26432643async def test_dedup_not_canonical () -> None :
2644- # this is 1 , but with a non-canonical encoding
2645- coin_spend = mk_coin_spend (TEST_COIN , solution = "c00101 " )
2646- coins = TestCoins (coins = [ ], lineage = {})
2644+ # this is ((1)) , but with a non-canonical encoding
2645+ coin_spend = mk_coin_spend (TEST_COIN , solution = "ffffc001018080 " )
2646+ coins = TestCoins ([ TEST_COIN ], lineage = {})
26472647 mempool_manager = await setup_mempool (coins )
26482648 sb = SpendBundle ([coin_spend ], G2Element ())
26492649 sb_conds = make_test_conds (spend_ids = [(TEST_COIN , ELIGIBLE_FOR_DEDUP )])
26502650 bundle_add_info = await mempool_manager .add_spend_bundle (sb , sb_conds , sb .name (), uint32 (1 ))
26512651 assert bundle_add_info .status == MempoolInclusionStatus .FAILED
2652+ assert bundle_add_info .error == Err .INVALID_COIN_SOLUTION
26522653
26532654
26542655def make_coin_record (coin : Coin , spent_block_index : int = 0 ) -> CoinRecord :
0 commit comments