Skip to content

Commit 204a86e

Browse files
authored
db: fix Windows build after PR 2686 (#2689)
1 parent cd80428 commit 204a86e

File tree

12 files changed

+30
-30
lines changed

12 files changed

+30
-30
lines changed

silkworm/db/blocks/bodies/body_queries.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
namespace silkworm::snapshots {
2626

27-
using BodyFindByBlockNumSegmentQuery = FindByIdSegmentQuery<BodySegmentWordDecoder, &db::blocks::kBodySegmentAndIdxNames>;
27+
using BodyFindByBlockNumSegmentQuery = FindByIdSegmentQuery<BodySegmentWordDecoder, db::blocks::kBodySegmentAndIdxNames>;
2828

2929
struct BodyFindByBlockNumQuery : public FindByTimestampMapQuery<BodyFindByBlockNumSegmentQuery> {
3030
using FindByTimestampMapQuery::FindByTimestampMapQuery;

silkworm/db/blocks/headers/header_queries.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace silkworm::snapshots {
2525

26-
using HeaderFindByBlockNumSegmentQuery = FindByIdSegmentQuery<HeaderSegmentWordDecoder, &db::blocks::kHeaderSegmentAndIdxNames>;
26+
using HeaderFindByBlockNumSegmentQuery = FindByIdSegmentQuery<HeaderSegmentWordDecoder, db::blocks::kHeaderSegmentAndIdxNames>;
2727

2828
struct HeaderFindByBlockNumQuery : public FindByTimestampMapQuery<HeaderFindByBlockNumSegmentQuery> {
2929
using FindByTimestampMapQuery::FindByTimestampMapQuery;
@@ -32,7 +32,7 @@ struct HeaderFindByBlockNumQuery : public FindByTimestampMapQuery<HeaderFindByBl
3232
}
3333
};
3434

35-
using HeaderFindByHashSegmentQuery = FindByHashSegmentQuery<HeaderSegmentWordDecoder, &db::blocks::kHeaderSegmentAndIdxNames>;
35+
using HeaderFindByHashSegmentQuery = FindByHashSegmentQuery<HeaderSegmentWordDecoder, db::blocks::kHeaderSegmentAndIdxNames>;
3636
using HeaderFindByHashQuery = FindMapQuery<HeaderFindByHashSegmentQuery>;
3737

3838
} // namespace silkworm::snapshots

silkworm/db/blocks/transactions/txn_queries.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828

2929
namespace silkworm::snapshots {
3030

31-
using TransactionFindByIdSegmentQuery = FindByIdSegmentQuery<TransactionSegmentWordDecoder, &db::blocks::kTxnSegmentAndIdxNames>;
32-
using TransactionFindByHashSegmentQuery = FindByHashSegmentQuery<TransactionSegmentWordDecoder, &db::blocks::kTxnSegmentAndIdxNames>;
31+
using TransactionFindByIdSegmentQuery = FindByIdSegmentQuery<TransactionSegmentWordDecoder, db::blocks::kTxnSegmentAndIdxNames>;
32+
using TransactionFindByHashSegmentQuery = FindByHashSegmentQuery<TransactionSegmentWordDecoder, db::blocks::kTxnSegmentAndIdxNames>;
3333

34-
using TransactionRangeFromIdSegmentQuery = RangeFromIdSegmentQuery<TransactionSegmentWordDecoder, &db::blocks::kTxnSegmentAndIdxNames>;
34+
using TransactionRangeFromIdSegmentQuery = RangeFromIdSegmentQuery<TransactionSegmentWordDecoder, db::blocks::kTxnSegmentAndIdxNames>;
3535
using TransactionRangeFromIdQuery = FindByTimestampMapQuery<TransactionRangeFromIdSegmentQuery>;
3636

37-
using TransactionPayloadRlpRangeFromIdSegmentQuery = RangeFromIdSegmentQuery<TransactionSegmentWordPayloadRlpDecoder<Bytes>, &db::blocks::kTxnSegmentAndIdxNames>;
37+
using TransactionPayloadRlpRangeFromIdSegmentQuery = RangeFromIdSegmentQuery<TransactionSegmentWordPayloadRlpDecoder<Bytes>, db::blocks::kTxnSegmentAndIdxNames>;
3838
using TransactionPayloadRlpRangeFromIdQuery = FindByTimestampMapQuery<TransactionPayloadRlpRangeFromIdSegmentQuery>;
3939

4040
class TransactionBlockNumByTxnHashSegmentQuery {

silkworm/db/datastore/domain_get_as_of_query.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ namespace silkworm::datastore {
2424
template <
2525
kvdb::EncoderConcept TKeyEncoder1, snapshots::EncoderConcept TKeyEncoder2,
2626
kvdb::DecoderConcept TValueDecoder1, snapshots::DecoderConcept TValueDecoder2,
27-
const snapshots::SegmentAndAccessorIndexNames* history_segment_names>
27+
const snapshots::SegmentAndAccessorIndexNames& history_segment_names>
2828
struct DomainGetAsOfQuery {
2929
DomainGetAsOfQuery(
3030
kvdb::Domain kvdb_entity,
3131
kvdb::ROTxn& tx,
3232
const snapshots::SnapshotRepositoryROAccess& repository)
3333
: query1_{*kvdb_entity.history, tx, repository},
34-
query2_{history_segment_names->front(), kvdb_entity, tx, repository} {}
34+
query2_{history_segment_names.front(), kvdb_entity, tx, repository} {}
3535

3636
DomainGetAsOfQuery(
3737
const kvdb::DatabaseRef& database,
3838
kvdb::ROTxn& tx,
3939
const snapshots::SnapshotRepositoryROAccess& repository)
4040
: query1_{database, tx, repository},
41-
query2_{history_segment_names->front(), database, tx, repository} {}
41+
query2_{history_segment_names.front(), database, tx, repository} {}
4242

4343
using Key = decltype(TKeyEncoder1::value);
4444
using Value = decltype(TValueDecoder1::value);

silkworm/db/datastore/history_get_query.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace silkworm::datastore {
2525
template <
2626
kvdb::EncoderConcept TKeyEncoder1, snapshots::EncoderConcept TKeyEncoder2,
2727
kvdb::DecoderConcept TValueDecoder1, snapshots::DecoderConcept TValueDecoder2,
28-
const snapshots::SegmentAndAccessorIndexNames* segment_names>
28+
const snapshots::SegmentAndAccessorIndexNames& segment_names>
2929
struct HistoryGetQuery {
3030
HistoryGetQuery(
3131
kvdb::History kvdb_entity,
@@ -39,7 +39,7 @@ struct HistoryGetQuery {
3939
kvdb::ROTxn& tx,
4040
const snapshots::SnapshotRepositoryROAccess& repository)
4141
: HistoryGetQuery{
42-
database.domain(segment_names->front()).history.value(),
42+
database.domain(segment_names.front()).history.value(),
4343
tx,
4444
repository,
4545
} {}

silkworm/db/datastore/snapshots/basic_queries.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace silkworm::snapshots {
3030

3131
template <
3232
DecoderConcept TDecoder,
33-
const SegmentAndAccessorIndexNames* segment_names>
33+
const SegmentAndAccessorIndexNames& segment_names>
3434
class BasicSegmentQuery {
3535
public:
3636
explicit BasicSegmentQuery(
@@ -39,7 +39,7 @@ class BasicSegmentQuery {
3939
index_{segment_and_index.index} {}
4040

4141
explicit BasicSegmentQuery(const SegmentAndAccessorIndexProvider& bundle)
42-
: BasicSegmentQuery{bundle.segment_and_accessor_index(*segment_names)} {}
42+
: BasicSegmentQuery{bundle.segment_and_accessor_index(segment_names)} {}
4343

4444
protected:
4545
segment::SegmentReader<TDecoder> reader_;
@@ -48,7 +48,7 @@ class BasicSegmentQuery {
4848

4949
template <
5050
DecoderConcept TDecoder,
51-
const SegmentAndAccessorIndexNames* segment_names>
51+
const SegmentAndAccessorIndexNames& segment_names>
5252
struct FindByIdSegmentQuery : public BasicSegmentQuery<TDecoder, segment_names> {
5353
using BasicSegmentQuery<TDecoder, segment_names>::BasicSegmentQuery;
5454

@@ -65,7 +65,7 @@ struct FindByIdSegmentQuery : public BasicSegmentQuery<TDecoder, segment_names>
6565
template <
6666
EncoderConcept TKeyEncoder,
6767
DecoderConcept TValueDecoder,
68-
const SegmentAndAccessorIndexNames* segment_names>
68+
const SegmentAndAccessorIndexNames& segment_names>
6969
struct FindByKeySegmentQuery : public BasicSegmentQuery<TValueDecoder, segment_names> {
7070
using BasicSegmentQuery<TValueDecoder, segment_names>::BasicSegmentQuery;
7171

@@ -87,7 +87,7 @@ struct FindByKeySegmentQuery : public BasicSegmentQuery<TValueDecoder, segment_n
8787

8888
template <
8989
DecoderConcept TDecoder,
90-
const SegmentAndAccessorIndexNames* segment_names>
90+
const SegmentAndAccessorIndexNames& segment_names>
9191
struct FindByHashSegmentQuery : public BasicSegmentQuery<TDecoder, segment_names> {
9292
using BasicSegmentQuery<TDecoder, segment_names>::BasicSegmentQuery;
9393

@@ -110,7 +110,7 @@ struct FindByHashSegmentQuery : public BasicSegmentQuery<TDecoder, segment_names
110110

111111
template <
112112
DecoderConcept TDecoder,
113-
const SegmentAndAccessorIndexNames* segment_names>
113+
const SegmentAndAccessorIndexNames& segment_names>
114114
struct RangeFromIdSegmentQuery : public BasicSegmentQuery<TDecoder, segment_names> {
115115
using BasicSegmentQuery<TDecoder, segment_names>::BasicSegmentQuery;
116116

silkworm/db/datastore/snapshots/history_get_query.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ namespace silkworm::snapshots {
2828
template <
2929
EncoderConcept TKeyEncoder,
3030
DecoderConcept TValueDecoder,
31-
const SegmentAndAccessorIndexNames* segment_names>
31+
const SegmentAndAccessorIndexNames& segment_names>
3232
struct HistoryGetQuery {
3333
explicit HistoryGetQuery(const SnapshotRepositoryROAccess& repository)
3434
: timestamp_query_{
3535
repository,
36-
[](const SnapshotBundle& bundle) { return bundle.domain(segment_names->front()).history->inverted_index; },
36+
[](const SnapshotBundle& bundle) { return bundle.domain(segment_names.front()).history->inverted_index; },
3737
},
3838
value_query_{repository} {}
3939

silkworm/db/state/accounts_domain.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ struct AccountsDomainDeleteQuery : datastore::kvdb::DomainDeleteQuery<AddressKVD
6767
using AccountsHistoryGetQuery = datastore::HistoryGetQuery<
6868
AddressKVDBEncoder, AddressSnapshotsEncoder,
6969
AccountKVDBCodec, AccountSnapshotsCodec,
70-
&kHistorySegmentAndIdxNamesAccounts>;
70+
kHistorySegmentAndIdxNamesAccounts>;
7171

7272
using AccountsDomainGetAsOfQuery = datastore::DomainGetAsOfQuery<
7373
AddressKVDBEncoder, AddressSnapshotsEncoder,
7474
AccountKVDBCodec, AccountSnapshotsCodec,
75-
&kHistorySegmentAndIdxNamesAccounts>;
75+
kHistorySegmentAndIdxNamesAccounts>;
7676

7777
} // namespace silkworm::db::state

silkworm/db/state/code_domain.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ struct CodeDomainDeleteQuery : datastore::kvdb::DomainDeleteQuery<AddressKVDBEnc
6767
using CodeHistoryGetQuery = datastore::HistoryGetQuery<
6868
AddressKVDBEncoder, AddressSnapshotsEncoder,
6969
datastore::kvdb::RawDecoder<Bytes>, snapshots::RawDecoder<Bytes>,
70-
&kHistorySegmentAndIdxNamesCode>;
70+
kHistorySegmentAndIdxNamesCode>;
7171

7272
using CodeDomainGetAsOfQuery = datastore::DomainGetAsOfQuery<
7373
AddressKVDBEncoder, AddressSnapshotsEncoder,
7474
datastore::kvdb::RawDecoder<Bytes>, snapshots::RawDecoder<Bytes>,
75-
&kHistorySegmentAndIdxNamesCode>;
75+
kHistorySegmentAndIdxNamesCode>;
7676

7777
} // namespace silkworm::db::state

silkworm/db/state/commitment_domain.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ struct CommitmentDomainDeleteQuery : datastore::kvdb::DomainDeleteQuery<datastor
6666
using CommitmentHistoryGetQuery = datastore::HistoryGetQuery<
6767
datastore::kvdb::RawEncoder<ByteView>, snapshots::RawEncoder<ByteView>,
6868
datastore::kvdb::RawDecoder<Bytes>, snapshots::RawDecoder<Bytes>,
69-
&kHistorySegmentAndIdxNamesCommitment>;
69+
kHistorySegmentAndIdxNamesCommitment>;
7070

7171
using CommitmentDomainGetAsOfQuery = datastore::DomainGetAsOfQuery<
7272
datastore::kvdb::RawEncoder<ByteView>, snapshots::RawEncoder<ByteView>,
7373
datastore::kvdb::RawDecoder<Bytes>, snapshots::RawDecoder<Bytes>,
74-
&kHistorySegmentAndIdxNamesCommitment>;
74+
kHistorySegmentAndIdxNamesCommitment>;
7575

7676
} // namespace silkworm::db::state

0 commit comments

Comments
 (0)