• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

libbitcoin / libbitcoin-database / 46107939574

28 Nov 2026 04:31AM UTC coverage: 92.72% (-0.2%) from 92.945%
46107939574

push

github

web-flow
Merge pull request #1112 from evoskuil/master

Map pool inputs to rows once per template and projection.

9 of 9 new or added lines in 2 files covered. (100.0%)

30 existing lines in 2 files now uncovered.

12138 of 13091 relevant lines covered (92.72%)

98043.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

34.65
/src/memory/utilities.cpp
1
/**
2
 * Copyright (c) 2011-2026 libbitcoin developers
3
 *
4
 * This file is part of libbitcoin.
5
 *
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU Affero General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU Affero General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Affero General Public License
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 */
19
#include <bitcoin/database/memory/utilities.hpp>
20

21
#if defined(HAVE_WINDOWS)
22
    #include <windows.h>
23
    #include <psapi.h>
24
    #include <winioctl.h>
25
#else
26
    #include <sys/mman.h>
27
    #include <unistd.h>
28
#endif
29
#if defined(HAVE_APPLE)
30
    #include <mach/mach.h>
31
    #include <sys/sysctl.h>
32
#endif
33
#if defined(HAVE_FREEBSD)
34
    #include <sys/types.h>
35
    #include <sys/sysctl.h>
36
#endif
37
#if defined(HAVE_LINUX)
38
    #include <algorithm>
39
    #include <cinttypes>
40
    #include <cstdio>
41
    #include <fstream>
42
    #include <sys/stat.h>
43
    #include <sys/sysmacros.h>
44
    #include <sys/vfs.h>
45
#endif
46
#include <filesystem>
47
#include <span>
48
#include <system_error>
49
#include <bitcoin/database/define.hpp>
50

