brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
bitcoin-testing-regtestRegtest mode: instant block generation, deterministic fork, multi-node setup, generatetoaddress, fallbackfee config. USE WHEN: building Bitcoin tests, simulating network conditions, scaffolding integration tests.
Independent GitHub snapshot · Automated classification · Original documentation governs
Bitcoin's "regression test" mode. Local-only chain, instant block generation, no PoW difficulty. The default for Bitcoin testing.
bitcoind -regtest -daemon -fallbackfee=0.00001
bitcoin-cli -regtest createwallet test
bitcoin-cli -regtest -rpcwallet=test getnewaddress
# bcrt1q...
# Mine 101 blocks (subsidy matures after 100)
bitcoin-cli -regtest -rpcwallet=test generatetoaddress 101 <addr>
# Now wallet has 50 BTC mature
bitcoin-cli -regtest -rpcwallet=test getbalance
-fallbackfee is required because the empty regtest mempool has
no fee estimates.
# Node 1
bitcoind -regtest -datadir=/tmp/n1 -port=18444 -rpcport=18443 -daemon
# Node 2
bitcoind -regtest -datadir=/tmp/n2 -port=18445 -rpcport=18446 \
-connect=127.0.0.1:18444 -daemon
# Node 3
bitcoind -regtest -datadir=/tmp/n3 -port=18447 -rpcport=18448 \
-connect=127.0.0.1:18444 -daemon
# Mine blocks (deterministic; instant)
bitcoin-cli -regtest generatetoaddress 1 <addr>
# Reset chain (start fresh)
rm -rf ~/.bitcoin/regtest
bitcoind -regtest -daemon
# Specific block at specific time
bitcoin-cli -regtest setmocktime <unix_ts>
bitcoin-cli -regtest generatetoaddress 1 <addr>
m... or n....2....bcrt1q....bcrt1p....-fallbackfee → sendtoaddress errors.-datadir and explicit -regtest arg.