@@ -878,7 +878,7 @@ def mk_coin_spend(coin: Coin, solution: Optional[str] = None) -> CoinSpend:
878
878
return make_spend (
879
879
coin ,
880
880
SerializedProgram .to (None ),
881
- SerializedProgram .to ( bytes . fromhex (solution ) if solution is not None else None ),
881
+ SerializedProgram .fromhex (solution if solution is not None else "80" ),
882
882
)
883
883
884
884
@@ -2991,14 +2991,15 @@ async def test_check_removals_with_block_creation(flags: int, old: bool) -> None
2991
2991
2992
2992
@pytest .mark .anyio
2993
2993
async def test_dedup_not_canonical () -> None :
2994
- # this is 1 , but with a non-canonical encoding
2995
- coin_spend = mk_coin_spend (TEST_COIN , solution = "c00101 " )
2996
- coins = TestCoins (coins = [ ], lineage = {})
2994
+ # this is ((1)) , but with a non-canonical encoding
2995
+ coin_spend = mk_coin_spend (TEST_COIN , solution = "ffffc001018080 " )
2996
+ coins = TestCoins ([ TEST_COIN ], lineage = {})
2997
2997
mempool_manager = await setup_mempool (coins )
2998
2998
sb = SpendBundle ([coin_spend ], G2Element ())
2999
2999
sb_conds = make_test_conds (spend_ids = [(TEST_COIN , ELIGIBLE_FOR_DEDUP )])
3000
3000
bundle_add_info = await mempool_manager .add_spend_bundle (sb , sb_conds , sb .name (), uint32 (1 ))
3001
3001
assert bundle_add_info .status == MempoolInclusionStatus .FAILED
3002
+ assert bundle_add_info .error == Err .INVALID_COIN_SOLUTION
3002
3003
3003
3004
3004
3005
def make_coin_record (coin : Coin , spent_block_index : int = 0 ) -> CoinRecord :
0 commit comments