repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/nft_wallet/test_nft_puzzles.py
tests/wallet/nft_wallet/test_nft_puzzles.py
from __future__ import annotations from secrets import token_bytes from typing import Tuple from clvm.casts import int_from_bytes from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_bytes import bytes32 from flax.wallet.nft_wallet import uncurry_nft from flax.wallet.nft_w...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/nft_wallet/test_nft_lifecycle.py
tests/wallet/nft_wallet/test_nft_lifecycle.py
from __future__ import annotations import itertools from typing import List, Tuple import pytest from blspy import G2Element from flax.clvm.spend_sim import SimClient, SpendSim from flax.types.announcement import Announcement from flax.types.blockchain_format.program import Program from flax.types.blockchain_format....
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/db_wallet/test_db_graftroot.py
tests/wallet/db_wallet/test_db_graftroot.py
from __future__ import annotations from typing import Dict, List, Tuple import pytest from blspy import G2Element from flax.clvm.spend_sim import SimClient, SpendSim from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_byt...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/db_wallet/config.py
tests/wallet/db_wallet/config.py
from __future__ import annotations checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/db_wallet/__init__.py
tests/wallet/db_wallet/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/db_wallet/test_dl_offers.py
tests/wallet/db_wallet/test_dl_offers.py
from __future__ import annotations import dataclasses from typing import Any, List, Tuple import pytest from flax.data_layer.data_layer_wallet import DataLayerWallet from flax.simulator.time_out_assert import time_out_assert from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.ints import uint...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/db_wallet/test_dl_wallet.py
tests/wallet/db_wallet/test_dl_wallet.py
from __future__ import annotations import asyncio import dataclasses from typing import Any, AsyncIterator, Iterator, List import pytest import pytest_asyncio from flax.data_layer.data_layer_wallet import DataLayerWallet, Mirror from flax.simulator.simulator_protocol import FarmNewBlockProtocol from flax.simulator.t...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/cat_wallet/test_trades.py
tests/wallet/cat_wallet/test_trades.py
from __future__ import annotations import asyncio from secrets import token_bytes from typing import Any, Dict, List import pytest from flax.consensus.cost_calculator import NPCResult from flax.full_node.bundle_tools import simple_solution_generator from flax.full_node.mempool_check_conditions import get_name_puzzle...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/cat_wallet/test_cat_lifecycle.py
tests/wallet/cat_wallet/test_cat_lifecycle.py
from typing import List, Tuple, Optional, Dict import pytest from blspy import PrivateKey, AugSchemeMPL, G2Element from clvm.casts import int_to_bytes from flax.clvm.spend_sim import SpendSim, SimClient from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.program import Program from fl...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/cat_wallet/test_cat_outer_puzzle.py
tests/wallet/cat_wallet/test_cat_outer_puzzle.py
from __future__ import annotations from typing import Optional import pytest from clvm_tools.binutils import disassemble from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.coin_spend ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/cat_wallet/config.py
tests/wallet/cat_wallet/config.py
# flake8: noqa: E501 from __future__ import annotations job_timeout = 50 checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/cat_wallet/test_offer_lifecycle.py
tests/wallet/cat_wallet/test_offer_lifecycle.py
from typing import Any, Dict, Optional, List import pytest from blspy import G2Element from flax.types.announcement import Announcement from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_bytes import bytes32 from flax.typ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/cat_wallet/__init__.py
tests/wallet/cat_wallet/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/cat_wallet/test_cat_wallet.py
tests/wallet/cat_wallet/test_cat_wallet.py
import asyncio from typing import List import pytest from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from flax.full_node.mempool_manager import MempoolManager from flax.simulator.simulator_protocol import FarmNewBlockProtocol, ReorgProtocol from flax.types.blockchain_forma...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/did_wallet/test_did.py
tests/wallet/did_wallet/test_did.py
import json from typing import Optional import pytest from blspy import AugSchemeMPL, G1Element, G2Element from flax.consensus.block_rewards import calculate_pool_reward, calculate_base_farmer_reward from flax.rpc.wallet_rpc_api import WalletRpcApi from flax.simulator.simulator_protocol import FarmNewBlockProtocol fr...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/did_wallet/config.py
tests/wallet/did_wallet/config.py
# flake8: noqa: E501 from __future__ import annotations job_timeout = 50 checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/did_wallet/__init__.py
tests/wallet/did_wallet/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/sync/test_wallet_sync.py
tests/wallet/sync/test_wallet_sync.py
from __future__ import annotations from typing import List, Optional, Set import pytest from aiosqlite import Error as AIOSqliteError from colorlog import getLogger from flax.consensus.block_record import BlockRecord from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from fl...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/sync/config.py
tests/wallet/sync/config.py
from __future__ import annotations job_timeout = 60 checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/wallet/sync/__init__.py
tests/wallet/sync/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/generator/test_scan.py
tests/generator/test_scan.py
from unittest import TestCase from flax.full_node.bundle_tools import ( match_standard_transaction_at_any_index, match_standard_transaction_exactly_and_return_pubkey, ) from flax.util.byte_types import hexstr_to_bytes gen1 = hexstr_to_bytes( "ff01ffffffa0000000000000000000000000000000000000000000000000000...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/generator/test_generator_types.py
tests/generator/test_generator_types.py
from typing import Dict from unittest import TestCase from flax.types.blockchain_format.program import Program, SerializedProgram from flax.types.generator_types import GeneratorBlockCacheInterface from flax.full_node.generator import create_block_generator, create_generator_args from flax.util.ints import uint32 gen...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/generator/test_compression.py
tests/generator/test_compression.py
# flake8: noqa: F501 from dataclasses import dataclass from typing import List, Any from unittest import TestCase from flax.full_node.bundle_tools import ( bundle_suitable_for_compression, compressed_coin_spend_entry_list, compressed_spend_bundle_solution, match_standard_transaction_at_any_index, s...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/generator/config.py
tests/generator/config.py
from __future__ import annotations parallel = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/generator/__init__.py
tests/generator/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/generator/test_list_to_batches.py
tests/generator/test_list_to_batches.py
import pytest from flax.util.generator_tools import list_to_batches def test_empty_lists(): # An empty list should return an empty iterator and skip the loop's body. for _, _ in list_to_batches([], 1): assert False def test_valid(): for k in range(1, 10): test_list = [x for x in range(0,...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/generator/test_rom.py
tests/generator/test_rom.py
from clvm_tools import binutils from clvm_tools.clvmc import compile_clvm_text from flax.full_node.generator import run_generator_unsafe from flax.full_node.mempool_check_conditions import get_name_puzzle_conditions from flax.types.blockchain_format.program import Program, SerializedProgram from flax.types.blockchain_...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/simulation/test_simulation.py
tests/simulation/test_simulation.py
from typing import AsyncIterator, List, Tuple import pytest import pytest_asyncio from flax.cmds.units import units from flax.consensus.block_rewards import calculate_pool_reward, calculate_base_farmer_reward from flax.server.server import FlaxServer from flax.simulator.block_tools import create_block_tools_async, Bl...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/simulation/test_start_simulator.py
tests/simulation/test_start_simulator.py
from __future__ import annotations import asyncio from pathlib import Path from typing import Any, AsyncGenerator, Dict, Optional, Tuple import pytest import pytest_asyncio from flax.simulator.full_node_simulator import FullNodeSimulator from flax.simulator.simulator_full_node_rpc_client import SimulatorFullNodeRpcC...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/simulation/config.py
tests/simulation/config.py
from __future__ import annotations job_timeout = 60 install_timelord = True checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/simulation/__init__.py
tests/simulation/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/db/__init__.py
tests/db/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/db/test_db_wrapper.py
tests/db/test_db_wrapper.py
from __future__ import annotations import asyncio import contextlib from typing import TYPE_CHECKING, Callable, List import aiosqlite import pytest # TODO: update after resolution in https://github.com/pytest-dev/pytest/issues/7469 from _pytest.fixtures import SubRequest from flax.util.db_wrapper import DBWrapper2 ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_program.py
tests/clvm/test_program.py
from unittest import TestCase from flax.types.blockchain_format.program import Program from clvm.EvalError import EvalError from clvm.operators import KEYWORD_TO_ATOM from clvm_tools.binutils import assemble, disassemble class TestProgram(TestCase): def test_at(self): p = Program.to([10, 20, 30, [15, 17]...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_serialized_program.py
tests/clvm/test_serialized_program.py
from unittest import TestCase from flax.types.blockchain_format.program import Program, SerializedProgram, INFINITE_COST from flax.wallet.puzzles.load_clvm import load_clvm SHA256TREE_MOD = load_clvm("sha256tree_module.clvm") # TODO: test multiple args class TestSerializedProgram(TestCase): def test_tree_hash(s...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/benchmark_costs.py
tests/clvm/benchmark_costs.py
from flax.types.blockchain_format.program import INFINITE_COST from flax.types.spend_bundle import SpendBundle from flax.types.generator_types import BlockGenerator from flax.consensus.cost_calculator import NPCResult from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.full_node.bundle_tools import...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_puzzle_drivers.py
tests/clvm/test_puzzle_drivers.py
from __future__ import annotations from typing import Any, Dict, Union import pytest from flax.types.blockchain_format.program import Program from flax.wallet.puzzle_drivers import PuzzleInfo, Solver def test_puzzle_info() -> None: test_driver: Dict[str, Any] = { "string": "hello", "bytes": "0x...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_puzzles.py
tests/clvm/test_puzzles.py
from __future__ import annotations from typing import Iterable, List, Tuple from unittest import TestCase from blspy import AugSchemeMPL, BasicSchemeMPL, G1Element, G2Element from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.coin_spe...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/coin_store.py
tests/clvm/coin_store.py
from collections import defaultdict from dataclasses import dataclass, replace from typing import Dict, Iterator, Optional from flax.full_node.mempool_check_conditions import mempool_check_time_locks, get_name_puzzle_conditions from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.sized_...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_curry_and_treehash.py
tests/clvm/test_curry_and_treehash.py
from __future__ import annotations from flax.types.blockchain_format.program import Program from flax.wallet.puzzles import p2_delegated_puzzle_or_hidden_puzzle # import (puzzle_for_pk, puzzle_hash_for_pk, MOD) from flax.wallet.util.curry_and_treehash import calculate_hash_of_quoted_mod_hash, curry_and_treehash def...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_singletons.py
tests/clvm/test_singletons.py
import pytest from typing import List, Tuple, Optional from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.blockchain_format.coin import Coin from flax.types.coin_spend i...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_clvm_step.py
tests/clvm/test_clvm_step.py
from __future__ import annotations from typing import Any, Optional from unittest import TestCase from clvm_tools_rs import start_clvm_program factorial = ( "ff02ffff01ff02ff02ffff04ff02ffff04ff05ff80808080ffff04ffff01ff02" + "ffff03ffff09ff05ffff010180ffff01ff0101ffff01ff12ff05ffff02ff02ff" + "ff04ff02f...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/config.py
tests/clvm/config.py
from __future__ import annotations parallel = True checkout_blocks_and_plots = False
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/__init__.py
tests/clvm/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_spend_sim.py
tests/clvm/test_spend_sim.py
import pytest from blspy import G2Element from flax.clvm.spend_sim import SpendSim, SimClient from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.blockchain_format.program import Program from flax.types.spend_bundle import SpendBundle from flax.types.coin_spend import CoinSpend class TestSp...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_puzzle_compression.py
tests/clvm/test_puzzle_compression.py
from blspy import G1Element, G2Element from typing import Dict from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.blockchain_format.coin import Coin from flax.types.spend_bundle import SpendBundle from flax.types.coin_spend import CoinS...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/clvm/test_flaxlisp_deserialization.py
tests/clvm/test_flaxlisp_deserialization.py
from unittest import TestCase from flax.types.blockchain_format.program import Program, INFINITE_COST from flax.util.byte_types import hexstr_to_bytes from flax.wallet.puzzles.load_clvm import load_clvm DESERIALIZE_MOD = load_clvm("flaxlisp_deserialisation.clvm", package_or_requirement="flax.wallet.puzzles") def se...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/fee_estimation/test_fee_estimation_unit_tests.py
tests/fee_estimation/test_fee_estimation_unit_tests.py
from __future__ import annotations import logging from typing import List from chia_rs import Coin from flax.consensus.cost_calculator import NPCResult from flax.full_node.bitcoin_fee_estimator import create_bitcoin_fee_estimator from flax.full_node.fee_estimation import FeeBlockInfo from flax.full_node.fee_estimato...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/fee_estimation/test_fee_estimation_rpc.py
tests/fee_estimation/test_fee_estimation_rpc.py
from __future__ import annotations from typing import List, Tuple import pytest import pytest_asyncio from flax.full_node.full_node import FullNode from flax.rpc.full_node_rpc_api import FullNodeRpcApi from flax.rpc.full_node_rpc_client import FullNodeRpcClient from flax.server.start_service import Service from flax...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/fee_estimation/cmdline_test.py
tests/fee_estimation/cmdline_test.py
from __future__ import annotations import subprocess import sysconfig from pathlib import Path from typing import Tuple, Union from click.testing import CliRunner from flax.cmds.flax import cli from flax.full_node.full_node_api import FullNodeAPI from flax.server.server import FlaxServer from flax.simulator.block_to...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/fee_estimation/__init__.py
tests/fee_estimation/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/weight_proof/test_weight_proof.py
tests/weight_proof/test_weight_proof.py
import sys from typing import Dict, List, Optional, Tuple import aiosqlite import pytest from flax.consensus.block_record import BlockRecord from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.consensus.full_block_to_block_record import block_to_block_record from flax.full_node.block_store import...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/weight_proof/config.py
tests/weight_proof/config.py
from __future__ import annotations parallel = True checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/weight_proof/__init__.py
tests/weight_proof/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/plotting/util.py
tests/plotting/util.py
from __future__ import annotations from pathlib import Path from typing import List from flax.simulator.block_tools import get_plot_dir def get_test_plots(sub_dir: str = "") -> List[Path]: path = get_plot_dir() if sub_dir != "": path = path / sub_dir return list(sorted(path.glob("*.plot")))
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/plotting/config.py
tests/plotting/config.py
from __future__ import annotations parallel = True install_timelord = False checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/plotting/__init__.py
tests/plotting/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/plotting/test_plot_manager.py
tests/plotting/test_plot_manager.py
from __future__ import annotations import logging import sys import time from dataclasses import dataclass, replace from os import unlink from pathlib import Path from shutil import copy, move from typing import Callable, Iterator, List, Optional import pytest from blspy import G1Element from flax.plotting.cache imp...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/pools/test_pool_rpc.py
tests/pools/test_pool_rpc.py
import asyncio import logging import tempfile from dataclasses import dataclass from pathlib import Path from shutil import rmtree from typing import Any, Optional, List, Dict, Tuple, AsyncGenerator import pytest import pytest_asyncio from blspy import G1Element from flax.consensus.block_rewards import calculate_base...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/pools/test_pool_puzzles_lifecycle.py
tests/pools/test_pool_puzzles_lifecycle.py
import copy from typing import List from unittest import TestCase from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.blockchain_format.coin import Coin from flax.types.c...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/pools/test_pool_wallet.py
tests/pools/test_pool_wallet.py
from __future__ import annotations from dataclasses import dataclass from pathlib import Path from typing import Any, List, Optional, cast from unittest.mock import MagicMock import pytest from blspy import G1Element from benchmarks.utils import rand_g1, rand_hash from flax.pools.pool_wallet import PoolWallet from f...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/pools/config.py
tests/pools/config.py
from __future__ import annotations parallel = 2 job_timeout = 60 checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/pools/__init__.py
tests/pools/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/pools/test_wallet_pool_store.py
tests/pools/test_wallet_pool_store.py
from secrets import token_bytes from typing import Optional import pytest from clvm_tools import binutils from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.program import Program, SerializedProgram from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.coin_spe...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/pools/test_pool_config.py
tests/pools/test_pool_config.py
# flake8: noqa: E501 from blspy import AugSchemeMPL, PrivateKey from flax.pools.pool_config import PoolWalletConfig from flax.util.config import create_default_flax_config, load_config, lock_config, save_config def test_pool_config(tmp_path): test_root = tmp_path test_path = test_root / "config" eg_confi...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/pools/test_pool_cmdline.py
tests/pools/test_pool_cmdline.py
# flake8: noqa: E501 import click import pytest from click.testing import CliRunner, Result from flax.cmds.plotnft import validate_fee from flax.cmds.plotnft import create_cmd, show_cmd pytestmark = pytest.mark.skip("TODO: Works locally but fails on CI, needs to be fixed!") class TestPoolNFTCommands: def test_...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_db_conversion.py
tests/core/test_db_conversion.py
import pytest import random from pathlib import Path from typing import List, Tuple, Optional from tests.setup_nodes import test_constants from tests.util.temp_file import TempFile from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.ints import uint64 from flax.cmds.db_upgrade_func import conv...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_merkle_set.py
tests/core/test_merkle_set.py
from __future__ import annotations import itertools import random from hashlib import sha256 from itertools import permutations from typing import List import pytest from chia_rs import compute_merkle_set_root from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.merkle_set import MerkleSet, co...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_daemon_rpc.py
tests/core/test_daemon_rpc.py
import pytest from flax import __version__ from flax.daemon.client import connect_to_daemon class TestDaemonRpc: @pytest.mark.asyncio async def test_get_version_rpc(self, get_daemon, bt): ws_server = get_daemon config = bt.config client = await connect_to_daemon( config["s...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/large_block.py
tests/core/large_block.py
from __future__ import annotations import zstd from flax.types.full_block import FullBlock LARGE_BLOCK: FullBlock = FullBlock.from_bytes( zstd.decompress( bytes.fromhex( "28b52ffda006b904005c3204ec00080000000145318d2f5c31cc4403aad4bfed" "0c8d5a92daf0051a3590071f8d153433c93adf00000...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_coins.py
tests/core/test_coins.py
from __future__ import annotations from itertools import permutations from benchmarks.utils import rand_hash from flax.types.blockchain_format.coin import hash_coin_ids from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.hash import std_hash def test_hash_coin_ids_empty() -> None: assert...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/make_block_generator.py
tests/core/make_block_generator.py
from __future__ import annotations from typing import Dict import blspy from flax.full_node.bundle_tools import simple_solution_generator from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_bytes import bytes32 from flax....
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_cost_calculation.py
tests/core/test_cost_calculation.py
from __future__ import annotations import logging import pathlib from typing import List import pytest from blspy import G1Element from clvm_tools import binutils from flax.consensus.condition_costs import ConditionCost from flax.consensus.cost_calculator import NPCResult from flax.consensus.default_constants import...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_setproctitle.py
tests/core/test_setproctitle.py
from __future__ import annotations import pytest from flax.util.setproctitle import setproctitle pytestmark = pytest.mark.skip( reason="this test ends up hanging frequently and needs to be rewritten with a subprocess and a title check", ) def test_does_not_crash(): setproctitle("flax test title")
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_crawler_rpc.py
tests/core/test_crawler_rpc.py
from __future__ import annotations import pytest from flax.rpc.crawler_rpc_api import CrawlerRpcApi from flax.seeder.crawler import Crawler class TestCrawlerRpc: @pytest.mark.asyncio async def test_get_ips_after_timestamp(self, bt): crawler = Crawler(bt.config.get("seeder", {}), bt.root_path, consen...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_db_validation.py
tests/core/test_db_validation.py
from __future__ import annotations import random import sqlite3 from contextlib import closing from pathlib import Path from typing import List import pytest from flax.cmds.db_validate_func import validate_v2 from flax.consensus.blockchain import Blockchain from flax.consensus.default_constants import DEFAULT_CONSTA...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_filter.py
tests/core/test_filter.py
from typing import List import pytest from chiabip158 import PyBIP158 class TestFilter: @pytest.mark.asyncio async def test_basic_filter_test(self, wallet_and_node): full_nodes, wallets, bt = wallet_and_node wallet_node, server_2 = wallets[0] wallet = wallet_node.wallet_state_manager....
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/config.py
tests/core/config.py
from __future__ import annotations parallel = True checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/node_height.py
tests/core/node_height.py
from __future__ import annotations def node_height_at_least(node, h): if node.full_node.blockchain.get_peak() is not None: return node.full_node.blockchain.get_peak().height >= h return False def node_height_exactly(node, h): if node.full_node.blockchain.get_peak() is not None: return no...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/__init__.py
tests/core/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_farmer_harvester_rpc.py
tests/core/test_farmer_harvester_rpc.py
from __future__ import annotations import dataclasses import logging import operator import sys import time from math import ceil from os import mkdir from pathlib import Path from shutil import copy from typing import Any, Awaitable, Callable, Dict, List, Union, cast import pytest import pytest_asyncio from flax.co...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/test_full_node_rpc.py
tests/core/test_full_node_rpc.py
# flake8: noqa: F811, F401 from typing import List import pytest from blspy import AugSchemeMPL from flax.consensus.pot_iterations import is_overflow_block from flax.full_node.signage_point import SignagePoint from flax.protocols import full_node_protocol from flax.rpc.full_node_rpc_client import FullNodeRpcClient fr...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_keyring_wrapper.py
tests/core/util/test_keyring_wrapper.py
import logging import pytest from flax.util.errors import KeychainLabelError, KeychainLabelExists, KeychainFingerprintNotFound, KeychainLabelInvalid from flax.util.keyring_wrapper import KeyringWrapper, DEFAULT_PASSPHRASE_IF_NO_MASTER_PASSPHRASE from pathlib import Path from typing import Type from sys import platform...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_files.py
tests/core/util/test_files.py
import os import pytest import shutil import sys from flax.util import files from flax.util.files import move_file, move_file_async, write_file_async from pathlib import Path class TestMoveFile: # use tmp_path pytest fixture to create a temporary directory def test_move_file(self, tmp_path: Path): ""...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_significant_bits.py
tests/core/util/test_significant_bits.py
from __future__ import annotations import unittest from flax.util.significant_bits import count_significant_bits, truncate_to_significant_bits class TestSignificantBits(unittest.TestCase): def test_truncate_to_significant_bits(self): a = -0b001101 assert truncate_to_significant_bits(a, 2) == -0b...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_config.py
tests/core/util/test_config.py
import asyncio import copy import shutil import tempfile from concurrent.futures import ProcessPoolExecutor import pytest import random import yaml from flax.util.config import ( config_path_for_filename, create_default_flax_config, initial_config_file, load_config, lock_and_load_config, lock_...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_cached_bls.py
tests/core/util/test_cached_bls.py
from blspy import AugSchemeMPL, G1Element from flax.util import cached_bls from flax.util.hash import std_hash from flax.util.lru_cache import LRUCache def test_cached_bls(): n_keys = 10 seed = b"a" * 31 sks = [AugSchemeMPL.key_gen(seed + bytes([i])) for i in range(n_keys)] pks = [bytes(sk.get_g1()) f...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_lru_cache.py
tests/core/util/test_lru_cache.py
from __future__ import annotations import unittest from flax.util.lru_cache import LRUCache class TestLRUCache(unittest.TestCase): def test_lru_cache(self): cache = LRUCache(5) assert cache.get(b"0") is None assert len(cache.cache) == 0 cache.put(b"0", 1) assert len(cac...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_streamable.py
tests/core/util/test_streamable.py
from __future__ import annotations import io import re from dataclasses import dataclass, field, fields from typing import Any, Callable, Dict, List, Optional, Tuple, Type, get_type_hints import pytest from blspy import G1Element from clvm_tools import binutils from typing_extensions import Literal, get_args from fl...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_jsonify.py
tests/core/util/test_jsonify.py
from __future__ import annotations from dataclasses import dataclass from typing import Any, Dict, List, Optional, Tuple from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.ints import uint32 from flax.util.streamable import Streamable, recurse_jsonify, streamable def dict_with_types(d: Dict...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_lockfile.py
tests/core/util/test_lockfile.py
from __future__ import annotations import logging import os from multiprocessing import Pool, TimeoutError from pathlib import Path from sys import platform from time import sleep from typing import Any, Callable import pytest from flax.util.lock import Lockfile, LockfileError log = logging.getLogger(__name__) DU...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_keychain.py
tests/core/util/test_keychain.py
import json import unittest from dataclasses import replace from secrets import token_bytes from typing import Callable, List, Optional, Tuple import pytest from blspy import AugSchemeMPL, G1Element, PrivateKey from tests.util.keyring import using_temp_file_keyring from flax.util.errors import ( KeychainFingerpri...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/test_file_keyring_synchronization.py
tests/core/util/test_file_keyring_synchronization.py
import logging import os from flax.util.keyring_wrapper import KeyringWrapper from multiprocessing import Pool from pathlib import Path from sys import platform from tests.util.keyring import TempKeyring, using_temp_file_keyring from tests.core.util.test_lockfile import poll_directory from time import sleep log = lo...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/config.py
tests/core/util/config.py
from __future__ import annotations parallel = True checkout_blocks_and_plots = True
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/util/__init__.py
tests/core/util/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/data_layer/test_data_layer_util.py
tests/core/data_layer/test_data_layer_util.py
from __future__ import annotations import dataclasses from typing import List import pytest # TODO: update after resolution in https://github.com/pytest-dev/pytest/issues/7469 from _pytest.fixtures import SubRequest from flax.data_layer.data_layer_util import ProofOfInclusion, ProofOfInclusionLayer, Side from flax....
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/data_layer/util.py
tests/core/data_layer/util.py
from __future__ import annotations import contextlib import functools import os import pathlib import subprocess from dataclasses import dataclass from typing import IO, TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Union from flax.data_layer.data_layer_util import NodeType, Side, Status from flax.data_layer.da...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/data_layer/test_data_cli.py
tests/core/data_layer/test_data_cli.py
from __future__ import annotations import json from typing import Dict, List import pytest from tests.core.data_layer.util import FlaxRoot pytestmark = pytest.mark.data_layer @pytest.mark.asyncio async def test_help(flax_root: FlaxRoot) -> None: """Just a trivial test to make sure the subprocessing is at leas...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/data_layer/test_data_rpc.py
tests/core/data_layer/test_data_rpc.py
from __future__ import annotations import asyncio import contextlib import copy from dataclasses import dataclass from pathlib import Path from typing import Any, AsyncIterator, Dict, List, Optional, Tuple import pytest import pytest_asyncio from flax.consensus.block_rewards import calculate_base_farmer_reward, calc...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/tests/core/data_layer/conftest.py
tests/core/data_layer/conftest.py
from __future__ import annotations import contextlib import os import pathlib import random import subprocess import sys import sysconfig import time from typing import Any, AsyncIterable, Awaitable, Callable, Dict, Iterator, List import pytest import pytest_asyncio # https://github.com/pytest-dev/pytest/issues/7469...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false