Skip to content

Commit 446d987

Browse files
committed
Comments, style.
1 parent daa092a commit 446d987

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

include/bitcoin/database/tables/archives/txs.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace libbitcoin {
3131
namespace database {
3232
namespace table {
3333

34-
// TODO: make heavy field variable size.
34+
// TODO: interval could move to count and sizes made variable.
3535
// TODO: fks can instead be stored as a count and coinbase fk,
3636
// TODO: but will need to be disambiguated from compact blocks.
3737

include/bitcoin/database/tables/schema.hpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ struct input
121121
static constexpr size_t pk = schema::put;
122122
using link = linkage<pk, to_bits(pk)>;
123123
static constexpr size_t minsize =
124-
1u + // variable_size (minimum 1, average 1)
125-
1u; // variable_size (minimum 1, average 1)
124+
one + // script size (variable)
125+
one; // witness size (variable)
126126
static constexpr size_t minrow = minsize;
127127
static constexpr size_t size = max_size_t;
128128
static_assert(minsize == 2u);
@@ -138,12 +138,12 @@ struct output
138138
using link = linkage<pk, to_bits(pk)>;
139139
static constexpr size_t minsize =
140140
schema::transaction::pk + // parent->tx (address navigation)
141-
5u + // variable_size (minimum 1, average 5)
142-
1u; // variable_size (minimum 1, average 1)
141+
one + // value (variable)
142+
one; // script size (variable)
143143
static constexpr size_t minrow = minsize;
144144
static constexpr size_t size = max_size_t;
145-
static_assert(minsize == 10u);
146-
static_assert(minrow == 10u);
145+
static_assert(minsize == 6u);
146+
static_assert(minrow == 6u);
147147
static_assert(link::size == 5u);
148148
};
149149

@@ -209,8 +209,8 @@ struct txs
209209
schema::size + // heavy
210210
count_ + // txs
211211
schema::transaction::pk;// coinbase tx
212-
////schema::bit + // is interval [merged into light]
213-
////0 | schema::hash + // interval hash [each 2048th block]
212+
////schema::bit + // is interval (merged into light)
213+
////0 | schema::hash + // interval hash (each 2048th block)
214214
static constexpr size_t minrow = minsize;
215215
static constexpr size_t size = max_size_t;
216216
static_assert(minsize == 12u);
@@ -244,7 +244,7 @@ struct strong_tx
244244
using link = linkage<pk, to_bits(pk)>;
245245
using key = system::data_array<sk>;
246246
static constexpr size_t minsize =
247-
////schema::bit + // merged bit into header::pk.
247+
////schema::bit + // positive (merged bit into header::pk)
248248
schema::header::pk;
249249
static constexpr size_t minrow = pk + sk + minsize;
250250
static constexpr size_t size = minsize;
@@ -286,10 +286,10 @@ struct prevout
286286
static constexpr size_t pk = schema::prevout_;
287287
using link = linkage<pk, to_bits(pk)>;
288288
static constexpr size_t minsize =
289-
////schema::bit + // merged bit into transaction::pk.
290-
one + // varint(conflict-count)
291-
schema::transaction::pk + // prevout_tx
292-
one; // varint(sequence)
289+
////schema::bit + // coinbase (merged into transaction::pk).
290+
one + // conflict-count (variable)
291+
schema::transaction::pk + // prevout_tx
292+
one; // sequence (variable)
293293
static constexpr size_t minrow = minsize;
294294
static constexpr size_t size = max_size_t;
295295
static_assert(minsize == 6u);
@@ -324,9 +324,9 @@ struct validated_tx
324324
schema::flags +
325325
schema::header::pk +
326326
sizeof(uint32_t) +
327-
schema::code + // TODO: change code to variable.
328-
one + // variable: fee
329-
one; // variable: sigops
327+
schema::code + // TODO: change to variable.
328+
one + // fee (variable)
329+
one; // sigops (variable)
330330
static constexpr size_t minrow = pk + sk + minsize;
331331
static constexpr size_t size = max_size_t;
332332
static constexpr size_t cell = link::size;

0 commit comments

Comments
 (0)