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/tools/cpu_utilization.py
tools/cpu_utilization.py
from __future__ import annotations import time from dataclasses import dataclass from subprocess import check_call from typing import Dict, List import click import psutil @dataclass(frozen=True) class Counters: user_time: int system_time: int @click.command() @click.argument("pid", type=int, required=Tru...
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/tools/test_constants.py
tools/test_constants.py
from __future__ import annotations from flax.consensus.default_constants import DEFAULT_CONSTANTS test_constants = DEFAULT_CONSTANTS.replace( **{ "MIN_PLOT_SIZE": 18, "MIN_BLOCKS_PER_CHALLENGE_BLOCK": 12, "DIFFICULTY_STARTING": 2**9, "DISCRIMINANT_SIZE_BITS": 16, "SUB_EPOCH...
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/tools/manage_clvm.py
tools/manage_clvm.py
from __future__ import annotations import dataclasses import os import pathlib import sys import tempfile import traceback import typing import click import typing_extensions here = pathlib.Path(__file__).parent.resolve() root = here.parent # This is a work-around for fixing imports so they get the appropriate top ...
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/tools/generate_chain.py
tools/generate_chain.py
from __future__ import annotations import cProfile import random import sqlite3 import sys import time from contextlib import closing, contextmanager from pathlib import Path from typing import Iterator, List, Optional import click import zstd from flax.simulator.block_tools import create_block_tools from flax.types...
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/tools/test_full_sync.py
tools/test_full_sync.py
#!/usr/bin/env python3 from __future__ import annotations import asyncio import cProfile import logging import os import shutil import tempfile import time from contextlib import contextmanager from pathlib import Path from typing import Callable, Iterator, List, Optional import aiosqlite import click import zstd 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/tools/__init__.py
tools/__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/tools/analyze-chain.py
tools/analyze-chain.py
#!/usr/bin/env python3 import sqlite3 import sys import zstd import click from pathlib import Path from typing import Callable, Optional from time import time from chia_rs import run_generator, MEMPOOL_MODE from flax.types.blockchain_format.program import Program from flax.consensus.default_constants import DEFAUL...
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/tools/run_block.py
tools/run_block.py
#!/usr/bin/env python """ run_block: Convert an encoded FullBlock from the Flax blockchain into a list of transactions As input, takes a file containing a [FullBlock](../flax/types/full_block.py) in json format ``` curl --insecure --cert $config_root/config/ssl/full_node/private_full_node.crt \ --key $config_ro...
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/testconfig.py
tests/testconfig.py
from __future__ import annotations from typing import TYPE_CHECKING, List, Union if TYPE_CHECKING: from typing_extensions import Literal Oses = Literal["macos", "ubuntu", "windows"] # Defaults are conservative. parallel: Union[bool, int, Literal["auto"]] = False checkout_blocks_and_plots = False install_tim...
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/check_sql_statements.py
tests/check_sql_statements.py
#!/usr/bin/env python3 from __future__ import annotations import sys from subprocess import check_output from typing import Dict, Set, Tuple # check for duplicate index names def check_create(sql_type: str, cwd: str, exemptions: Set[Tuple[str, str]] = set()) -> int: lines = check_output(["git", "grep", f"CREAT...
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/connection_utils.py
tests/connection_utils.py
from __future__ import annotations import asyncio import logging from typing import Tuple import aiohttp from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes, serialization from flax.protocols.shared_protocol import capabilities, pro...
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/build-job-matrix.py
tests/build-job-matrix.py
from __future__ import annotations import argparse import json import logging import types from pathlib import Path from typing import Any, Dict, List import testconfig root_path = Path(__file__).parent.resolve() project_root_path = root_path.parent def skip(path: Path) -> bool: return any(part.startswith(("_"...
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/setup_services.py
tests/setup_services.py
from __future__ import annotations import asyncio import logging import signal import sqlite3 from pathlib import Path from secrets import token_bytes from typing import AsyncGenerator, List, Optional, Tuple from flax.cmds.init_funcs import init from flax.consensus.constants import ConsensusConstants from flax.daemon...
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/conftest.py
tests/conftest.py
# flake8: noqa E402 # See imports after multiprocessing.set_start_method import aiohttp import multiprocessing import os from typing import Any, AsyncIterator, Dict, List, Tuple, Union import pytest import pytest_asyncio import tempfile from flax.full_node.full_node_api import FullNodeAPI from flax.server.server impo...
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/__init__.py
tests/__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/build-init-files.py
tests/build-init-files.py
#!/usr/bin/env python3 # Create missing `__init__.py` files in the source code folders (in "flax/" and "tests/"). # # They are required by the python interpreter to properly identify modules/packages so that tools like `mypy` or an IDE # can work with their full capabilities. # # See https://docs.python.org/3/tutorial...
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/setup_nodes.py
tests/setup_nodes.py
import asyncio import logging from typing import AsyncIterator, Dict, List, Tuple, Optional, Union from pathlib import Path from flax.consensus.constants import ConsensusConstants from flax.full_node.full_node import FullNode from flax.full_node.full_node_api import FullNodeAPI from flax.protocols.shared_protocol impo...
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/check_pytest_monitor_output.py
tests/check_pytest_monitor_output.py
#!/usr/bin/env python3 from __future__ import annotations import sys ret = 0 # example input line # test_non_tx_aggregate_limits 0.997759588095738 1.45325589179993 554.45703125 for ln in sys.stdin: line = ln.strip().split() print(f"{float(line[1]) * 100.0: 8.1f}% CPU {float(line[2]):7.1f}s {float(line[3]): ...
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/blockchain/test_blockchain.py
tests/blockchain/test_blockchain.py
import logging import multiprocessing import time from dataclasses import replace from secrets import token_bytes from typing import List import pytest from blspy import AugSchemeMPL, G2Element from clvm.casts import int_to_bytes from flax.consensus.block_header_validation import validate_finished_header_block from f...
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/blockchain/test_blockchain_transactions.py
tests/blockchain/test_blockchain_transactions.py
import logging import pytest from clvm.casts import int_to_bytes from flax.protocols import full_node_protocol, wallet_protocol from flax.types.announcement import Announcement from flax.types.condition_opcodes import ConditionOpcode from flax.types.condition_with_args import ConditionWithArgs from flax.types.spend_b...
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/blockchain/config.py
tests/blockchain/config.py
from __future__ import annotations parallel = True 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/blockchain/blockchain_test_utils.py
tests/blockchain/blockchain_test_utils.py
from typing import Optional, List from flax.consensus.blockchain import Blockchain, ReceiveBlockResult from flax.consensus.multiprocess_validation import PreValidationResult from flax.types.full_block import FullBlock from flax.util.errors import Err from flax.util.ints import uint64, uint32 async def check_block_st...
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/blockchain/__init__.py
tests/blockchain/__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/util/test_full_block_utils.py
tests/util/test_full_block_utils.py
from __future__ import annotations import random from typing import Generator, Iterator, List, Optional import pytest from blspy import G1Element, G2Element from benchmarks.utils import rand_bytes, rand_g1, rand_g2, rand_hash, rand_vdf, rand_vdf_proof, rewards from flax.types.blockchain_format.foliage import Foliage...
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/util/blockchain.py
tests/util/blockchain.py
import os import pickle from pathlib import Path from typing import List, Optional import tempfile from flax.consensus.blockchain import Blockchain from flax.consensus.constants import ConsensusConstants from flax.full_node.block_store import BlockStore from flax.full_node.coin_store import CoinStore from flax.types....
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/util/build_network_protocol_files.py
tests/util/build_network_protocol_files.py
import os import subprocess import sysconfig from typing import Callable, Any from pathlib import Path from tests.util.network_protocol_data import * # noqa: F403 from flax.util.ints import uint32 version = "1.0" tests_dir = Path(__file__).resolve().parent def get_network_protocol_filename() -> Path: return 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/util/benchmark_cost.py
tests/util/benchmark_cost.py
import time from secrets import token_bytes from blspy import AugSchemeMPL, PrivateKey from clvm_tools import binutils from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.types.blockchain_format.program import Program, INFINITE_COST from flax.types.condition_opcodes import ConditionOpcode 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/util/protocol_messages_json.py
tests/util/protocol_messages_json.py
# this file is generated by build_network_protocol_files.py from __future__ import annotations from typing import Any, Dict new_signage_point_json: Dict[str, Any] = { "challenge_hash": "0x34b2a753b0dc864e7218f8facf23ca0e2b636351df5289b76f5845d9a78b7026", "challenge_chain_sp": "0x9dc8b9d685c79acdf8780d994416df...
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/util/test_paginator.py
tests/util/test_paginator.py
from __future__ import annotations from math import ceil from typing import List, Type import pytest from flax.util.paginator import InvalidPageSizeError, InvalidPageSizeLimit, PageOutOfBoundsError, Paginator @pytest.mark.parametrize( "source, page_size, page_size_limit", [([], 1, 1), ([1], 1, 2), ([1, 2],...
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/util/rpc.py
tests/util/rpc.py
from __future__ import annotations from flax.rpc.rpc_client import RpcClient from flax.rpc.rpc_server import RpcApiProtocol async def validate_get_routes(client: RpcClient, api: RpcApiProtocol) -> None: routes_client = (await client.fetch("get_routes", {}))["routes"] assert len(routes_client) > 0 routes_...
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/util/temp_file.py
tests/util/temp_file.py
from __future__ import annotations import contextlib import tempfile from pathlib import Path from typing import Iterator @contextlib.contextmanager def TempFile() -> Iterator[Path]: path = Path(tempfile.NamedTemporaryFile().name) yield path if path.exists(): path.unlink()
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/util/gen_ssl_certs.py
tests/util/gen_ssl_certs.py
from __future__ import annotations from pathlib import Path from typing import Optional import click from pytest import MonkeyPatch from flax.ssl.create_ssl import generate_ca_signed_cert, get_flax_ca_crt_key, make_ca_cert # NOTE: This is a standalone tool that can be used to generate a CA cert/key as well as node ...
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/util/generator_tools_testing.py
tests/util/generator_tools_testing.py
from __future__ import annotations from typing import List, Tuple from flax.full_node.mempool_check_conditions import get_name_puzzle_conditions from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.full_block import FullBlock from flax.types.g...
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/util/test_struct_stream.py
tests/util/test_struct_stream.py
from __future__ import annotations from dataclasses import dataclass from decimal import Decimal import struct import io from typing import Iterable, List, Optional, Type import pytest # TODO: update after resolution in https://github.com/pytest-dev/pytest/issues/7469 from _pytest.mark.structures import ParameterSet...
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/util/alert_server.py
tests/util/alert_server.py
from __future__ import annotations import argparse import asyncio import logging from pathlib import Path from typing import Any from aiohttp import web log = logging.getLogger(__name__) class AlertServer: shut_down: bool shut_down_event: asyncio.Event log: Any app: Any alert_file_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/util/network_protocol_data.py
tests/util/network_protocol_data.py
# flake8: noqa from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.ints import uint8, uint16, uint32, uint64, uint128 from flax.types.blockchain_format.proof_of_space import ProofOfSpace from flax.types.blockchain_format.pool_target import PoolTarget from flax.types.coin_spend import CoinSpend ...
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/util/db_connection.py
tests/util/db_connection.py
from pathlib import Path from flax.util.db_wrapper import DBWrapper2 import tempfile class DBConnection: def __init__(self, db_version: int) -> None: self.db_version = db_version async def __aenter__(self) -> DBWrapper2: self.db_path = Path(tempfile.NamedTemporaryFile().name) if self....
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/util/misc.py
tests/util/misc.py
from __future__ import annotations import contextlib import dataclasses import enum import gc import math from concurrent.futures import Future from inspect import getframeinfo, stack from statistics import mean from textwrap import dedent from time import thread_time from types import TracebackType from typing 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/util/test_lock_queue.py
tests/util/test_lock_queue.py
import asyncio import logging import time from asyncio import CancelledError import pytest from flax.full_node.lock_queue import LockQueue, LockClient log = logging.getLogger(__name__) class TestLockQueue: @pytest.mark.asyncio async def test_lock_queue(self): lock = asyncio.Lock() queue = ...
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/util/test_chunks.py
tests/util/test_chunks.py
from __future__ import annotations from flax.util.chunks import chunks def test_chunks() -> None: assert list(chunks([], 0)) == [] assert list(chunks(["a"], 0)) == [["a"]] assert list(chunks(["a", "b"], 0)) == [["a"], ["b"]] assert list(chunks(["a", "b", "c", "d"], -1)) == [["a"], ["b"], ["c"], ["d...
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/util/wallet_is_synced.py
tests/util/wallet_is_synced.py
from __future__ import annotations from typing import List from flax.full_node.full_node_api import FullNodeAPI from flax.wallet.wallet_node import WalletNode async def wallet_is_synced(wallet_node: WalletNode, full_node_api: FullNodeAPI) -> bool: wallet_height = await wallet_node.wallet_state_manager.blockchai...
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/util/config.py
tests/util/config.py
from __future__ import annotations parallel = True job_timeout = 60
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/util/key_tool.py
tests/util/key_tool.py
from typing import List from blspy import AugSchemeMPL, G2Element, PrivateKey from flax.types.coin_spend import CoinSpend from flax.util.condition_tools import conditions_by_opcode, conditions_for_solution, pkm_pairs_for_conditions_dict from tests.core.make_block_generator import GROUP_ORDER, int_to_public_key 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/util/__init__.py
tests/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/util/test_network.py
tests/util/test_network.py
import os import sys import pytest from flax.util.network import get_host_addr class TestNetwork: @pytest.mark.asyncio async def test_get_host_addr4(self): # Run these tests forcing IPv4 resolution prefer_ipv6 = False assert get_host_addr("127.0.0.1", prefer_ipv6) == "127.0.0.1" ...
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/util/test_misc.py
tests/util/test_misc.py
import pytest from flax.util.errors import InvalidPathError from flax.util.misc import format_bytes, validate_directory_writable from flax.util.misc import format_minutes class TestMisc: @pytest.mark.asyncio async def test_format_bytes(self): assert format_bytes(None) == "Invalid" assert forma...
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/util/test_network_protocol_json.py
tests/util/test_network_protocol_json.py
# this file is generated by build_network_protocol_files.py from __future__ import annotations from tests.util.network_protocol_data import * # noqa: F403 from tests.util.protocol_messages_json import * # noqa: F403 def test_protocol_json() -> None: assert str(new_signage_point_json) == str(new_signage_point....
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/util/keyring.py
tests/util/keyring.py
import os import shutil import tempfile from flax.util.file_keyring import FileKeyring, keyring_path_from_root from flax.util.keychain import Keychain, default_keychain_service, default_keychain_user, get_private_key_user from flax.util.keyring_wrapper import KeyringWrapper from functools import wraps from keyring.uti...
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/util/test_network_protocol_files.py
tests/util/test_network_protocol_files.py
# this file is generated by build_network_protocol_files.py from typing import Tuple from pathlib import Path from tests.util.network_protocol_data import * # noqa: F403 from tests.util.protocol_messages_json import * # noqa: F403 from tests.util.build_network_protocol_files import get_network_protocol_filename de...
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/util/test_network_protocol_test.py
tests/util/test_network_protocol_test.py
# flake8: noqa from __future__ import annotations from typing import Any, List, Set from flax.protocols import ( farmer_protocol, full_node_protocol, harvester_protocol, introducer_protocol, pool_protocol, shared_protocol, timelord_protocol, wallet_protocol, ) # this test is to ensure...
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/plot_sync/test_receiver.py
tests/plot_sync/test_receiver.py
from __future__ import annotations import dataclasses import logging import random import time from secrets import token_bytes from typing import Any, Callable, List, Tuple, Type, Union import pytest from blspy import G1Element from flax.plot_sync.delta import Delta from flax.plot_sync.receiver import Receiver, Sync...
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/plot_sync/test_plot_sync.py
tests/plot_sync/test_plot_sync.py
from __future__ import annotations import asyncio import functools from dataclasses import dataclass, field, replace from pathlib import Path from shutil import copy from typing import Any, Callable, List, Optional, Tuple import pytest import pytest_asyncio from blspy import G1Element from flax.farmer.farmer_api imp...
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/plot_sync/util.py
tests/plot_sync/util.py
from __future__ import annotations import time from dataclasses import dataclass from secrets import token_bytes from typing import Optional from flax.farmer.farmer import Farmer from flax.harvester.harvester import Harvester from flax.plot_sync.sender import Sender from flax.protocols.harvester_protocol import PlotS...
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/plot_sync/test_sender.py
tests/plot_sync/test_sender.py
from __future__ import annotations import pytest from flax.plot_sync.exceptions import AlreadyStartedError, InvalidConnectionTypeError from flax.plot_sync.sender import ExpectedResponse, Sender from flax.plot_sync.util import Constants from flax.protocols.harvester_protocol import PlotSyncIdentifier, PlotSyncResponse...
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/plot_sync/config.py
tests/plot_sync/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/plot_sync/__init__.py
tests/plot_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/plot_sync/test_delta.py
tests/plot_sync/test_delta.py
from __future__ import annotations import logging from typing import List import pytest from blspy import G1Element from flax.plot_sync.delta import Delta, DeltaType, PathListDelta, PlotListDelta from flax.protocols.harvester_protocol import Plot 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/plot_sync/test_sync_simulated.py
tests/plot_sync/test_sync_simulated.py
from __future__ import annotations import asyncio import functools import logging import time from dataclasses import dataclass, field from enum import Enum from pathlib import Path from secrets import token_bytes from typing import Any, Dict, List, Optional, Set, Tuple import pytest from blspy import G1Element from...
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/tools/test_run_block.py
tests/tools/test_run_block.py
from __future__ import annotations import json from pathlib import Path from typing import List from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.types.condition_opcodes import ConditionOpcode from flax.types.condition_with_args import ConditionWithArgs from tools.run_block import run_json_bloc...
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/tools/config.py
tests/tools/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/tools/test_full_sync.py
tests/tools/test_full_sync.py
#!/usr/bin/env python3 from __future__ import annotations import asyncio import os from pathlib import Path import pytest from tools.test_full_sync import run_sync_test @pytest.mark.parametrize("keep_up", [True, False]) def test_full_sync_test(keep_up: bool): file_path = os.path.realpath(__file__) db_file...
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/tools/__init__.py
tests/tools/__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/test_bech32m.py
tests/wallet/test_bech32m.py
# Based on this specification from Pieter Wuille: # https://github.com/sipa/bips/blob/bip-bech32m/bip-bech32m.mediawiki from __future__ import annotations from flax.util.bech32m import bech32_decode def test_valid_imports(): test_strings = [ "A1LQFN3A", "a1lqfn3a", "\n a1lqfn3a \n", ...
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/test_wallet.py
tests/wallet/test_wallet.py
import asyncio import time from pathlib import Path from typing import Any, Dict, List, Tuple import pytest from blspy import AugSchemeMPL, G1Element, G2Element from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from flax.protocols.full_node_protocol import RespondBlock from f...
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/test_singleton_lifecycle_fast.py
tests/wallet/test_singleton_lifecycle_fast.py
from dataclasses import dataclass from typing import Any, Callable, Dict, List, Optional, Tuple from blspy import G1Element, G2Element from clvm_tools import binutils from flax.types.blockchain_format.program import Program, SerializedProgram from flax.types.announcement import Announcement 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/wallet/test_taproot.py
tests/wallet/test_taproot.py
from __future__ import annotations from flax.wallet.puzzles.p2_delegated_puzzle_or_hidden_puzzle import ( DEFAULT_HIDDEN_PUZZLE, calculate_synthetic_offset, calculate_synthetic_public_key, ) from tests.core.make_block_generator import int_to_public_key class TestTaproot: def test_1(self): for...
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/test_flaxlisp.py
tests/wallet/test_flaxlisp.py
from __future__ import annotations import pytest from flax.wallet.flaxlisp import ( apply, args, cons, eval, fail, first, is_zero, make_if, make_list, nth, quote, rest, sexp, ) class TestFlaxlisp: def test_sexp(self): assert sexp() == "()" asse...
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/test_transaction_store.py
tests/wallet/test_transaction_store.py
from __future__ import annotations import dataclasses from secrets import token_bytes from typing import Any, List import pytest from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.mempool_inclusion_status import MempoolInclusionStatus from ...
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/test_wallet_node.py
tests/wallet/test_wallet_node.py
from __future__ import annotations import sys from pathlib import Path from typing import Any, Dict, Optional import pytest from blspy import PrivateKey from flax.util.config import load_config from flax.util.keychain import Keychain, generate_mnemonic from flax.wallet.wallet_node import WalletNode from tests.setup_...
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/test_wallet_key_val_store.py
tests/wallet/test_wallet_key_val_store.py
import pytest from flax.types.full_block import FullBlock from flax.types.header_block import HeaderBlock from flax.wallet.key_val_store import KeyValStore from tests.util.db_connection import DBConnection class TestWalletKeyValStore: @pytest.mark.asyncio async def test_store(self, bt): async with DB...
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/test_wallet_trade_store.py
tests/wallet/test_wallet_trade_store.py
from __future__ import annotations import time from secrets import token_bytes import pytest from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.ints import uint32, uint64 from flax.wallet.trade_record import TradeRecord from flax.wallet.trad...
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/test_wallet_retry.py
tests/wallet/test_wallet_retry.py
from __future__ import annotations import asyncio from typing import Any, List, Optional, Tuple import pytest from flax.full_node.full_node_api import FullNodeAPI from flax.simulator.block_tools import BlockTools from flax.simulator.full_node_simulator import FullNodeSimulator from flax.simulator.time_out_assert imp...
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/test_wallet_interested_store.py
tests/wallet/test_wallet_interested_store.py
from secrets import token_bytes import pytest from flax.types.blockchain_format.coin import Coin from flax.util.ints import uint64 from flax.wallet.wallet_interested_store import WalletInterestedStore from tests.util.db_connection import DBConnection class TestWalletInterestedStore: @pytest.mark.asyncio asy...
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/config.py
tests/wallet/config.py
# flake8: noqa: E501 from __future__ import annotations job_timeout = 40 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/wallet/test_coin_selection.py
tests/wallet/test_coin_selection.py
from __future__ import annotations import logging import time from random import randrange from typing import List, Set import pytest from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.sized_bytes import bytes32 from fla...
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/__init__.py
tests/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/test_notifications.py
tests/wallet/test_notifications.py
from __future__ import annotations from secrets import token_bytes from typing import Any import pytest from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from flax.simulator.full_node_simulator import FullNodeSimulator from flax.simulator.simulator_protocol import FarmNewBl...
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/test_address_type.py
tests/wallet/test_address_type.py
from __future__ import annotations from typing import Any, Dict import pytest from flax.wallet.util.address_type import AddressType, ensure_valid_address, is_valid_address @pytest.mark.parametrize("prefix", [None]) def test_xfx_hrp_for_default_config(config_with_address_prefix: Dict[str, Any]) -> None: config ...
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/test_puzzle_store.py
tests/wallet/test_puzzle_store.py
from __future__ import annotations from secrets import token_bytes import pytest from blspy import AugSchemeMPL from flax.util.ints import uint32 from flax.wallet.derivation_record import DerivationRecord from flax.wallet.util.wallet_types import WalletType from flax.wallet.wallet_puzzle_store import WalletPuzzleSto...
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/test_wallet_user_store.py
tests/wallet/test_wallet_user_store.py
from __future__ import annotations import pytest from flax.wallet.util.wallet_types import WalletType from flax.wallet.wallet_user_store import WalletUserStore from tests.util.db_connection import DBConnection @pytest.mark.asyncio async def test_store(): async with DBConnection(1) as db_wrapper: store =...
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/test_wallet_blockchain.py
tests/wallet/test_wallet_blockchain.py
import dataclasses import pytest from flax.consensus.blockchain import ReceiveBlockResult from flax.protocols import full_node_protocol from flax.types.blockchain_format.vdf import VDFProof from flax.types.weight_proof import WeightProof from flax.util.generator_tools import get_block_header from flax.wallet.key_val_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/wallet/test_singleton.py
tests/wallet/test_singleton.py
from clvm_tools import binutils from flax.types.blockchain_format.program import Program, INFINITE_COST from flax.types.announcement import Announcement from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.condition_tools import parse_sexp_to_conditions from flax.wallet.puzzles.load_clvm 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/wallet/test_nft_store.py
tests/wallet/test_nft_store.py
from __future__ import annotations import pytest 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.util.ints import uint32, uint64 from flax.wallet.lineage_proof import LineageProof 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/test_wallet_coin_store.py
tests/wallet/test_wallet_coin_store.py
from __future__ import annotations from secrets import token_bytes import pytest from flax.types.blockchain_format.coin import Coin from flax.util.ints import uint32, uint64 from flax.wallet.util.wallet_types import WalletType from flax.wallet.wallet_coin_record import WalletCoinRecord from flax.wallet.wallet_coin_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/wallet/test_singleton_lifecycle.py
tests/wallet/test_singleton_lifecycle.py
from typing import List, Tuple import pytest from blspy import G2Element from clvm_tools import binutils from flax.types.blockchain_format.program import Program, INFINITE_COST from flax.types.announcement import Announcement from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.sized_b...
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/test_offer_parsing_performance.py
tests/wallet/test_offer_parsing_performance.py
from __future__ import annotations import cProfile from contextlib import contextmanager from typing import Iterator import pytest from flax.wallet.trading.offer import Offer from tests.util.misc import assert_runtime with_profile = False # gprof2dot -f pstats offer-parsing.profile >p.dot && dot -Tpng p.dot >offer...
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/simple_sync/config.py
tests/wallet/simple_sync/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/simple_sync/__init__.py
tests/wallet/simple_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/wallet/simple_sync/test_simple_sync_protocol.py
tests/wallet/simple_sync/test_simple_sync_protocol.py
# flake8: noqa: F811, F401 import asyncio from typing import List, Optional import pytest from clvm.casts import int_to_bytes from colorlog import getLogger from flax.consensus.block_rewards import calculate_pool_reward, calculate_base_farmer_reward from flax.protocols import wallet_protocol from flax.protocols.full_...
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/rpc/test_dl_wallet_rpc.py
tests/wallet/rpc/test_dl_wallet_rpc.py
from __future__ import annotations import asyncio import logging import pytest from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from flax.data_layer.data_layer_wallet import Mirror, SingletonRecord from flax.rpc.wallet_rpc_client import WalletRpcClient from flax.simulator....
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/rpc/config.py
tests/wallet/rpc/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/rpc/__init__.py
tests/wallet/rpc/__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/rpc/test_wallet_rpc.py
tests/wallet/rpc/test_wallet_rpc.py
from __future__ import annotations import dataclasses import json import logging from operator import attrgetter from typing import Any, Dict, List, Optional, Tuple import pytest import pytest_asyncio from blspy import G2Element from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_re...
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/nft_wallet/test_nft_offers.py
tests/wallet/nft_wallet/test_nft_offers.py
from __future__ import annotations from secrets import token_bytes from typing import Any, Dict, Optional 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.full_node_simulator import...
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/nft_wallet/test_nft_bulk_mint.py
tests/wallet/nft_wallet/test_nft_bulk_mint.py
from __future__ import annotations import asyncio from secrets import token_bytes from typing import Any, Dict import pytest from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from flax.rpc.full_node_rpc_api import FullNodeRpcApi from flax.rpc.full_node_rpc_client import Ful...
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/nft_wallet/test_ownership_outer_puzzle.py
tests/wallet/nft_wallet/test_ownership_outer_puzzle.py
from __future__ import annotations from typing import Optional from clvm_tools.binutils import assemble from flax.types.blockchain_format.program import Program from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.ints import uint16 from flax.wallet.nft_wallet.ownership_outer_puzzle import puz...
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_1_offers.py
tests/wallet/nft_wallet/test_nft_1_offers.py
from __future__ import annotations import asyncio import logging from secrets import token_bytes from typing import Any, Callable, Coroutine, Optional import pytest from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from flax.full_node.mempool_manager import MempoolManager f...
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/nft_wallet/config.py
tests/wallet/nft_wallet/config.py
from __future__ import annotations job_timeout = 45 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/nft_wallet/test_nft_wallet.py
tests/wallet/nft_wallet/test_nft_wallet.py
from __future__ import annotations import asyncio import time from typing import Any, Awaitable, Callable, Dict, List import pytest from blspy import AugSchemeMPL, G1Element, G2Element from clvm_tools.binutils import disassemble from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_re...
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/nft_wallet/__init__.py
tests/wallet/nft_wallet/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false