Skip to content

Instantly share code, notes, and snippets.

@epiccurious
epiccurious / ban_knots_peers.sh
Last active December 16, 2025 21:14
Ban Knots peers on the bitcoin P2P network
#!/bin/bash
#
# Use Bitcoin Core to ban Knots peers
# NOTE 1: Start Bitcoin Core before running this script
# NOTE 2: To schedule runs in Linux, add this line to `crontab -e`:
# */5 * * * * /path/to/ban_knots_peers.sh
set -e
command -v bitcoin-cli >/dev/null ||
@epiccurious
epiccurious / bitcoin_core_pr_tester
Last active February 15, 2024 20:04
Build and test a Bitcoin Core PR
#!/bin/bash
#
# Download, compile, and run functional tests on any Bitcoin Core Pull Request
# Assumes your system is already configured with build and test dependencies
#
# Arguments: (int) the pull request number
#
# Run this locally with:
# curl -fsSL https://gist.github.com/epiccurious/8ba7cddbe39931e1ca0915218ba86c57/raw/bitcoin_core_pr_tester | bash -s -- 12345
#
@epiccurious
epiccurious / bitcoin_connect_tor_i2p.sh
Last active February 7, 2024 22:56
Bitcoin Core connect to Tor and I2P contributor nodes
#!/bin/bash
for node in $(curl -fsSL https://github.com/bitcoin/bitcoin/raw/master/contrib/seeds/nodes_main.txt | grep -E ".onion:8333$|.b32.i2p:0$" | shuf | head -20)
do
echo -n "Adding ${node}… "
bitcoin-cli --rpcwait addnode "${node}" onetry
echo "ok."
done