@@ -579,7 +579,6 @@ def make_bundle_spends_map_and_fee(
579579 bundle_coin_spends [coin_id ] = BundleCoinSpend (
580580 coin_spend = coin_spend ,
581581 eligible_for_dedup = bool (spend_conds .flags & ELIGIBLE_FOR_DEDUP ),
582- eligible_for_fast_forward = bool (spend_conds .flags & ELIGIBLE_FOR_FF ),
583582 additions = additions ,
584583 cost = uint64 (spend_conds .condition_cost + spend_conds .execution_cost ),
585584 latest_singleton_lineage = UnspentLineageInfo (coin_id , coin_spend .coin .parent_coin_info , bytes32 ([0 ] * 32 ))
@@ -890,9 +889,13 @@ def mk_bcs(coin_spend: CoinSpend, flags: int = 0) -> BundleCoinSpend:
890889 return BundleCoinSpend (
891890 coin_spend = coin_spend ,
892891 eligible_for_dedup = bool (flags & ELIGIBLE_FOR_DEDUP ),
893- eligible_for_fast_forward = bool (flags & ELIGIBLE_FOR_FF ),
894892 additions = [],
895893 cost = uint64 (0 ),
894+ latest_singleton_lineage = UnspentLineageInfo (
895+ coin_spend .coin .name (), coin_spend .coin .parent_coin_info , bytes32 ([0 ] * 32 )
896+ )
897+ if flags & ELIGIBLE_FOR_FF
898+ else None ,
896899 )
897900
898901
@@ -1802,16 +1805,16 @@ async def test_bundle_coin_spends() -> None:
18021805 assert mi123e .bundle_coin_spends [coins [i ].name ()] == BundleCoinSpend (
18031806 coin_spend = sb123 .coin_spends [i ],
18041807 eligible_for_dedup = False ,
1805- eligible_for_fast_forward = False ,
18061808 additions = [Coin (coins [i ].name (), IDENTITY_PUZZLE_HASH , coins [i ].amount )],
18071809 cost = uint64 (ConditionCost .CREATE_COIN .value + ConditionCost .AGG_SIG .value + execution_cost ),
1810+ latest_singleton_lineage = None ,
18081811 )
18091812 assert mi123e .bundle_coin_spends [coins [3 ].name ()] == BundleCoinSpend (
18101813 coin_spend = eligible_sb .coin_spends [0 ],
18111814 eligible_for_dedup = True ,
1812- eligible_for_fast_forward = False ,
18131815 additions = [Coin (coins [3 ].name (), IDENTITY_PUZZLE_HASH , coins [3 ].amount )],
18141816 cost = uint64 (ConditionCost .CREATE_COIN .value + execution_cost ),
1817+ latest_singleton_lineage = None ,
18151818 )
18161819
18171820
@@ -2463,7 +2466,7 @@ async def test_new_peak_ff_eviction(
24632466 item = mempool_manager .get_mempool_item (bundle .name ())
24642467 assert item is not None
24652468 singleton_name = singleton_spend .coin .name ()
2466- assert item .bundle_coin_spends [singleton_name ].eligible_for_fast_forward
2469+ assert item .bundle_coin_spends [singleton_name ].supports_fast_forward
24672470 latest_singleton_lineage = item .bundle_coin_spends [singleton_name ].latest_singleton_lineage
24682471 assert latest_singleton_lineage is not None
24692472 assert latest_singleton_lineage .coin_id == singleton_name
@@ -2495,7 +2498,7 @@ async def test_new_peak_ff_eviction(
24952498 else :
24962499 item = mempool_manager .get_mempool_item (bundle .name ())
24972500 assert item is not None
2498- assert item .bundle_coin_spends [singleton_spend .coin .name ()].eligible_for_fast_forward
2501+ assert item .bundle_coin_spends [singleton_spend .coin .name ()].supports_fast_forward
24992502 latest_singleton_lineage = item .bundle_coin_spends [singleton_spend .coin .name ()].latest_singleton_lineage
25002503 assert latest_singleton_lineage is not None
25012504 assert latest_singleton_lineage .coin_id == singleton_spend .coin .name ()
@@ -2552,9 +2555,9 @@ async def test_multiple_ff(use_optimization: bool) -> None:
25522555
25532556 item = mempool_manager .get_mempool_item (bundle .name ())
25542557 assert item is not None
2555- assert item .bundle_coin_spends [singleton_spend1 .coin .name ()].eligible_for_fast_forward
2556- assert item .bundle_coin_spends [singleton_spend2 .coin .name ()].eligible_for_fast_forward
2557- assert not item .bundle_coin_spends [coin_spend .coin .name ()].eligible_for_fast_forward
2558+ assert item .bundle_coin_spends [singleton_spend1 .coin .name ()].supports_fast_forward
2559+ assert item .bundle_coin_spends [singleton_spend2 .coin .name ()].supports_fast_forward
2560+ assert not item .bundle_coin_spends [coin_spend .coin .name ()].supports_fast_forward
25582561
25592562 # spend the singleton coin2 and make coin3 the latest version
25602563 coins .update_lineage (singleton_ph , singleton_spend3 .coin )
@@ -2616,7 +2619,7 @@ async def test_advancing_ff(use_optimization: bool) -> None:
26162619 item = mempool_manager .get_mempool_item (bundle .name ())
26172620 assert item is not None
26182621 spend = item .bundle_coin_spends [spend_a .coin .name ()]
2619- assert spend .eligible_for_fast_forward
2622+ assert spend .supports_fast_forward
26202623 assert spend .latest_singleton_lineage is not None
26212624 assert spend .latest_singleton_lineage .coin_id == spend_a .coin .name ()
26222625
@@ -2628,7 +2631,7 @@ async def test_advancing_ff(use_optimization: bool) -> None:
26282631 item = mempool_manager .get_mempool_item (bundle .name ())
26292632 assert item is not None
26302633 spend = item .bundle_coin_spends [spend_a .coin .name ()]
2631- assert spend .eligible_for_fast_forward
2634+ assert spend .supports_fast_forward
26322635 assert spend .latest_singleton_lineage is not None
26332636 assert spend .latest_singleton_lineage .coin_id == spend_b .coin .name ()
26342637
@@ -2640,7 +2643,7 @@ async def test_advancing_ff(use_optimization: bool) -> None:
26402643 item = mempool_manager .get_mempool_item (bundle .name ())
26412644 assert item is not None
26422645 spend = item .bundle_coin_spends [spend_a .coin .name ()]
2643- assert spend .eligible_for_fast_forward
2646+ assert spend .supports_fast_forward
26442647 assert spend .latest_singleton_lineage is not None
26452648 assert spend .latest_singleton_lineage .coin_id == spend_c .coin .name ()
26462649
0 commit comments