From 96c0737649c324aaf6ccf2a0aabe24e32bf8c20b Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Wed, 1 Aug 2018 13:41:27 +0300 Subject: [PATCH] Add key/value separators for schema doc --- doc/schema.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/schema.md b/doc/schema.md index 0d66bb2..1e1363c 100644 --- a/doc/schema.md +++ b/doc/schema.md @@ -6,26 +6,26 @@ The index is stored at a single RocksDB database using the following schema: Allows efficiently finding all funding transactions for a specific address: -| Code | Script Hash Prefix | Funding TxID Prefix | -| ------ | -------------------- | --------------------- | -| `b'O'` | `SHA256(script)[:8]` | `txid[:8]` | +| Code | Script Hash Prefix | Funding TxID Prefix | | +| ------ | -------------------- | --------------------- | - | +| `b'O'` | `SHA256(script)[:8]` | `txid[:8]` | | ## Transaction inputs' index Allows efficiently finding spending transaction of a specific output: -| Code | Funding TxID Prefix | Funding Output Index | Spending TxID Prefix | -| ------ | -------------------- | --------------------- | --------------------- | -| `b'I'` | `txid[:8]` | `uint16` | `txid[:8]` | +| Code | Funding TxID Prefix | Funding Output Index | Spending TxID Prefix | | +| ------ | -------------------- | --------------------- | --------------------- | - | +| `b'I'` | `txid[:8]` | `uint16` | `txid[:8]` | | ## Full Transaction IDs In order to save storage space, we store the full transaction IDs once, and use their 8-byte prefixes for the indexes above. -| Code | Transaction ID | Confirmed height | -| ------ | ----------------- |------------------| -| `b'T'` | `txid` (32 bytes) | `uint32` | +| Code | Transaction ID | | Confirmed height | +| ------ | ----------------- | - | ------------------ | +| `b'T'` | `txid` (32 bytes) | | `uint32` | Note that this mapping allows us to use `getrawtransaction` RPC to retrieve actual transaction data from without `-txindex` enabled (by explicitly specifying the [blockhash](https://github.com/bitcoin/bitcoin/commit/497d0e014cc79d46531d570e74e4aeae72db602d)).