Skip to content

Commit

Permalink
Replace get_flags_for_height_and_constants() with Rust version (#18435
Browse files Browse the repository at this point in the history
)

* replace get_flags_for_height_and_constants with rust version

* remove unused imports

* isort
  • Loading branch information
matt-o-how authored Aug 16, 2024
1 parent bd022b0 commit 0a76e22
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions chia/full_node/mempool_check_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
from typing import Dict, List, Optional

from chia_rs import ALLOW_BACKREFS, DISALLOW_INFINITY_G1, ENABLE_BLS_OPS_OUTSIDE_GUARD, ENABLE_FIXED_DIV, MEMPOOL_MODE
from chia_rs import MEMPOOL_MODE, get_flags_for_height_and_constants
from chia_rs import get_puzzle_and_solution_for_coin as get_puzzle_and_solution_for_coin_rust
from chia_rs import run_block_generator, run_block_generator2, run_chia_program

Expand All @@ -30,15 +30,6 @@
log = logging.getLogger(__name__)


def get_flags_for_height_and_constants(height: int, constants: ConsensusConstants) -> int:
flags = ENABLE_BLS_OPS_OUTSIDE_GUARD | ENABLE_FIXED_DIV | ALLOW_BACKREFS

if height >= constants.SOFT_FORK5_HEIGHT:
flags = flags | DISALLOW_INFINITY_G1

return flags


def get_name_puzzle_conditions(
generator: BlockGenerator,
max_cost: int,
Expand Down

0 comments on commit 0a76e22

Please sign in to comment.