repo_id stringlengths 0 42 | file_path stringlengths 15 97 | content stringlengths 2 2.41M | __index_level_0__ int64 0 0 |
|---|---|---|---|
bitcoin/test | bitcoin/test/functional/wallet_reindex.py | #!/usr/bin/env python3
# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php.
"""Test wallet-reindex interaction"""
import time
from test_framework.blocktools import COINBASE_MA... | 0 |
bitcoin/test | bitcoin/test/functional/interface_zmq.py | #!/usr/bin/env python3
# Copyright (c) 2015-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the ZMQ notification interface."""
import struct
from time import sleep
from test_framework.addre... | 0 |
bitcoin/test | bitcoin/test/functional/interface_http.py | #!/usr/bin/env python3
# Copyright (c) 2014-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the RPC HTTP basics."""
from test_framework.test_framework import BitcoinTestFramework
from test_... | 0 |
bitcoin/test | bitcoin/test/functional/wallet_spend_unconfirmed.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from decimal import Decimal, getcontext
from test_framework.test_framework import BitcoinTestFramework
from t... | 0 |
bitcoin/test | bitcoin/test/functional/wallet_txn_doublespend.py | #!/usr/bin/env python3
# Copyright (c) 2014-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet accounts properly when there is a double-spend conflict."""
from decimal import Decimal... | 0 |
bitcoin/test | bitcoin/test/functional/feature_coinstatsindex.py | #!/usr/bin/env python3
# Copyright (c) 2020-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test coinstatsindex across nodes.
Test that the values returned by gettxoutsetinfo are consistent
betw... | 0 |
bitcoin/test | bitcoin/test/functional/wallet_importmulti.py | #!/usr/bin/env python3
# Copyright (c) 2014-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the importmulti RPC.
Test importmulti by generating keys on node0, importing the scriptPubKeys an... | 0 |
bitcoin/test | bitcoin/test/functional/wallet_createwallet.py | #!/usr/bin/env python3
# Copyright (c) 2018-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test createwallet arguments.
"""
from test_framework.address import key_to_p2wpkh
from test_framework.... | 0 |
bitcoin/test | bitcoin/test/functional/feature_bind_port_externalip.py | #!/usr/bin/env python3
# Copyright (c) 2020-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test that the proper port is used for -externalip=
"""
from test_framework.test_framework import Bitc... | 0 |
bitcoin/test | bitcoin/test/functional/interface_usdt_net.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
""" Tests the net:* tracepoint API interface.
See https://github.com/bitcoin/bitcoin/blob/master/doc/tra... | 0 |
bitcoin/test | bitcoin/test/functional/rpc_misc.py | #!/usr/bin/env python3
# Copyright (c) 2019-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPC misc output."""
import xml.etree.ElementTree as ET
from test_framework.test_framework import ... | 0 |
bitcoin/test | bitcoin/test/functional/feature_filelock.py | #!/usr/bin/env python3
# Copyright (c) 2018-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Check that it's not possible to start a second bitcoind instance using the same datadir or wallet."""
i... | 0 |
bitcoin/test | bitcoin/test/functional/feature_bind_port_discover.py | #!/usr/bin/env python3
# Copyright (c) 2020-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test that -discover does not add all interfaces' addresses if we listen on only some of them
"""
from... | 0 |
bitcoin/test | bitcoin/test/functional/p2p_tx_privacy.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test that transaction announcements are only queued for peers that have
successfully completed the version ... | 0 |
bitcoin/test | bitcoin/test/functional/p2p_timeouts.py | #!/usr/bin/env python3
# Copyright (c) 2016-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various net timeouts.
- Create three peers:
no_verack_node - we never send a verack in respo... | 0 |
bitcoin/test | bitcoin/test/functional/feature_loadblock.py | #!/usr/bin/env python3
# Copyright (c) 2017-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test loadblock option
Test the option to start a node with the option loadblock which loads
a serializ... | 0 |
bitcoin/test | bitcoin/test/functional/interface_rpc.py | #!/usr/bin/env python3
# Copyright (c) 2018-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Tests some generic aspects of the RPC interface."""
import os
from test_framework.authproxy import JSO... | 0 |
bitcoin/test | bitcoin/test/functional/feature_index_prune.py | #!/usr/bin/env python3
# Copyright (c) 2020-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test indices in conjunction with prune."""
import os
from test_framework.test_framework import BitcoinT... | 0 |
bitcoin/test | bitcoin/test/functional/wallet_multiwallet.py | #!/usr/bin/env python3
# Copyright (c) 2017-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test multiwallet.
Verify that a bitcoind node can load multiple wallet files
"""
from decimal import D... | 0 |
bitcoin/test | bitcoin/test/functional/feature_settings.py | #!/usr/bin/env python3
# Copyright (c) 2017-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various command line arguments and configuration file parameters."""
import json
from test_fram... | 0 |
bitcoin/test | bitcoin/test/functional/mempool_reorg.py | #!/usr/bin/env python3
# Copyright (c) 2014-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempool re-org scenarios.
Test re-org scenarios with a mempool that contains transactions
that sp... | 0 |
bitcoin/test | bitcoin/test/functional/wallet_timelock.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
... | 0 |
bitcoin/test | bitcoin/test/functional/feature_posix_fs_permissions.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test file system permissions for POSIX platforms.
"""
import os
import stat
from test_framework.test_frame... | 0 |
bitcoin/test | bitcoin/test/functional/mempool_compatibility.py | #!/usr/bin/env python3
# Copyright (c) 2017-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that mempool.dat is both backward and forward compatible between versions
NOTE: The test is desig... | 0 |
bitcoin/test | bitcoin/test/functional/p2p_permissions.py | #!/usr/bin/env python3
# Copyright (c) 2015-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test p2p permission message.
Test that permissions are correctly calculated and applied
"""
from test... | 0 |
bitcoin/test | bitcoin/test/functional/p2p_invalid_tx.py | #!/usr/bin/env python3
# Copyright (c) 2015-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid transactions.
In this test we connect to one node over p2p, and test tx... | 0 |
bitcoin/test | bitcoin/test/functional/feature_help.py | #!/usr/bin/env python3
# Copyright (c) 2018-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Verify that starting bitcoin with -h works as expected."""
from test_framework.test_framework import B... | 0 |
bitcoin/test | bitcoin/test/functional/rpc_getdescriptorinfo.py | #!/usr/bin/env python3
# Copyright (c) 2019-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test getdescriptorinfo RPC.
"""
from test_framework.test_framework import BitcoinTestFramework
from te... | 0 |
bitcoin/test | bitcoin/test/functional/rpc_validateaddress.py | #!/usr/bin/env python3
# Copyright (c) 2023 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test validateaddress for main chain"""
from test_framework.test_framework import BitcoinTestFramework
from... | 0 |
bitcoin/test | bitcoin/test/functional/feature_fee_estimation.py | #!/usr/bin/env python3
# Copyright (c) 2014-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test fee estimation code."""
from copy import deepcopy
from decimal import Decimal
import os
import ran... | 0 |
bitcoin/test | bitcoin/test/functional/rpc_dumptxoutset.py | #!/usr/bin/env python3
# Copyright (c) 2019-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the generation of UTXO snapshots using `dumptxoutset`.
"""
from test_framework.blocktools import ... | 0 |
bitcoin/test | bitcoin/test/functional/p2p_getaddr_caching.py | #!/usr/bin/env python3
# Copyright (c) 2020-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test addr response caching"""
import time
from test_framework.p2p import (
P2PInterface,
p2p_... | 0 |
bitcoin/test | bitcoin/test/functional/feature_blocksdir.py | #!/usr/bin/env python3
# Copyright (c) 2018-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the blocksdir option.
"""
import shutil
from pathlib import Path
from test_framework.test_framew... | 0 |
bitcoin/test | bitcoin/test/functional/feature_init.py | #!/usr/bin/env python3
# Copyright (c) 2021-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Stress tests related to node initialization."""
import os
from pathlib import Path
import shutil
fr... | 0 |
bitcoin/test | bitcoin/test/functional/rpc_getchaintips.py | #!/usr/bin/env python3
# Copyright (c) 2014-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the getchaintips RPC.
- introduce a network split
- work on chains of different lengths
- join th... | 0 |
bitcoin/test | bitcoin/test/functional/rpc_scanblocks.py | #!/usr/bin/env python3
# Copyright (c) 2021-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the scanblocks RPC call."""
from test_framework.address import address_to_scriptpubkey
from test_f... | 0 |
bitcoin/test | bitcoin/test/functional/feature_block.py | #!/usr/bin/env python3
# Copyright (c) 2015-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test block processing."""
import copy
import struct
import time
from test_framework.blocktools import ... | 0 |
bitcoin/test | bitcoin/test/functional/p2p_nobloomfilter_messages.py | #!/usr/bin/env python3
# Copyright (c) 2015-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test invalid p2p messages for nodes with bloom filters disabled.
Test that, when bloom filters are not... | 0 |
bitcoin/test | bitcoin/test/functional/p2p_sendheaders.py | #!/usr/bin/env python3
# Copyright (c) 2014-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test behavior of headers messages to announce blocks.
Setup:
- Two nodes:
- node0 is the node-und... | 0 |
bitcoin/test | bitcoin/test/functional/rpc_getblockfrompeer.py | #!/usr/bin/env python3
# Copyright (c) 2020-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the getblockfrompeer RPC."""
from test_framework.authproxy import JSONRPCException
from test_fram... | 0 |
bitcoin/test | bitcoin/test/functional/test-shell.md | Test Shell for Interactive Environments
=========================================
This document describes how to use the `TestShell` submodule in the functional
test suite.
The `TestShell` submodule extends the `BitcoinTestFramework` functionality to
external interactive environments for prototyping and educational p... | 0 |
bitcoin/test | bitcoin/test/functional/rpc_setban.py | #!/usr/bin/env python3
# Copyright (c) 2015-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the setban rpc call."""
from test_framework.test_framework import BitcoinTestFramework
from test_... | 0 |
bitcoin/test | bitcoin/test/functional/feature_presegwit_node_upgrade.py | #!/usr/bin/env python3
# Copyright (c) 2017-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test a pre-segwit node upgrading to segwit consensus"""
from test_framework.test_framework import Bitc... | 0 |
bitcoin/test | bitcoin/test/functional/wallet_balance.py | #!/usr/bin/env python3
# Copyright (c) 2018-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet balance RPC methods."""
from decimal import Decimal
import struct
from test_framework.... | 0 |
bitcoin/test | bitcoin/test/functional/feature_startupnotify.py | #!/usr/bin/env python3
# Copyright (c) 2020-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test -startupnotify."""
from test_framework.test_framework import BitcoinTestFramework
from test_framew... | 0 |
bitcoin/test | bitcoin/test/functional/wallet_signer.py | #!/usr/bin/env python3
# Copyright (c) 2017-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test external signer.
Verify that a bitcoind node can use an external signer command
See also rpc_sign... | 0 |
bitcoin/test | bitcoin/test/functional/tool_signet_miner.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test signet miner tool"""
import os.path
import subprocess
import sys
import time
from test_framework.key ... | 0 |
bitcoin/test | bitcoin/test/functional/feature_logging.py | #!/usr/bin/env python3
# Copyright (c) 2017-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test debug logging."""
import os
from test_framework.test_framework import BitcoinTestFramework
from ... | 0 |
bitcoin/test | bitcoin/test/functional/rpc_whitelist.py | #!/usr/bin/env python3
# Copyright (c) 2017-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
A test for RPC users with restricted permissions
"""
from test_framework.test_framework import Bitcoin... | 0 |
bitcoin/test | bitcoin/test/functional/interface_usdt_utxocache.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
""" Tests the utxocache:* tracepoint API interface.
See https://github.com/bitcoin/bitcoin/blob/master/doc... | 0 |
bitcoin/test | bitcoin/test/functional/feature_unsupported_utxo_db.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that unsupported utxo db causes an init error.
Previous releases are required by this test, see test/R... | 0 |
bitcoin/test | bitcoin/test/functional/mining_prioritisetransaction.py | #!/usr/bin/env python3
# Copyright (c) 2015-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the prioritisetransaction mining RPC."""
from decimal import Decimal
import time
from test_frame... | 0 |
bitcoin/test | bitcoin/test/functional/mempool_package_onemore.py | #!/usr/bin/env python3
# Copyright (c) 2014-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test descendant package tracking carve-out allowing one final transaction in
an otherwise-full packa... | 0 |
bitcoin/test | bitcoin/test/functional/feature_cltv.py | #!/usr/bin/env python3
# Copyright (c) 2015-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP65 (CHECKLOCKTIMEVERIFY).
Test that the CHECKLOCKTIMEVERIFY soft-fork activates.
"""
from tes... | 0 |
bitcoin/test | bitcoin/test/functional/wallet_create_tx.py | #!/usr/bin/env python3
# Copyright (c) 2018-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
asse... | 0 |
bitcoin/test | bitcoin/test/functional/p2p_headers_sync_with_minchainwork.py | #!/usr/bin/env python3
# Copyright (c) 2019-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that we reject low difficulty headers to prevent our block tree from filling up with useless bloat... | 0 |
bitcoin/test | bitcoin/test/functional/combined_log_template.html | <html lang="en">
<head>
<title> {{ title }} </title>
<style>
ul {
list-style-type: none;
font-family: monospace;
}
li {
border: 1px solid slategray;
margin-bottom: 1px;
}
li:hover {
filter: brightness(85%);
... | 0 |
bitcoin/test/functional | bitcoin/test/functional/mocks/multi_signers.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import argparse
import json
import sys
def enumerate(args):
sys.stdout.write(json.dumps([{"fingerprint": ... | 0 |
bitcoin/test/functional | bitcoin/test/functional/mocks/invalid_signer.py | #!/usr/bin/env python3
# Copyright (c) 2018-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import os
import sys
import argparse
import json
def perform_pre_checks():
mock_result_path = os.pat... | 0 |
bitcoin/test/functional | bitcoin/test/functional/mocks/signer.py | #!/usr/bin/env python3
# Copyright (c) 2018-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import os
import sys
import argparse
import json
def perform_pre_checks():
mock_result_path = os.pat... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/address.py | #!/usr/bin/env python3
# Copyright (c) 2016-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Encode and decode Bitcoin addresses.
- base58 P2PKH and P2SH addresses.
- bech32 segwit v0 P2WPKH and ... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/bdb.py | #!/usr/bin/env python3
# Copyright (c) 2020-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Utilities for working directly with the wallet's BDB database file
This is specific to the configurat... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/blockfilter.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Helper routines relevant for compact block filters (BIP158).
"""
from .crypto.siphash import siphash
def b... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/p2p.py | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test objects... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/util.py | #!/usr/bin/env python3
# Copyright (c) 2014-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Helpful routines for regression testing."""
from base64 import b64encode
from decimal import Decimal, ... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/key.py | # Copyright (c) 2019-2020 Pieter Wuille
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test-only secp256k1 elliptic curve protocols implementation
WARNING: This code is slow, uses bad randomness, does not properly protect
keys... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/script_util.py | #!/usr/bin/env python3
# Copyright (c) 2019-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Useful Script constants and utils."""
from test_framework.script import (
CScript,
CScriptOp,
... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/coverage.py | #!/usr/bin/env python3
# Copyright (c) 2015-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for doing coverage analysis on the RPC interface.
Provides a way to track which RPC commands... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/netutil.py | #!/usr/bin/env python3
# Copyright (c) 2014-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Linux network utilities.
Roughly based on http://voorloopnul.com/blog/a-python-netstat-in-less-than-10... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/socks5.py | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Dummy Socks5 server for testing."""
import socket
import threading
import queue
import logging
logger... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/descriptors.py | #!/usr/bin/env python3
# Copyright (c) 2019 Pieter Wuille
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utility functions related to output descriptors"""
import re
INPUT_CHARSET = "0123456789()[],'/*abcdefgh@:$%{}IJKLMNOPQR... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/psbt.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import base64
from .messages import (
CTransaction,
deser_string,
from_binary,
ser_compact_si... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/wallet_util.py | #!/usr/bin/env python3
# Copyright (c) 2018-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Useful util functions for testing the wallet"""
from collections import namedtuple
from test_framework... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/segwit_addr.py | #!/usr/bin/env python3
# Copyright (c) 2017 Pieter Wuille
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Reference implementation for Bech32/Bech32m and segwit addresses."""
import unittest
from enum import Enum
CHARSET = "qpz... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/blocktools.py | #!/usr/bin/env python3
# Copyright (c) 2015-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for manipulating blocks and transactions."""
import struct
import time
import unittest
from... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/messages.py | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Bitcoin test... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/authproxy.py | # Copyright (c) 2011 Jeff Garzik
#
# Previous copyright, from python-jsonrpc/jsonrpc/proxy.py:
#
# Copyright (c) 2007 Jan-Klaas Kollhof
#
# This file is part of jsonrpc.
#
# jsonrpc is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# th... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/test_framework.py | #!/usr/bin/env python3
# Copyright (c) 2014-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
import configparser
from enum import Enum
import argparse
import loggin... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/test_shell.py | #!/usr/bin/env python3
# Copyright (c) 2019-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
class TestShell:
"""Wrapper Class for... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/script.py | #!/usr/bin/env python3
# Copyright (c) 2015-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Functionality to build scripts, as well as signature hash functions.
This file is modified from python... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/bip340_test_vectors.csv | index,secret key,public key,aux_rand,message,signature,verification result,comment
0,0000000000000000000000000000000000000000000000000000000000000003,F9308A019258C31049344F85F89D5229B531C845836F99B08601F113BCE036F9,0000000000000000000000000000000000000000000000000000000000000000,0000000000000000000000000000000000000000... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/wallet.py | #!/usr/bin/env python3
# Copyright (c) 2020-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""A limited-functionality wallet, which may replace a real wallet in tests"""
from copy import deepcopy
... | 0 |
bitcoin/test/functional | bitcoin/test/functional/test_framework/test_node.py | #!/usr/bin/env python3
# Copyright (c) 2017-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Class for bitcoind node under test"""
import contextlib
import decimal
import errno
from enum import E... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/ellswift_decode_test_vectors.csv | ellswift,x,comment
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,edd1fd3e327ce90cc7a3542614289aee9682003e9cf7dcc9cf2ca9743be5aa0c,u%p=0;t%p=0;valid_x(x2)
000000000000000000000000000000000000000000000000000000000000000001d3475bf7655b0fb2d... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/ellswift.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test-only Elligator Swift implementation
WARNING: This code is slow and uses bad randomness.
Do not use for... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/muhash.py | # Copyright (c) 2020 Pieter Wuille
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Native Python MuHash3072 implementation."""
import hashlib
import unittest
from .chacha20 import chacha20_block
def data_to_num3072(data):
... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/xswiftec_inv_test_vectors.csv | u,x,case0_t,case1_t,case2_t,case3_t,case4_t,case5_t,case6_t,case7_t,comment
05ff6bdad900fc3261bc7fe34e2fb0f569f06e091ae437d3a52e9da0cbfb9590,80cdf63774ec7022c89a5a8558e373a279170285e0ab27412dbce510bdfe23fc,,,45654798ece071ba79286d04f7f3eb1c3f1d17dd883610f2ad2efd82a287466b,0aeaa886f6b76c7158452418cbf5033adc5747e9e9b5d3b... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/hkdf.py | #!/usr/bin/env python3
# Copyright (c) 2023 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test-only HKDF-SHA256 implementation
It is designed for ease of understanding, not performance.
WARNING: ... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/poly1305.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test-only implementation of Poly1305 authenticator
It is designed for ease of understanding, not performan... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/chacha20.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test-only implementation of ChaCha20 cipher and FSChaCha20 for BIP 324
It is designed for ease of understa... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/siphash.py | #!/usr/bin/env python3
# Copyright (c) 2016-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""SipHash-2-4 implementation.
This implements SipHash-2-4. For convenience, an interface taking 256-bit
... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/ripemd160.py | # Copyright (c) 2021 Pieter Wuille
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test-only pure Python RIPEMD160 implementation."""
import unittest
# Message schedule indexes for the left path.
ML = [
0, 1, 2, 3, 4, 5, 6... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/bip324_cipher.py | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test-only implementation of ChaCha20 Poly1305 AEAD Construction in RFC 8439 and FSChaCha20Poly1305 for BIP ... | 0 |
bitcoin/test/functional/test_framework | bitcoin/test/functional/test_framework/crypto/secp256k1.py | # Copyright (c) 2022-2023 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test-only implementation of low-level secp256k1 field and group arithmetic
It is designed for ease of understanding, not per... | 0 |
bitcoin/test/functional | bitcoin/test/functional/data/invalid_txs.py | #!/usr/bin/env python3
# Copyright (c) 2015-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Templates for constructing various sorts of invalid transactions.
These templates (or an iterator ove... | 0 |
bitcoin/test/functional | bitcoin/test/functional/data/rpc_psbt.json | {
"invalid" : [
"AgAAAAEmgXE3Ht/yhek3re6ks3t4AAwFZsuzrWRkFxPKQhcb9gAAAABqRzBEAiBwsiRRI+a/R01gxbUMBD1MaRpdJDXwmjSnZiqdwlF5CgIgATKcqdrPKAvfMHQOwDkEIkIsgctFg5RXrrdvwS7dlbMBIQJlfRGNM1e44PTCzUbbezn22cONmnCry5st5dyNv+TOMf7///8C09/1BQAAAAAZdqkU0MWZA8W6woaHYOkP1SGkZlqnZSCIrADh9QUAAAAAF6kUNUXm4zuDLEcFDyTT7rk8nAOUi8e... | 0 |
bitcoin/test/functional | bitcoin/test/functional/data/rpc_bip67.json | [
{
"keys": [
"02ff12471208c14bd580709cb2358d98975247d8765f92bc25eab3b2763ed605f8",
"02fe6f0a5a297eb38c391581c4413e084773ea23954d93f7753db7dc0adc188b2f"
],
"sorted_keys": [
"02fe6f0a5a297eb38c391581c4413e084773ea23954d93f7753db7dc0adc188b2f",
"... | 0 |
bitcoin/test/functional | bitcoin/test/functional/data/rpc_getblockstats.json | {
"blocks": [
"0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4adae5494dffff7f20020000000101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f323... | 0 |
bitcoin/test/functional | bitcoin/test/functional/data/blockheader_testnet3.hex | fork:0000002043497fd7f826957108f4a30fd9cec3aeba79972084e90ead01ea3309000000000943e54375082c03172552ae841bab31ebf2463484574f6ce6fe9c3723e3defb719a485dffff001db8b63209
fork:00000020da2809ab72cf2502ecb29137dbe63e51fb82fb5babe6c9530dd86dea000000005dfcdc47012c19a2708b53e820c71b529f616a45529d48bad484948c84685d572d9c485dffff0... | 0 |
bitcoin/test/functional | bitcoin/test/functional/data/rpc_decodescript.json | [
[
"5120eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
{
"asm": "1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"address": "bcrt1pamhwamhwamhwamhwamhwamhwamhwamhwamhwamhwamhwamhwamhqz6nvlh",
"desc": "rawtr(eeeeeeeeeeeeeee... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.