Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1[2{ "exec": "./bitcoin-util",3"args": ["foo"],4"return_code": 1,5"error_txt": "Error parsing command line arguments: Invalid command 'foo'",6"description": ""7},8{ "exec": "./bitcoin-util",9"args": ["help"],10"return_code": 1,11"error_txt": "Error parsing command line arguments: Invalid command 'help'",12"description": "`help` raises an error. Use `-help`"13},14{ "exec": "./bitcoin-util",15"args": ["grind"],16"return_code": 1,17"error_txt": "Must specify block header to grind",18"description": ""19},20{ "exec": "./bitcoin-util",21"args": ["grind", "1", "2"],22"return_code": 1,23"error_txt": "Must specify block header to grind",24"description": ""25},26{ "exec": "./bitcoin-util",27"args": ["grind", "aa"],28"return_code": 1,29"error_txt": "Could not decode block header",30"description": ""31},32{33"exec": "./bitcoin-util",34"args": ["getchainparams"],35"return_code": 0,36"output_cmp": "getchainparams-mainnet.json",37"description": "getchainparams returns mainnet info"38},39{40"exec": "./bitcoin-util",41"args": ["-regtest", "getchainparams"],42"return_code": 0,43"output_cmp": "getchainparams-regtest.json",44"description": "getchainparams returns regtest info"45},46{47"exec": "./bitcoin-util",48"args": ["-testnet", "getchainparams"],49"return_code": 0,50"output_cmp": "getchainparams-testnet.json",51"description": "getchainparams returns testnet info"52},53{54"exec": "./bitcoin-util",55"args": ["-testnet4", "getchainparams"],56"return_code": 0,57"output_cmp": "getchainparams-testnet4.json",58"description": "getchainparams returns testnet4 info"59},60{61"exec": "./bitcoin-util",62"args": ["-signet", "getchainparams"],63"return_code": 0,64"output_cmp": "getchainparams-signet.json",65"description": "getchainparams returns signet info"66},67{68"exec": "./bitcoin-util",69"args": ["-signet", "-signetchallenge=512102f7561d208dd9ae99bf497273e16f389bdbd6c4742ddb8e6b216e64fa2928ad8f51ae", "getchainparams"],70"return_code": 0,71"output_cmp": "getchainparams-signet-custom.json",72"description": "getchainparams returns custom signet info"73},74{75"exec": "./bitcoin-util",76"args": ["getchainparams", "extra_arg"],77"return_code": 1,78"error_txt": "getchainparams does not take arguments",79"description": "getchainparams rejects extra arguments"80},81{ "exec": "./bitcoin-tx",82"args": ["-create", "nversion=1"],83"output_cmp": "blanktxv1.hex",84"description": "Creates a blank v1 transaction"85},86{ "exec": "./bitcoin-tx",87"args": ["-json","-create", "nversion=1"],88"output_cmp": "blanktxv1.json",89"description": "Creates a blank v1 transaction (output in json)"90},91{ "exec": "./bitcoin-tx",92"args": ["-"],93"input": "blanktxv2.hex",94"output_cmp": "blanktxv2.hex",95"description": "Creates a blank transaction when nothing is piped into bitcoin-tx"96},97{ "exec": "./bitcoin-tx",98"args": ["-json","-create"],99"output_cmp": "blanktxv2.json",100"description": "Creates a blank transaction (output in json)"101},102{ "exec": "./bitcoin-tx",103"args": ["-json","-"],104"input": "blanktxv2.hex",105"output_cmp": "blanktxv2.json",106"description": "Creates a blank transaction when nothing is piped into bitcoin-tx (output in json)"107},108{ "exec": "./bitcoin-tx",109"args": ["-create", "nversion=+1"],110"return_code": 1,111"error_txt": "error: Invalid TX version requested",112"description": "Tests the check for invalid nversion value"113},114{ "exec": "./bitcoin-tx",115"args": ["-create", "nversion=1foo"],116"return_code": 1,117"error_txt": "error: Invalid TX version requested",118"description": "Tests the check for invalid nversion value"119},120{ "exec": "./bitcoin-tx",121"args": ["-", "delin=1"],122"input": "tx394b54bb.hex",123"output_cmp": "tt-delin1-out.hex",124"description": "Deletes a single input from a transaction"125},126{ "exec": "./bitcoin-tx",127"args": ["-json", "-", "delin=1"],128"input": "tx394b54bb.hex",129"output_cmp": "tt-delin1-out.json",130"description": "Deletes a single input from a transaction (output in json)"131},132{ "exec": "./bitcoin-tx",133"args": ["-", "delin=31"],134"input": "tx394b54bb.hex",135"return_code": 1,136"error_txt": "error: Invalid TX input index '31'",137"description": "Attempts to delete an input with a bad index from a transaction. Expected to fail."138},139{ "exec": "./bitcoin-tx",140"args": ["-", "delin=1foo"],141"input": "tx394b54bb.hex",142"return_code": 1,143"error_txt": "error: Invalid TX input index",144"description": "Tests the check for an invalid input index with delin"145},146{ "exec": "./bitcoin-tx",147"args": ["-", "delout=1"],148"input": "tx394b54bb.hex",149"output_cmp": "tt-delout1-out.hex",150"description": "Deletes a single output from a transaction"151},152{ "exec": "./bitcoin-tx",153"args": ["-json", "-", "delout=1"],154"input": "tx394b54bb.hex",155"output_cmp": "tt-delout1-out.json",156"description": "Deletes a single output from a transaction (output in json)"157},158{ "exec": "./bitcoin-tx",159"args": ["-", "delout=2"],160"input": "tx394b54bb.hex",161"return_code": 1,162"error_txt": "error: Invalid TX output index '2'",163"description": "Attempts to delete an output with a bad index from a transaction. Expected to fail."164},165{ "exec": "./bitcoin-tx",166"args": ["-", "delout=1foo"],167"input": "tx394b54bb.hex",168"return_code": 1,169"error_txt": "error: Invalid TX output index",170"description": "Tests the check for an invalid output index with delout"171},172{ "exec": "./bitcoin-tx",173"args": ["-", "locktime=317000"],174"input": "tx394b54bb.hex",175"output_cmp": "tt-locktime317000-out.hex",176"description": "Adds an nlocktime to a transaction"177},178{ "exec": "./bitcoin-tx",179"args": ["-json", "-", "locktime=317000"],180"input": "tx394b54bb.hex",181"output_cmp": "tt-locktime317000-out.json",182"description": "Adds an nlocktime to a transaction (output in json)"183},184{ "exec": "./bitcoin-tx",185"args": ["-create", "locktime=+317"],186"return_code": 1,187"error_txt": "error: Invalid TX locktime requested",188"description": "Tests the check for invalid locktime value"189},190{ "exec": "./bitcoin-tx",191"args": ["-create", "locktime=317000foo"],192"return_code": 1,193"error_txt": "error: Invalid TX locktime requested",194"description": "Tests the check for invalid locktime value"195},196{ "exec": "./bitcoin-tx",197"args":198["-create",199"in=Z897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0"],200"return_code": 1,201"error_txt": "error: invalid TX input txid",202"description": "Tests the check for an invalid txid invalid hex"203},204{ "exec": "./bitcoin-tx",205"args":206["-create",207"in=5897de6bd6:0"],208"return_code": 1,209"error_txt": "error: invalid TX input txid",210"description": "Tests the check for an invalid txid valid hex but too short"211},212{ "exec": "./bitcoin-tx",213"args":214["-create",215"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f12:0"],216"return_code": 1,217"error_txt": "error: invalid TX input txid",218"description": "Tests the check for an invalid txid valid hex but too long"219},220{ "exec": "./bitcoin-tx",221"args":222["-create",223"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",224"replaceable=0foo"],225"return_code": 1,226"error_txt": "error: Invalid TX input index",227"description": "Tests the check for an invalid string input index with replaceable"228},229{ "exec": "./bitcoin-tx",230"args":231["-create",232"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",233"replaceable=+0"],234"return_code": 1,235"error_txt": "error: Invalid TX input index",236"description": "Tests the check for an invalid string input index with replaceable"237},238{239"exec": "./bitcoin-tx",240"args":241["-create",242"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",243"replaceable=-1"],244"return_code": 1,245"error_txt": "error: Invalid TX input index",246"description": "Tests the check for an invalid negative input index with replaceable"247},248{249"exec": "./bitcoin-tx",250"args":
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.