Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace get_flags_for_height_and_constants() with Rust version #18435

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading