From f1c70e7c014b1165d2ab07f68b97ba76abf3c793 Mon Sep 17 00:00:00 2001 From: Matthew Howard Date: Fri, 9 Aug 2024 13:42:03 +0100 Subject: [PATCH] fix fastforwards --- chia/types/blockchain_format/program.py | 8 +------- chia/types/eligible_coin_spends.py | 8 +++----- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/chia/types/blockchain_format/program.py b/chia/types/blockchain_format/program.py index 2ca3c6694dbd..3c08807db6b5 100644 --- a/chia/types/blockchain_format/program.py +++ b/chia/types/blockchain_format/program.py @@ -28,13 +28,7 @@ INFINITE_COST = 11000000000 DEFAULT_FLAGS = ( - ENABLE_SOFTFORK_CONDITION - | ENABLE_BLS_OPS_OUTSIDE_GUARD - | ENABLE_FIXED_DIV - | AGG_SIG_ARGS - | ENABLE_MESSAGE_CONDITIONS - | DISALLOW_INFINITY_G1 - | MEMPOOL_MODE + ENABLE_BLS_OPS_OUTSIDE_GUARD | ENABLE_FIXED_DIV | ENABLE_MESSAGE_CONDITIONS | DISALLOW_INFINITY_G1 | MEMPOOL_MODE ) T_CLVMStorage = TypeVar("T_CLVMStorage", bound=CLVMStorage) diff --git a/chia/types/eligible_coin_spends.py b/chia/types/eligible_coin_spends.py index 80e9fa4b2dfc..46b993884543 100644 --- a/chia/types/eligible_coin_spends.py +++ b/chia/types/eligible_coin_spends.py @@ -7,7 +7,6 @@ from chia.consensus.condition_costs import ConditionCost from chia.consensus.constants import ConsensusConstants -from chia.consensus.cost_calculator import NPCResult from chia.types.blockchain_format.coin import Coin from chia.types.blockchain_format.serialized_program import SerializedProgram from chia.types.blockchain_format.sized_bytes import bytes32 @@ -333,18 +332,17 @@ async def process_fast_forward_spends( ) # We need to run the new spend bundle to make sure it remains valid # generator = simple_solution_generator(new_sb) - assert mempool_item.npc_result.conds is not None + assert mempool_item.conds is not None try: new_sbc_result = get_conditions_from_spendbundle( new_sb, - mempool_item.npc_result.conds.cost, + mempool_item.conds.cost, constants, height, ) except TypeError as e: error = Err(e.args[0]) raise ValueError(f"Mempool item became invalid after singleton fast forward with error {error}.") - new_npc_result = NPCResult(None, new_sbc_result) # Update bundle_coin_spends using the collected data for coin_id in replaced_coin_ids: mempool_item.bundle_coin_spends.pop(coin_id, None) @@ -356,4 +354,4 @@ async def process_fast_forward_spends( # change. Still, it's good form to update the spend bundle with the # new coin spends mempool_item.spend_bundle = new_sb - mempool_item.conds = new_npc_result.conds + mempool_item.conds = new_sbc_result