51
namespace libbitcoin {
52
namespace database {
53

54
using namespace system;
55

56
#if defined(HAVE_WINDOWS)
57

58
size_t page_size() NOEXCEPT
59
{
60
    SYSTEM_INFO info{};
61
    ::GetSystemInfo(&info);
62

63
    BC_ASSERT(!is_limited<size_t>(info.dwPageSize));
64
    return info.dwPageSize;
65
}
66

67
uint64_t system_memory() NOEXCEPT
68
{
69
    MEMORYSTATUSEX status{};
70
    status.dwLength = sizeof(status);
71
    return is_zero(::GlobalMemoryStatusEx(&status)) ? zero :
72
        status.ullTotalPhys;
73
}
74

75
uint64_t physical_memory() NOEXCEPT
76
{
77
    // Total physical excludes only hardware reservations,
78
    // which rounding up to whole gibibyte absorbs.
79
    constexpr auto gibibyte = power2<uint64_t>(30u);
80
    const auto memory = system_memory();
81
    return ceilinged_multiply(ceilinged_divide(memory, gibibyte), gibibyte);
82
}
83

84
uint64_t system_free() NOEXCEPT
85
{
86
    MEMORYSTATUSEX status{};
87
    status.dwLength = sizeof(status);
88
    return is_zero(::GlobalMemoryStatusEx(&status)) ? zero :
89
        status.ullAvailPhys;
90
}
91

92
uint64_t system_available() NOEXCEPT
93
{
94
    // Windows available physical memory is the correct semantic directly.
95
    return system_free();
96
}
97

98
uint64_t process_resident() NOEXCEPT
99
{
100
    PROCESS_MEMORY_COUNTERS counters{};
101
    counters.cb = sizeof(counters);
102
    return is_zero(::GetProcessMemoryInfo(::GetCurrentProcess(), &counters,
103
        sizeof(counters))) ? zero :
104
        possible_wide_cast<uint64_t>(counters.WorkingSetSize);
105
}
106

107
size_t system_pressure() NOEXCEPT
108
{
109
    // The kernel low memory resource signal (no configurable threshold).
110
    BOOL low{ FALSE };
111
    const auto handle = ::CreateMemoryResourceNotification(
112
        ::LowMemoryResourceNotification);
113

114
    if (handle == NULL)
115
        return zero;
116

117
    const auto success = !is_zero(::QueryMemoryResourceNotification(handle,
118
        &low));
119
    ::CloseHandle(handle);
120

121
    return success ? (low == FALSE ? 1_size : 4_size) : zero;
122
}
123

124
uint64_t system_compressed() NOEXCEPT
125
{
126
    // No cheap source (performance counters only).
127
    return zero;
128
}
129

130
bool resident(const data_slab& region) NOEXCEPT
131
{
132
    if (region.empty())
133
        return true;
134

135
    std::array<PSAPI_WORKING_SET_EX_INFORMATION, two> pages{};
136
    pages.front().VirtualAddress = region.begin();
137
    pages.back().VirtualAddress = std::prev(region.end());
138
    const auto bytes = possible_narrow_cast<DWORD>(pages.size() *
139
        sizeof(PSAPI_WORKING_SET_EX_INFORMATION));
140

141
    if (is_zero(::QueryWorkingSetEx(::GetCurrentProcess(), pages.data(),
142
        bytes)))
143
        return true;
144

145
    return is_nonzero(pages.front().VirtualAttributes.Valid)
146
        && is_nonzero(pages.back().VirtualAttributes.Valid);
147
}
148

149
void prefetch(const std::span<const data_slab>& regions) NOEXCEPT
150
{
151
    BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
152
    std::vector<WIN32_MEMORY_RANGE_ENTRY> ranges{};
153
    ranges.reserve(regions.size());
154
    for (const auto& region: regions)
155
        if (!region.empty())
156
            ranges.push_back({ region.begin(), region.size() });
157

158
    BC_POP_WARNING()
159

160
    if (!ranges.empty())
161
        ::PrefetchVirtualMemory(::GetCurrentProcess(), ranges.size(),
162
            ranges.data(), 0);
163
}
164

165
#else // HAVE_WINDOWS
166

167
size_t page_size() NOEXCEPT
25,381 ✔
168
{
169
    errno = 0;
25,381 ✔
170
    const auto size = sysconf(_SC_PAGESIZE);
25,381 ✔
171
    if (is_zero(errno) && !is_negative(size))
25,381 ✔
172
    {
173
        BC_ASSERT(!is_limited<size_t>(size));
25,381 ✔
174
        return possible_narrow_sign_cast<size_t>(size);
25,381 ✔
175
    }
176

177
    return zero;
178
}
179

180
uint64_t system_memory() NOEXCEPT
16,467 ✔
181
{
182
    errno = 0;
16,467 ✔
183
    const int64_t pages = sysconf(_SC_PHYS_PAGES);
16,467 ✔
184
    if (is_zero(errno) && !is_negative(pages))
16,467 ✔
185
    {
186
        // Failed page_size also results in zero return.
187
        const auto size = possible_wide_cast<uint64_t>(page_size());
16,467 ✔
188
        return ceilinged_multiply(to_unsigned(pages), size);
16,467 ✔
189
    }
190

191
    return zero;
192
}
193

194
uint64_t physical_memory() NOEXCEPT
1 ✔
195
{
196
#if defined(HAVE_LINUX)
197
    // Zone present pages exclude only firmware carveouts and address holes,
198
    // which rounding up to whole gibibyte absorbs.
199
    constexpr auto gibibyte = power2<uint64_t>(30u);
200
    if (const auto file = std::fopen("/proc/zoneinfo", "r"))
1 ✔
201
    {
202
        char line[128];
203
        uint64_t pages{};
204
        uint64_t present{};
1 ✔
205
        while (!is_null(std::fgets(line, sizeof(line), file)))
269 ✔
206
        {
207
            if (std::sscanf(line, " present %" SCNu64, &present) == 1)
267 ✔
208
                pages += present;
5 ✔
209
        }
210

211
        std::fclose(file);
1 ✔
212
        const auto bytes = ceilinged_multiply<uint64_t>(pages, page_size());
1 ✔
213
        if (!is_zero(bytes))
1 ✔
214
            return ceilinged_multiply(ceilinged_divide(bytes, gibibyte),
1 ✔
215
                gibibyte);
1 ✔
216
    }
217
#endif
218

219
    // Failed or no platform source.
220
    return system_memory();
×
221
}
222

UNCOV
223
uint64_t system_free() NOEXCEPT
×
224
{
225
#if defined(HAVE_APPLE)
226
    auto count = HOST_VM_INFO64_COUNT;
227
    vm_statistics64_data_t statistics{};
228
    if (::host_statistics64(::mach_host_self(), HOST_VM_INFO64,
229
        pointer_cast<integer_t>(&statistics), &count) == KERN_SUCCESS)
230
    {
231
        return ceilinged_multiply<uint64_t>(statistics.free_count, page_size());
232
    }
233
#elif defined(HAVE_FREEBSD)
234
    u_int pages{};
235
    auto length = sizeof(pages);
236
    if (is_zero(::sysctlbyname("vm.stats.vm.v_free_count", &pages, &length,
237
        nullptr, 0)))
238
    {
239
        return ceilinged_multiply<uint64_t>(pages, page_size());
240
    }
241
#else
UNCOV
242
    errno = 0;
×
UNCOV
243
    const int64_t pages = sysconf(_SC_AVPHYS_PAGES);
×
UNCOV
244
    if (is_zero(errno) && !is_negative(pages))
×
245
    {
246
        // Failed page_size() also results in zero return.
UNCOV
247
        const auto size = possible_wide_cast<uint64_t>(page_size());
×
UNCOV
248
        return ceilinged_multiply(to_unsigned(pages), size);
×
249
    }
250
#endif
251

252
    // Failed or no platform source.
253
    return zero;
254
}
255

256
uint64_t system_available() NOEXCEPT
131 ✔
257
{
258
#if defined(HAVE_APPLE)
259
    // Free plus purgeable plus file-backed (external) pages are available to
260
    // allocation without compression or swap.
261
    auto count = HOST_VM_INFO64_COUNT;
262
    vm_statistics64_data_t statistics{};
263
    if (::host_statistics64(::mach_host_self(), HOST_VM_INFO64,
264
        pointer_cast<integer_t>(&statistics), &count) == KERN_SUCCESS)
265
    {
266
        const auto pages = statistics.free_count + statistics.purgeable_count +
267
            statistics.external_page_count;
268
        return ceilinged_multiply<uint64_t>(pages, page_size());
269
    }
270
#elif defined(HAVE_LINUX)
271
    // MemAvailable is kernel estimate of memory available to allocation without
272
    // swapping (includes reclaimable file cache).
273
    if (const auto file = std::fopen("/proc/meminfo", "r"))
131 ✔
274
    {
275
        char line[128];
276
        uint64_t kilobytes{};
131 ✔
277
        while (!is_null(std::fgets(line, sizeof(line), file)))
524 ✔
278
        {
279
            if (std::sscanf(line, "MemAvailable: %" SCNu64 " kB",
393 ✔
280
                &kilobytes) == 1)
281
            {
282
                std::fclose(file);
131 ✔
283
                return ceilinged_multiply<uint64_t>(kilobytes, 1024u);
131 ✔
284
            }
285
        }
286

287
        std::fclose(file);
×
288
    }
289
#endif
290

291
    // Failed or no platform source (free approximates on other platforms).
292
    return system_free();
×
293
}
294

295
uint64_t process_resident() NOEXCEPT
×
296
{
297
#if defined(HAVE_APPLE)
298
    mach_task_basic_info_data_t information{};
299
    mach_msg_type_number_t count = MACH_TASK_BASIC_INFO_COUNT;
300
    if (::task_info(mach_task_self(), MACH_TASK_BASIC_INFO,
301
        pointer_cast<integer_t>(&information), &count) == KERN_SUCCESS)
302
    {
303
        return information.resident_size;
304
    }
305
#elif defined(HAVE_LINUX)
306
    // Process memory in pages: total program size, then resident set size.
307
    if (const auto file = std::fopen("/proc/self/statm", "r"))
×
308
    {
309
        uint64_t pages{};
×
310
        const auto fields = std::fscanf(file, "%*u %" SCNu64, &pages);
×
311
        std::fclose(file);
×
312

313
        if (fields == 1)
×
314
            return ceilinged_multiply<uint64_t>(pages, page_size());
×
315
    }
316
#endif
317

318
    // Failed or no platform source.
319
    return zero;
320
}
321

UNCOV
322
size_t system_pressure() NOEXCEPT
×
323
{
324
#if defined(HAVE_APPLE)
325
    int level{};
326
    auto size = sizeof(level);
327
    if (is_zero(::sysctlbyname("kern.memorystatus_vm_pressure_level", &level,
328
        &size, nullptr, 0)))
329
    {
330
        return possible_narrow_sign_cast<size_t>(level);
331
    }
332
#elif defined(HAVE_LINUX)
333
    // PSI (requires CONFIG_PSI): fraction of recent wall time tasks
334
    // stalled on memory reclaim. Tenth of time stalled treated as
335
    // genuine pressure, partial (some) as warning and total (full)
336
    // as critical, mapping to macos memorystatus level semantics.
UNCOV
337
    if (const auto file = std::fopen("/proc/pressure/memory", "r"))
×
338
    {
339
        char line[128];
UNCOV
340
        auto level = one;
×
UNCOV
341
        double average10{};
×
UNCOV
342
        while (!is_null(std::fgets(line, sizeof(line), file)))
×
343
        {
UNCOV
344
            if ((std::sscanf(line, "some average10=%lf", &average10) == 1) &&
×
345
                (average10 >= 10.0))
×
346
                level = std::max(level, 2_size);
×
347

UNCOV
348
            if ((std::sscanf(line, "full average10=%lf", &average10) == 1) &&
×
349
                (average10 >= 10.0))
×
350
                level = std::max(level, 4_size);
×
351
        }
352

UNCOV
353
        std::fclose(file);
×
UNCOV
354
        return level;
×
355
    }
356
#endif
357

358
    // Failed or no platform source.
359
    return zero;
360
}
361

UNCOV
362
uint64_t system_compressed() NOEXCEPT
×
363
{
364
#if defined(HAVE_APPLE)
365
    auto count = HOST_VM_INFO64_COUNT;
366
    vm_statistics64_data_t statistics{};
367
    if (::host_statistics64(::mach_host_self(), HOST_VM_INFO64,
368
        pointer_cast<integer_t>(&statistics), &count) == KERN_SUCCESS)
369
    {
370
        const auto pages = statistics.compressor_page_count;
371
        return ceilinged_multiply<uint64_t>(pages, page_size());
372
    }
373
#endif
374

375
    // Failed or no platform source adopted. Linux zswap/zram accounting is
376
    // configuration dependent, PSI carries the pressure signal there.
UNCOV
377
    return zero;
×
378
}
379

380
static uint8_t* page_start(const uint8_t* byte, size_t page) NOEXCEPT
248 ✔
381
{
382
    const auto address = std::bit_cast<uintptr_t>(byte);
248 ✔
383
    return std::bit_cast<uint8_t*>(address - (address % page));
248 ✔
384
}
385

386
#if defined(HAVE_OPENBSD)
387
bool resident(const data_slab&) NOEXCEPT
388
{
389
    return true;
390
}
391
#else
392
bool resident(const data_slab& region) NOEXCEPT
124 ✔
393
{
394
    const auto page = page_size();
124 ✔
395
    if (region.empty() || is_zero(page))
124 ✔
396
        return true;
397

398
    const auto in_core = [page](const uint8_t* byte) NOEXCEPT
248 ✔
399
    {
400
#if defined(HAVE_LINUX)
401
        unsigned char state{};
248 ✔
402
#else
403
        char state{};
404
#endif
405
        return !is_zero(::mincore(page_start(byte, page), page, &state)) ||
248 ✔
406
            is_nonzero(state & 1);
248 ✔
407
    };
124 ✔
408

409
    return in_core(region.begin()) && in_core(std::prev(region.end()));
124 ✔
410
}
411
#endif
412

413
void prefetch(const std::span<const data_slab>& regions) NOEXCEPT
×
414
{
415
    const auto page = page_size();
×
416
    if (is_zero(page))
×
417
        return;
418

419
    for (const auto& region: regions)
×
420
    {
421
        if (region.empty())
×
422
            continue;
×
423

424
        const auto start = page_start(region.begin(), page);
×
425
        const auto extent = std::distance(start, region.end());
×
426
        const auto bytes = sign_cast<size_t>(extent);
×
427
#if defined(HAVE_LINUX)
428
        // Linux reads at most the device readahead window per advice.
429
        constexpr auto window = power2<size_t>(17u);
×
430
        for (size_t offset{}; offset < bytes; offset += window)
×
431
            ::madvise(std::next(start, offset), std::min(window,
×
432
                bytes - offset), MADV_WILLNEED);
×
433
#else
434
        ::madvise(start, bytes, MADV_WILLNEED);
435
#endif
436
    }
437
}
438

439
#endif // HAVE_WINDOWS
440

441
size_t cores() NOEXCEPT
59 ✔
442
{
443
    return std::max(std::thread::hardware_concurrency(), 1_u32);
59 ✔
444
}
445

446
#if defined(HAVE_WINDOWS)
447

448
// Volume root of the path, empty if not determinable.
449
static std::string volume_root(const std::filesystem::path& path) NOEXCEPT
450
{
451
    BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
452

453
    // The api requires a qualified path, and extension breaks the device path.
454
    std::wstring root(MAX_PATH, {});
455
    if (is_zero(::GetVolumePathNameW(system::qualified_path(path).c_str(),
456
        root.data(), MAX_PATH)))
457
        return {};
458

459
    const auto end = root.find(std::wstring::value_type{});
460
    if (end == std::wstring::npos)
461
        return {};
462

463
    root.resize(end);
464
    return system::to_utf8(root);
465

466
    BC_POP_WARNING()
467
}
468

469
// Volume device handle, requires no access rights (null desired access).
470
static HANDLE volume_handle(const std::string& root) NOEXCEPT
471
{
472
    BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
473
    static const system::string_list trims{ "\\" };
474

475
    // Trailing separator is invalid in a device path.
476
    const auto volume = system::trim_right_copy(root, trims);
477
    if (volume.empty())
478
        return INVALID_HANDLE_VALUE;
479

480
    return ::CreateFileW(system::to_utf16("\\\\.\\" + volume).c_str(), 0,
481
        FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, OPEN_EXISTING, 0, nullptr);
482

483
    BC_POP_WARNING()
484
}
485

486
bool solid_state(const std::filesystem::path& path) NOEXCEPT
487
{
488
    const auto root = volume_root(path);
489
    if (root.empty() || ::GetDriveTypeW(system::to_utf16(root).c_str()) !=
490
        DRIVE_FIXED)
491
        return true;
492

493
    const auto handle = volume_handle(root);
494
    if (handle == INVALID_HANDLE_VALUE)
495
        return true;
496

497
    DWORD size{};
498
    DEVICE_SEEK_PENALTY_DESCRIPTOR penalty{};
499
    STORAGE_PROPERTY_QUERY query
500
    {
501
        StorageDeviceSeekPenaltyProperty, PropertyStandardQuery, {}
502
    };
503

504
    const auto result = ::DeviceIoControl(handle, IOCTL_STORAGE_QUERY_PROPERTY,
505
        &query, sizeof(query), &penalty, sizeof(penalty), &size, nullptr);
506

507
    ::CloseHandle(handle);
508
    return to_bool(result) ? !to_bool(penalty.IncursSeekPenalty) : true;
509
}
510

511
bool internal_storage(const std::filesystem::path& path) NOEXCEPT
512
{
513
    const auto root = volume_root(path);
514
    if (root.empty())
515
        return true;
516

517
    switch (::GetDriveTypeW(system::to_utf16(root).c_str()))
518
    {
519
        case DRIVE_REMOVABLE:
520
        case DRIVE_REMOTE:
521
        case DRIVE_CDROM:
522
            return false;
523
        case DRIVE_FIXED:
524
            break;
525
        default:
526
            return true;
527
    }
528

529
    const auto handle = volume_handle(root);
530
    if (handle == INVALID_HANDLE_VALUE)
531
        return true;
532

533
    DWORD size{};
534
    std_array<uint8_t, 512> buffer{};
535
    STORAGE_PROPERTY_QUERY query
536
    {
537
        StorageDeviceProperty, PropertyStandardQuery, {}
538
    };
539

540
    const auto result = ::DeviceIoControl(handle, IOCTL_STORAGE_QUERY_PROPERTY,
541
        &query, sizeof(query), buffer.data(), possible_narrow_cast<DWORD>(
542
            buffer.size()), &size, nullptr);
543

544
    ::CloseHandle(handle);
545
    if (!to_bool(result))
546
        return true;
547

548
    switch (pointer_cast<STORAGE_DEVICE_DESCRIPTOR>(buffer.data())->BusType)
549
    {
550
        case BusTypeUsb:
551
        case BusType1394:
552
        case BusTypeSd:
553
        case BusTypeMmc:
554
        case BusTypeiScsi:
555
        case BusTypeFibre:
556
            return false;
557
        default:
558
            return true;
559
    }
560
}
561

562
#elif defined(HAVE_LINUX)
563

564
// Block device sysfs directory for the path, empty if not determinable.
565
static std::filesystem::path device(
×
566
    const std::filesystem::path& path) NOEXCEPT
567
{
568
    struct ::stat status{};
×
569
    if (!is_zero(::stat(path.c_str(), &status)))
×
570
        return {};
×
571

572
    const auto node = std::filesystem::path{ "/sys/dev/block" } /
×
573
        (std::to_string(major(status.st_dev)) + ":" +
×
574
            std::to_string(minor(status.st_dev)));
×
575

576
    std::error_code ec{};
×
577
    const auto disk = std::filesystem::canonical(node, ec);
×
578
    if (ec)
×
579
        return {};
×
580

581
    // Partitions carry no queue, the parent disk holds device attributes.
582
    return std::filesystem::is_directory(disk / "queue", ec) ? disk :
×
583
        disk.parent_path();
×
584
}
×
585

586
// Single character sysfs flag, false if not determinable.
587
static bool flagged(const std::filesystem::path& file, bool& out) NOEXCEPT
×
588
{
589
    BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
590
    std::ifstream stream{ file };
×
591
    char value{};
×
592
    if (!stream.good() || !stream.get(value))
×
593
        return false;
×
594
    BC_POP_WARNING()
595

596
    out = (value == '1');
×
597
    return true;
×
598
}
×
599

600
bool solid_state(const std::filesystem::path& path) NOEXCEPT
×
601
{
602
    const auto disk = device(path);
×
603
    if (disk.empty())
×
604
        return true;
605

606
    bool rotational{};
×
607
    return flagged(disk / "queue" / "rotational", rotational) ? !rotational :
×
608
        true;
609
}
×
610

611
bool internal_storage(const std::filesystem::path& path) NOEXCEPT
×
612
{
613
    constexpr auto nfs = 0x6969_u32;
614
    constexpr auto smb = 0x517b_u32;
615
    constexpr auto cifs = 0xff534d42_u32;
616
    constexpr auto smb2 = 0xfe534d42_u32;
617

618
    // Network mounts carry no block device, so are excluded by type.
619
    struct ::statfs stats{};
×
620
    if (is_zero(::statfs(path.c_str(), &stats)))
×
621
    {
622
        // The file system type varies in width and sign by platform.
623
        const auto type = possible_narrow_and_sign_cast<uint32_t>(stats.f_type);
×
624
        if (type == nfs || type == smb || type == cifs || type == smb2)
×
625
            return false;
626
    }
627

628
    const auto disk = system::from_path(device(path));
×
629
    if (disk.empty())
×
630
        return true;
631

632
    // The canonical device path carries the transport topology.
633
    return disk.find("/usb") == std::string::npos
×
634
        && disk.find("/mmc") == std::string::npos
×
635
        && disk.find("/firewire") == std::string::npos;
×
636
}
×
637

638
#else
639

640
bool solid_state(const std::filesystem::path&) NOEXCEPT
641
{
642
    return true;
643
}
644

645
bool internal_storage(const std::filesystem::path&) NOEXCEPT
646
{
647
    return true;
648
}
649

650
#endif // HAVE_WINDOWS
651

652
} // namespace database
653
} // namespace libbitcoin
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc