Skip to content

Commit 0e10112

Browse files
committed
Comments, write assertions.
1 parent 9b8e54f commit 0e10112

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

include/bitcoin/database/tables/caches/ecdsa.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ struct ecdsa
159159
}
160160
}
161161

162+
BC_ASSERT(!sink || sink.get_write_position() == count() * minrow);
162163
return sink;
163164
}
164165

include/bitcoin/database/tables/caches/schnorr.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ struct schnorr
174174
header_fk);
175175
}
176176

177+
BC_ASSERT(!sink || sink.get_write_position() == count() * minrow);
177178
return sink;
178179
}
179180

include/bitcoin/database/tables/schema.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ struct ecdsa
298298
system::hash_size +
299299
system::ec_compressed_size +
300300
system::ec_signature_size +
301-
one + // [m|n] packed 16x16 in one byte in first row.
301+
one + // [m|n] packed 16x16 in one byte in 1st row.
302302
count_ + // input (within block) correlation counter.
303303
schema::header::pk;
304304
static constexpr size_t minrow = minsize;
@@ -318,8 +318,8 @@ struct schnorr
318318
system::hash_size +
319319
system::ec_xonly_size +
320320
system::ec_signature_size +
321-
one + // to_value(system::chain::signatures::category).
322-
two + // [min|max] in two bytes (min in first row, max in second).
321+
one + // to_value(system::chain::signatures::category), 1st row.
322+
two + // [min][max] two bytes each (min 1st row, max 2nd row).
323323
count_ + // input (within block) correlation counter.
324324
schema::header::pk;
325325
static constexpr size_t minrow = minsize;

0 commit comments

Comments
 (0)