doc: say that listtransactions gives blockheight 0 for a tx not in a block
What changed, and why it matters
This commit only updates documentation to explain that the `listtransactions` command reports a block height and transaction index of 0 when a transaction is not currently in a block (for example, because it hasn't been mined yet or was removed by a blockchain reorganization). No code behavior was changed.
No security action needed. This is a documentation-only clarification.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies two JSON schema files (contrib/msggen/msggen/schema.json and doc/schemas/listtransactions.json) to clarify the descriptions of the blockheight and txindex fields returned by the listtransactions RPC. The descriptions now state that these fields are 0 when the transaction is unmined or no longer in the main chain after a reorg. There are no logic, validation, or runtime changes.
Changed components
doc/schemas/listtransactions.jsoncontrib/msggen/msggen/schema.jsonInspect captured patch +4 / −4
### contrib/msggen/msggen/schema.json
@@ -30123,13 +30123,13 @@
"blockheight": {
"type": "u32",
"description": [
- "The block height of this tx."
+ "The block height of this tx, or 0 if it is not in a block (yet, or any more after a reorg)."
]
},
"txindex": {
"type": "u32",
"description": [
- "The transaction number within the block."
+ "The transaction number within the block, or 0 if it is not in a block."
]
},
"locktime": {
### doc/schemas/listtransactions.json
@@ -51,13 +51,13 @@
"blockheight": {
"type": "u32",
"description": [
- "The block height of this tx."
+ "The block height of this tx, or 0 if it is not in a block (yet, or any more after a reorg)."
]
},
"txindex": {
"type": "u32",
"description": [
- "The transaction number within the block."
+ "The transaction number within the block, or 0 if it is not in a block."
]
},
"locktime": {Why this scored 20/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.