Skip to content

Commit 438aea2

Browse files
committed
Update store tests for prevout table.
1 parent 1adc022 commit 438aea2

File tree

2 files changed

+51
-50
lines changed

2 files changed

+51
-50
lines changed

test/mocks/map_store.hpp

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,6 @@ class map_store
6868
return header_body_.file();
6969
}
7070

71-
inline const path& point_head_file() const NOEXCEPT
72-
{
73-
return point_head_.file();
74-
}
75-
76-
inline const path& point_body_file() const NOEXCEPT
77-
{
78-
return point_body_.file();
79-
}
80-
8171
inline const path& input_head_file() const NOEXCEPT
8272
{
8373
return input_head_.file();
@@ -98,6 +88,16 @@ class map_store
9888
return output_body_.file();
9989
}
10090

91+
inline const path& point_head_file() const NOEXCEPT
92+
{
93+
return point_head_.file();
94+
}
95+
96+
inline const path& point_body_file() const NOEXCEPT
97+
{
98+
return point_body_.file();
99+
}
100+
101101
inline const path& puts_head_file() const NOEXCEPT
102102
{
103103
return puts_head_.file();
@@ -108,6 +108,16 @@ class map_store
108108
return puts_body_.file();
109109
}
110110

111+
inline const path& spend_head_file() const NOEXCEPT
112+
{
113+
return spend_head_.file();
114+
}
115+
116+
inline const path& spend_body_file() const NOEXCEPT
117+
{
118+
return spend_body_.file();
119+
}
120+
111121
inline const path& tx_head_file() const NOEXCEPT
112122
{
113123
return tx_head_.file();
@@ -130,16 +140,6 @@ class map_store
130140

131141
// Indexes.
132142

133-
inline const path& address_head_file() const NOEXCEPT
134-
{
135-
return address_head_.file();
136-
}
137-
138-
inline const path& address_body_file() const NOEXCEPT
139-
{
140-
return address_body_.file();
141-
}
142-
143143
inline const path& candidate_head_file() const NOEXCEPT
144144
{
145145
return candidate_head_.file();
@@ -160,16 +160,6 @@ class map_store
160160
return confirmed_body_.file();
161161
}
162162

163-
inline const path& spend_head_file() const NOEXCEPT
164-
{
165-
return spend_head_.file();
166-
}
167-
168-
inline const path& spend_body_file() const NOEXCEPT
169-
{
170-
return spend_body_.file();
171-
}
172-
173163
inline const path& strong_tx_head_file() const NOEXCEPT
174164
{
175165
return strong_tx_head_.file();
@@ -182,6 +172,16 @@ class map_store
182172

183173
// Caches.
184174

175+
inline const path& prevout_head_file() const NOEXCEPT
176+
{
177+
return prevout_head_.file();
178+
}
179+
180+
inline const path& prevout_body_file() const NOEXCEPT
181+
{
182+
return prevout_body_.file();
183+
}
184+
185185
inline const path& validated_bk_head_file() const NOEXCEPT
186186
{
187187
return validated_bk_head_.file();
@@ -202,6 +202,18 @@ class map_store
202202
return validated_tx_body_.file();
203203
}
204204

205+
// Optionals.
206+
207+
inline const path& address_head_file() const NOEXCEPT
208+
{
209+
return address_head_.file();
210+
}
211+
212+
inline const path& address_body_file() const NOEXCEPT
213+
{
214+
return address_body_.file();
215+
}
216+
205217
inline const path& neutrino_head_file() const NOEXCEPT
206218
{
207219
return neutrino_head_.file();
@@ -222,16 +234,6 @@ class map_store
222234
//// return bootstrap_body_.file();
223235
////}
224236

225-
////inline const path& buffer_head_file() const NOEXCEPT
226-
////{
227-
//// return buffer_head_.file();
228-
////}
229-
230-
////inline const path& buffer_body_file() const NOEXCEPT
231-
////{
232-
//// return buffer_body_.file();
233-
////}
234-
235237
// Locks.
236238

237239
inline const path& flush_lock_file() const NOEXCEPT

test/store.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,42 +70,41 @@ BOOST_AUTO_TEST_CASE(store__paths__default_configuration__expected)
7070
/// Archive.
7171
BOOST_REQUIRE_EQUAL(instance.header_head_file(), "bitcoin/heads/archive_header.head");
7272
BOOST_REQUIRE_EQUAL(instance.header_body_file(), "bitcoin/archive_header.data");
73-
BOOST_REQUIRE_EQUAL(instance.point_head_file(), "bitcoin/heads/archive_point.head");
74-
BOOST_REQUIRE_EQUAL(instance.point_body_file(), "bitcoin/archive_point.data");
7573
BOOST_REQUIRE_EQUAL(instance.input_head_file(), "bitcoin/heads/archive_input.head");
7674
BOOST_REQUIRE_EQUAL(instance.input_body_file(), "bitcoin/archive_input.data");
7775
BOOST_REQUIRE_EQUAL(instance.output_head_file(), "bitcoin/heads/archive_output.head");
7876
BOOST_REQUIRE_EQUAL(instance.output_body_file(), "bitcoin/archive_output.data");
77+
BOOST_REQUIRE_EQUAL(instance.point_head_file(), "bitcoin/heads/archive_point.head");
78+
BOOST_REQUIRE_EQUAL(instance.point_body_file(), "bitcoin/archive_point.data");
7979
BOOST_REQUIRE_EQUAL(instance.puts_head_file(), "bitcoin/heads/archive_puts.head");
8080
BOOST_REQUIRE_EQUAL(instance.puts_body_file(), "bitcoin/archive_puts.data");
81+
BOOST_REQUIRE_EQUAL(instance.spend_head_file(), "bitcoin/heads/archive_spend.head");
82+
BOOST_REQUIRE_EQUAL(instance.spend_body_file(), "bitcoin/archive_spend.data");
8183
BOOST_REQUIRE_EQUAL(instance.tx_head_file(), "bitcoin/heads/archive_tx.head");
8284
BOOST_REQUIRE_EQUAL(instance.tx_body_file(), "bitcoin/archive_tx.data");
8385
BOOST_REQUIRE_EQUAL(instance.txs_head_file(), "bitcoin/heads/archive_txs.head");
8486
BOOST_REQUIRE_EQUAL(instance.txs_body_file(), "bitcoin/archive_txs.data");
8587

8688
/// Index.
87-
BOOST_REQUIRE_EQUAL(instance.address_head_file(), "bitcoin/heads/address.head");
88-
BOOST_REQUIRE_EQUAL(instance.address_body_file(), "bitcoin/address.data");
8989
BOOST_REQUIRE_EQUAL(instance.candidate_head_file(), "bitcoin/heads/candidate.head");
9090
BOOST_REQUIRE_EQUAL(instance.candidate_body_file(), "bitcoin/candidate.data");
9191
BOOST_REQUIRE_EQUAL(instance.confirmed_head_file(), "bitcoin/heads/confirmed.head");
9292
BOOST_REQUIRE_EQUAL(instance.confirmed_body_file(), "bitcoin/confirmed.data");
93-
BOOST_REQUIRE_EQUAL(instance.spend_head_file(), "bitcoin/heads/archive_spend.head");
94-
BOOST_REQUIRE_EQUAL(instance.spend_body_file(), "bitcoin/archive_spend.data");
9593
BOOST_REQUIRE_EQUAL(instance.strong_tx_head_file(), "bitcoin/heads/strong_tx.head");
9694
BOOST_REQUIRE_EQUAL(instance.strong_tx_body_file(), "bitcoin/strong_tx.data");
9795

9896
/// Caches.
99-
BOOST_REQUIRE_EQUAL(instance.validated_bk_head_file(), "bitcoin/heads/validated_bk.head");
100-
BOOST_REQUIRE_EQUAL(instance.validated_bk_body_file(), "bitcoin/validated_bk.data");
97+
BOOST_REQUIRE_EQUAL(instance.prevout_head_file(), "bitcoin/heads/prevout.head");
98+
BOOST_REQUIRE_EQUAL(instance.prevout_body_file(), "bitcoin/prevout.data");
10199
BOOST_REQUIRE_EQUAL(instance.validated_tx_head_file(), "bitcoin/heads/validated_tx.head");
102100
BOOST_REQUIRE_EQUAL(instance.validated_tx_body_file(), "bitcoin/validated_tx.data");
101+
102+
BOOST_REQUIRE_EQUAL(instance.address_head_file(), "bitcoin/heads/address.head");
103+
BOOST_REQUIRE_EQUAL(instance.address_body_file(), "bitcoin/address.data");
103104
BOOST_REQUIRE_EQUAL(instance.neutrino_head_file(), "bitcoin/heads/neutrino.head");
104105
BOOST_REQUIRE_EQUAL(instance.neutrino_body_file(), "bitcoin/neutrino.data");
105106
////BOOST_REQUIRE_EQUAL(instance.bootstrap_head_file(), "bitcoin/heads/bootstrap.head");
106107
////BOOST_REQUIRE_EQUAL(instance.bootstrap_body_file(), "bitcoin/bootstrap.data");
107-
////BOOST_REQUIRE_EQUAL(instance.buffer_head_file(), "bitcoin/heads/buffer.head");
108-
////BOOST_REQUIRE_EQUAL(instance.buffer_body_file(), "bitcoin/buffer.data");
109108

110109
/// Locks.
111110
BOOST_REQUIRE_EQUAL(instance.flush_lock_file(), "bitcoin/flush.lock");

0 commit comments

Comments
 (0)