@@ -834,7 +834,7 @@ def mk_coin_spend(coin: Coin, solution: Optional[str] = None) -> CoinSpend:
834
834
return make_spend (
835
835
coin ,
836
836
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" ),
838
838
)
839
839
840
840
@@ -2641,14 +2641,15 @@ async def test_check_removals_with_block_creation(flags: int) -> None:
2641
2641
2642
2642
@pytest .mark .anyio
2643
2643
async 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 = {})
2647
2647
mempool_manager = await setup_mempool (coins )
2648
2648
sb = SpendBundle ([coin_spend ], G2Element ())
2649
2649
sb_conds = make_test_conds (spend_ids = [(TEST_COIN , ELIGIBLE_FOR_DEDUP )])
2650
2650
bundle_add_info = await mempool_manager .add_spend_bundle (sb , sb_conds , sb .name (), uint32 (1 ))
2651
2651
assert bundle_add_info .status == MempoolInclusionStatus .FAILED
2652
+ assert bundle_add_info .error == Err .INVALID_COIN_SOLUTION
2652
2653
2653
2654
2654
2655
def make_coin_record (coin : Coin , spent_block_index : int = 0 ) -> CoinRecord :
0 commit comments