Skip to content

Commit 279ab20

Browse files
committed
Merge bitcoin#31925: contrib: update utxo_to_sqlite tool documentation and comment
e747ed9 contrib: fix read metadata related comment (rkrux) d3095ac contrib: update `dumptxoutset` command in utxo_to_sqlite doc (rkrux) Pull request description: I noticed couple discrepancies in the documentation and comments of `utxo_to_sqlite` tool while using it, this PR fixes them. More details in the commit messages. ACKs for top commit: theStack: lgtm ACK e747ed9 Tree-SHA512: c5dab25d97c50a203ba008acfc5c93baf20cf24261a5a5127bdacc41eeeeae1c9d7b129710c2997e9fd1536ec000186e7f6395efc0188e1111b47868b7d9745a
2 parents f0ac248 + e747ed9 commit 279ab20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/utxo-tools/utxo_to_sqlite.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""Tool to convert a compact-serialized UTXO set to a SQLite3 database.
66
77
The input UTXO set can be generated by Bitcoin Core with the `dumptxoutset` RPC:
8-
$ bitcoin-cli dumptxoutset ~/utxos.dat
8+
$ bitcoin-cli dumptxoutset ~/utxos.dat latest
99
1010
The created database contains a table `utxos` with the following schema:
1111
(txid TEXT, vout INT, value INT, coinbase INT, height INT, scriptpubkey TEXT)
@@ -126,7 +126,7 @@ def main():
126126
con = sqlite3.connect(args.outfile)
127127
con.execute("CREATE TABLE utxos(txid TEXT, vout INT, value INT, coinbase INT, height INT, scriptpubkey TEXT)")
128128

129-
# read metadata (magic bytes, version, network magic, block height, block hash, UTXO count)
129+
# read metadata (magic bytes, version, network magic, block hash, UTXO count)
130130
f = open(args.infile, 'rb')
131131
magic_bytes = f.read(5)
132132
version = int.from_bytes(f.read(2), 'little')

0 commit comments

Comments
 (0)