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

libbitcoin / libbitcoin-node / 46911004041

02 Dec 2026 03:08PM UTC coverage: 89.015%. Remained the same
46911004041

push

github

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

Rename the stats chaser and settings to metrics.

15 of 34 new or added lines in 5 files covered. (44.12%)

5486 of 6163 relevant lines covered (89.02%)

4179.23 hits per line

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

92.24
/src/full_node.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/node/full_node.hpp>
20

21
#include <bitcoin/node/chasers/chasers.hpp>
22
#include <bitcoin/node/define.hpp>
23
#include <bitcoin/node/sessions/sessions.hpp>
24

25
namespace libbitcoin {
26
namespace node {
27

28
using namespace system;
29
using namespace database;
30
using namespace network;
31
using namespace std::placeholders;
32

33
BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
34

35
// Closure reasons of node and store codes, otherwise other.
36
static reasons::reason to_reason(const code& ec) NOEXCEPT
19 ✔
37
{
38
    if (node::error::error_category::contains(ec))
19 ✔
39
    {
40
        switch (static_cast<node::error::error_t>(ec.value()))
14 ✔
41
        {
42
            case node::error::slow_channel:
43
                return reasons::slow;
44
            case node::error::stalled_channel:
6 ✔
45
                return reasons::stalled;
6 ✔
46
            case node::error::exhausted_channel:
×
47
                return reasons::exhausted;
×
48
            default:
8 ✔
49
                return reasons::other_node;
8 ✔
50
        }
51
    }
52

53
    if (database::error::error_category::contains(ec))
5 ✔
54
        return reasons::store;
2 ✔
55

56
    return reasons::other;
57
}
58

59
// net::strand() is safe to call from constructor (non-virtual).
60
full_node::full_node(query& query, const configuration& configuration,
545 ✔
61
    const logger& log) NOEXCEPT
545 ✔
62
  : net(configuration.network, log, configuration.node.services_required(),
545 ✔
63
        configuration.node.services_provided()),
64
    config_(configuration),
545 ✔
65
    start_time_(zulu_time()),
1,090 ✔
66
    query_(query),
545 ✔
67
    chaser_header_(*this),
545 ✔
68
    chaser_download_(*this),
545 ✔
69
    chaser_validate_(*this),
545 ✔
70
    chaser_confirm_(*this),
545 ✔
71
    chaser_transaction_(*this),
545 ✔
72
    chaser_template_(*this),
545 ✔
73
    chaser_snapshot_(*this),
545 ✔
74
    chaser_storage_(*this),
545 ✔
75
    chaser_metrics_(*this)
1,090 ✔
76
{
77
    log.set_reasons(&to_reason);
545 ✔
78
}
545 ✔
79

80
full_node::~full_node() NOEXCEPT
545 ✔
81
{
82
}
545 ✔
83

84
// Sequences.
85
// ----------------------------------------------------------------------------
86

87
void full_node::start(result_handler&& handler) NOEXCEPT
539 ✔
88
{
89
    if (!query_.is_initialized())
539 ✔
90
    {
91
        handler(error::store_uninitialized);
1 ✔
92
        return;
1 ✔
93
    }
94

95
    if (config_.node.provide_filters && !query_.filter_enabled())
538 ✔
96
    {
97
        handler(error::filter_unindexed);
1 ✔
98
        return;
1 ✔
99
    }
100

101
    // Base (net) invokes do_start().
102
    net::start(std::move(handler));
537 ✔
103
}
104

105
void full_node::do_start(const result_handler& handler) NOEXCEPT
466 ✔
106
{
107
    BC_ASSERT(stranded());
466 ✔
108
    code ec{};
466 ✔
109

110
    if (((ec = chaser_header_.start())) ||
466 ✔
111
        ((ec = chaser_download_.start())) ||
465 ✔
112
        ((ec = chaser_validate_.start())) ||
465 ✔
113
        ((ec = chaser_confirm_.start())) ||
465 ✔
114
        ((ec = chaser_transaction_.start())) ||
465 ✔
115
        ((ec = chaser_template_.start())) ||
465 ✔
116
        ((ec = chaser_snapshot_.start())) ||
465 ✔
117
        ((ec = chaser_storage_.start())) ||
931 ✔
118
        ((ec = chaser_metrics_.start())))
465 ✔
119
    {
120
        handler(ec);
1 ✔
121
        return;
1 ✔
122
    }
123

124
    net::do_start(handler);
465 ✔
125
}
126

127
void full_node::run(result_handler&& handler) NOEXCEPT
528 ✔
128
{
129
    // Base (net) invokes do_run().
130
    net::run(std::move(handler));
528 ✔
131
}
528 ✔
132

133
void full_node::do_run(const result_handler& handler) NOEXCEPT
456 ✔
134
{
135
    BC_ASSERT(stranded());
456 ✔
136

137
    if (closed())
456 ✔
138
    {
139
        handler(network::error::service_stopped);
1 ✔
140
        return;
1 ✔
141
    }
142

143
    // Bump sequential chasers to their starting heights.
144
    // Kicks off lagging validations even if not current.
145
    do_notify(error::success, chases::start{});
455 ✔
146

147
    // Start services after network is running.
148
    net::do_run(handler);
455 ✔
149
}
150

151
void full_node::close() NOEXCEPT
545 ✔
152
{
153
    // Base (net) invokes do_close().
154
    net::close();
545 ✔
155

156
    // Block on chaser stop (including dedicated threadpool joins).
157
    chaser_header_.stop();
545 ✔
158
    chaser_download_.stop();
545 ✔
159
    chaser_validate_.stop();
545 ✔
160
    chaser_confirm_.stop();
545 ✔
161
    chaser_transaction_.stop();
545 ✔
162
    chaser_template_.stop();
545 ✔
163
    chaser_snapshot_.stop();
545 ✔
164
    chaser_storage_.stop();
545 ✔
165
    chaser_metrics_.stop();
545 ✔
166
}
545 ✔
167

168
// Base (net) invokes do_close().
169
void full_node::do_close() NOEXCEPT
545 ✔
170
{
171
    BC_ASSERT(stranded());
545 ✔
172

173
    // Initiate chaser stopping (including dedicated threadpools).
174
    chaser_header_.stopping(network::error::service_stopped);
545 ✔
175
    chaser_download_.stopping(network::error::service_stopped);
545 ✔
176
    chaser_validate_.stopping(network::error::service_stopped);
545 ✔
177
    chaser_confirm_.stopping(network::error::service_stopped);
545 ✔
178
    chaser_transaction_.stopping(network::error::service_stopped);
545 ✔
179
    chaser_template_.stopping(network::error::service_stopped);
545 ✔
180
    chaser_snapshot_.stopping(network::error::service_stopped);
545 ✔
181
    chaser_storage_.stopping(network::error::service_stopped);
545 ✔
182
    chaser_metrics_.stopping(network::error::service_stopped);
545 ✔
183

184
    event_subscriber_.stop(network::error::service_stopped, chases::stop{});
545 ✔
185
    net::do_close();
545 ✔
186
}
545 ✔
187

188
// Organizers.
189
// ----------------------------------------------------------------------------
190

191
void full_node::organize(const system::chain::header::cptr& header,
3 ✔
192
    organize_handler&& handler) NOEXCEPT
193
{
194
    chaser_header_.organize(header, std::move(handler));
3 ✔
195
}
3 ✔
196

197
void full_node::organize(const system::chain::header::cptr& header,
6,012 ✔
198
    bool milestone, organize_handler&& handler) NOEXCEPT
199
{
200
    chaser_header_.organize(header, milestone, std::move(handler));
6,012 ✔
201
}
6,012 ✔
202

203
void full_node::organize_compact(const system::chain::header::cptr& header,
10 ✔
204
    organize_handler&& handler) NOEXCEPT
205
{
206
    chaser_header_.organize_compact(header, std::move(handler));
10 ✔
207
}
10 ✔
208

209
void full_node::organize_submitted(const system::chain::header::cptr& header,
1 ✔
210
    bool milestone, organize_handler&& handler) NOEXCEPT
211
{
212
    chaser_header_.organize_submitted(header, milestone, std::move(handler));
1 ✔
213
}
1 ✔
214

215
void full_node::prioritize(const system::hash_digest& hash,
4 ✔
216
    organize_handler&& handler) NOEXCEPT
217
{
218
    chaser_header_.prioritize(hash, std::move(handler));
4 ✔
219
}
4 ✔
220

221
void full_node::get_minimum_work(work_handler&& handler) NOEXCEPT
80 ✔
222
{
223
    chaser_header_.get_minimum_work(std::move(handler));
80 ✔
224
}
80 ✔
225

226
void full_node::submit(const system::chain::transactions_cptr& txs, bool test,
134 ✔
227
    submit_handler&& handler) NOEXCEPT
228
{
229
    chaser_transaction_.submit(txs, test, std::move(handler));
134 ✔
230
}
134 ✔
231

232
void full_node::submit_announced(
32 ✔
233
    const system::chain::transactions_cptr& txs, size_t slot,
234
    submit_handler&& handler) NOEXCEPT
235
{
236
    chaser_transaction_.submit_announced(txs, slot, std::move(handler));
32 ✔
237
}
32 ✔
238

239
void full_node::submit_compact(const system::chain::transactions_cptr& txs,
14 ✔
240
    const database::tx_links& links, const database::header_link& link,
241
    submit_handler&& handler) NOEXCEPT
242
{
243
    chaser_transaction_.submit_compact(txs, links, link, std::move(handler));
14 ✔
244
}
14 ✔
245

246
bool full_node::archive_block(code& ec,
12 ✔
247
    const system::chain::view::block::cptr& block,
248
    const database::header_link& link, bool strong, bool bypass, size_t height,
249
    bool prune, result_handler&& handler) NOEXCEPT
250
{
251
    return chaser_transaction_.archive_block(ec, block, link, strong, bypass,
12 ✔
252
        height, prune, std::move(handler));
12 ✔
253
}
254

255
void full_node::build_template(template_handler&& handler) NOEXCEPT
70 ✔
256
{
257
    chaser_transaction_.build_template(std::move(handler));
70 ✔
258
}
70 ✔
259

260
void full_node::subscribe_pool(pool_notifier&& handler) NOEXCEPT
9 ✔
261
{
262
    chaser_transaction_.subscribe_pool(std::move(handler));
9 ✔
263
}
9 ✔
264

265
uint64_t full_node::pool_generation() const NOEXCEPT
25 ✔
266
{
267
    return chaser_transaction_.pool_generation();
25 ✔
268
}
269

270
void full_node::get_template(block_template_handler&& handler) NOEXCEPT
18 ✔
271
{
272
    chaser_template_.get_template(std::move(handler));
18 ✔
273
}
18 ✔
274

275
void full_node::demand_template(bool demand) NOEXCEPT
1 ✔
276
{
277
    chaser_template_.demand_template(demand);
1 ✔
278
}
1 ✔
279

280
uint64_t full_node::template_generation() const NOEXCEPT
3 ✔
281
{
282
    return chaser_template_.template_generation();
3 ✔
283
}
284

285
void full_node::get_hashes(map_handler&& handler) NOEXCEPT
76 ✔
286
{
287
    chaser_download_.get_hashes(std::move(handler));
76 ✔
288
}
76 ✔
289

290
void full_node::put_hashes(const map_ptr& map,
33 ✔
291
    result_handler&& handler) NOEXCEPT
292
{
293
    chaser_download_.put_hashes(map, std::move(handler));
33 ✔
294
}
33 ✔
295

296
void full_node::get_unfilled(header_t link, map_handler&& handler) NOEXCEPT
9 ✔
297
{
298
    chaser_download_.get_unfilled(link, std::move(handler));
9 ✔
299
}
9 ✔
300

301
bool full_node::reserve_compact() NOEXCEPT
8 ✔
302
{
303
    auto count = compact_peers_.load();
304
    while (count < maximum_compact_peers)
8 ✔
305
        if (compact_peers_.compare_exchange_weak(count, add1(count)))
14 ✔
306
            return true;
307

308
    return false;
309
}
310

311
void full_node::release_compact() NOEXCEPT
4 ✔
312
{
313
    --compact_peers_;
4 ✔
314
}
4 ✔
315

316
size_t full_node::reserve_relay(relay_tier tier) NOEXCEPT
512 ✔
317
{
318
    return chaser_transaction_.reserve_relay(tier);
512 ✔
319
}
320

321
void full_node::activate_relay(size_t slot, object_key key) NOEXCEPT
105 ✔
322
{
323
    chaser_transaction_.activate_relay(slot, key);
105 ✔
324
}
105 ✔
325

326
void full_node::release_relay(size_t slot) NOEXCEPT
92 ✔
327
{
328
    chaser_transaction_.release_relay(slot);
92 ✔
329
}
92 ✔
330

331
void full_node::set_relay_rate(size_t slot, uint64_t rate) NOEXCEPT
26 ✔
332
{
333
    chaser_transaction_.set_relay_rate(slot, rate);
26 ✔
334
}
26 ✔
335

336
void full_node::set_relayed(size_t slot,
3 ✔
337
    const database::tx_links& links) NOEXCEPT
338
{
339
    chaser_transaction_.set_relayed(slot, links);
3 ✔
340
}
3 ✔
341

342
void full_node::relay_pool(size_t slot) NOEXCEPT
8 ✔
343
{
344
    chaser_transaction_.relay_pool(slot);
8 ✔
345
}
8 ✔
346

347
// Events.
348
// ----------------------------------------------------------------------------
349

350
void full_node::notify(const code& ec, event_value value) NOEXCEPT
8,600 ✔
351
{
352
    network::io::post(strand(),
8,600 ✔
353
        std::bind(&full_node::do_notify,
17,200 ✔
354
            this, ec, value));
8,600 ✔
355
}
8,600 ✔
356

357
// private
358
void full_node::do_notify(const code& ec, event_value value) NOEXCEPT
9,055 ✔
359
{
360
    BC_ASSERT(stranded());
9,055 ✔
361
    event_subscriber_.notify(ec, value);
9,055 ✔
362
}
9,055 ✔
363

364
void full_node::notify_one(object_key key, const code& ec,
721 ✔
365
    event_value value) NOEXCEPT
366
{
367
    network::io::post(strand(),
721 ✔
368
        std::bind(&full_node::do_notify_one,
1,442 ✔
369
            this, key, ec, value));
721 ✔
370
}
721 ✔
371

372
// private
373
void full_node::do_notify_one(object_key key, const code& ec,
721 ✔
374
    event_value value) NOEXCEPT
375
{
376
    BC_ASSERT(stranded());
721 ✔
377
    event_subscriber_.notify_one(key, ec, value);
721 ✔
378
}
721 ✔
379

380
object_key full_node::subscribe_chase(event_notifier&& handler) NOEXCEPT
3,816 ✔
381
{
382
    BC_ASSERT(stranded());
3,816 ✔
383
    const auto key = create_key();
3,816 ✔
384
    event_subscriber_.subscribe(std::move(handler), key);
3,816 ✔
385
    return key;
3,816 ✔
386
}
387

388
void full_node::subscribe_chase(event_notifier&& handler,
671 ✔
389
    event_completer&& complete) NOEXCEPT
390
{
391
    network::io::post(strand(),
671 ✔
392
        std::bind(&full_node::do_subscribe_chase,
671 ✔
393
            this, std::move(handler), std::move(complete)));
671 ✔
394
}
671 ✔
395

396
// private
397
void full_node::do_subscribe_chase(const event_notifier& handler,
671 ✔
398
    const event_completer& complete) NOEXCEPT
399
{
400
    BC_ASSERT(stranded());
671 ✔
401
    const auto key = create_key();
671 ✔
402
    complete(event_subscriber_.subscribe(move_copy(handler), key), key);
671 ✔
403
}
671 ✔
404

405
void full_node::unsubscribe_chase(object_key key) NOEXCEPT
703 ✔
406
{
407
    notify_one(key, network::error::service_stopped, chases::stop{});
703 ✔
408
}
703 ✔
409

410
// Suspensions.
411
// ----------------------------------------------------------------------------
412

413
bool full_node::resume() NOEXCEPT
10 ✔
414
{
415
    if (query_.is_full())
10 ✔
416
    {
417
        LOGF("Cannot resume network, disk full.");
×
418
        return false;
×
419
    }
420

421
    if (query_.is_fault())
10 ✔
422
    {
423
        LOGF("Cannot resume network, " << query_.get_fault());
×
424
        return false;
×
425
    }
426

427
    if (query_.is_fault_locked())
10 ✔
428
    {
429
        LOGF("Cannot resume network, fault locked.");
1 ✔
430
        return false;
1 ✔
431
    }
432

433
    LOGN("Resuming network.");
9 ✔
434
    const auto resumed = net::resume();
9 ✔
435
    notify(error::success, chases::resume{});
9 ✔
436
    return resumed;
9 ✔
437
}
438

439
// This is just a best effort, the call may have to be repeated.
440
void full_node::suspend(const code& ec) NOEXCEPT
28 ✔
441
{
442
    LOGN("Suspending network, " << ec.message());
28 ✔
443
    net::suspend(ec);
28 ✔
444
    notify(error::suspended_channel, chases::suspend{});
28 ✔
445
}
28 ✔
446

447
void full_node::fault(const code& ec) NOEXCEPT
17 ✔
448
{
449
    if (query_.is_full())
17 ✔
450
    {
451
        LOGF("Disk full [" << query_.get_space()
×
452
            << "] bytes required following, " << ec.message());
453
        notify(ec, chases::space{});
×
454
    }
455
    else if (query_.is_fault())
17 ✔
456
    {
457
        LOGF("Store fault (unrecoverable) '" << query_.get_fault().message()
×
458
            << "' following, " << ec.message());
459
        /* bool */ query_.set_fault_lock();
×
460
    }
461
    else if (ec)
17 ✔
462
    {
463
        // The cause did not originate from the memory map (!is_fault).
464
        LOGF("Node fault, " << ec.message());
16 ✔
465
        /* bool */ query_.set_fault_lock();
16 ✔
466
    }
467

468
    // If a call does not get all of the channels, subsequent failures do so.
469
    suspend(ec);
17 ✔
470
}
17 ✔
471

472
// Leaves network suspended, caller may want to resume upon success.
473
code full_node::trim(const store::event_handler& handler) NOEXCEPT
4 ✔
474
{
475
    if (query_.is_fault())
4 ✔
476
        return query_.get_code();
×
477

478
    const auto start = logger::now();
4 ✔
479
    suspend(error::store_trim);
4 ✔
480
    const auto ec = query_.trim([&](auto event, auto table) NOEXCEPT
4 ✔
481
    {
482
        // Suspend channels that missed previous suspend events.
483
        if (event == database::event_t::wait_lock)
504 ✔
484
            suspend(error::store_trim);
×
485

486
        handler(event, table);
504 ✔
487
    });
504 ✔
488

489
    net::span<milliseconds>(events::trim_msecs, start);
4 ✔
490
    return ec;
4 ✔
491
}
492

493
// Leaves network suspended, caller may want to resume upon success.
494
code full_node::snapshot(const store::event_handler& handler) NOEXCEPT
3 ✔
495
{
496
    if (query_.is_fault())
3 ✔
497
        return query_.get_code();
×
498

499
    const auto start = logger::now();
3 ✔
500
    suspend(error::store_snapshot);
3 ✔
501
    const auto ec = query_.snapshot([&](auto event, auto table) NOEXCEPT
3 ✔
502
    {
503
        // Suspend channels that missed previous suspend events.
504
        if (event == database::event_t::wait_lock)
297 ✔
505
            suspend(error::store_snapshot);
×
506

507
        handler(event, table);
297 ✔
508
    });
297 ✔
509

510
    net::span<seconds>(events::snapshot_secs, start);
3 ✔
511
    return ec;
3 ✔
512
}
513

514
// Leaves network suspended, caller may want to resume upon success.
515
code full_node::reload(const store::event_handler& handler) NOEXCEPT
2 ✔
516
{
517
    if (!query_.is_full())
2 ✔
518
        return query_.is_fault() ? query_.get_code() : error::success;
2 ✔
519

520
    const auto start = logger::now();
×
521
    suspend(error::store_reload);
×
522

523
    // Sets store's dirty flag, causing increased read activity for
524
    // set(tx/block) due to activation of duplicate detection. Store is however
525
    // always in a dirty state after startup with non-empty tables.
526
    const auto ec = query_.reload([&](auto event, auto table) NOEXCEPT
×
527
    {
528
        // Suspend channels that missed previous suspend events.
529
        if (event == database::event_t::wait_lock)
×
530
            suspend(error::store_reload);
×
531

532
        handler(event, table);
×
533
    });
×
534

535
    net::span<milliseconds>(events::reload_msecs, start);
×
536
    return ec;
×
537
}
538

539
// Properties.
540
// ----------------------------------------------------------------------------
541

542
query& full_node::archive() const NOEXCEPT
114,295 ✔
543
{
544
    return query_;
114,295 ✔
545
}
546

547
const node::configuration& full_node::node_config() const NOEXCEPT
1,838 ✔
548
{
549
    return config_;
1,838 ✔
550
}
551

552
const system::settings& full_node::system_settings() const NOEXCEPT
9,645 ✔
553
{
554
    return config_.bitcoin;
9,645 ✔
555
}
556

557
const database::settings& full_node::database_settings() const NOEXCEPT
578 ✔
558
{
559
    return config_.database;
578 ✔
560
}
561

562
////const network::settings& full_node::network_settings() const NOEXCEPT
563
////{
564
////    return network_.network_settings();
565
////}
566

567
const node::settings& full_node::node_settings() const NOEXCEPT
22,379 ✔
568
{
569
    return config_.node;
22,379 ✔
570
}
571

NEW
572
const chaser_metrics& full_node::metrics() const NOEXCEPT
×
573
{
NEW
574
    return chaser_metrics_;
×
575
}
576

577
bool full_node::is_current_chain(bool confirmed) const NOEXCEPT
9,980 ✔
578
{
579
    if (is_zero(config_.node.currency_window_minutes))
9,980 ✔
580
        return true;
581

582
    return is_current_time(query_.get_top_timestamp(confirmed));
2,092 ✔
583
}
584

585
bool full_node::is_current_time(uint32_t timestamp) const NOEXCEPT
8,930 ✔
586
{
587
    if (is_zero(config_.node.currency_window_minutes))
8,930 ✔
588
        return true;
589

590
    const wall_clock::time_point time{ seconds{ timestamp } };
2,907 ✔
591
    const auto current = wall_clock::now() - config_.node.currency_window();
2,907 ✔
592
    return time >= current;
2,907 ✔
593
}
594

595
// get_timestamp error results in false (ok).
596
bool full_node::is_current_header(const header_link& link) const NOEXCEPT
729 ✔
597
{
598
    if (is_zero(config_.node.currency_window_minutes))
729 ✔
599
        return true;
600

601
    uint32_t timestamp{};
725 ✔
602
    if (!query_.get_timestamp(timestamp, link))
725 ✔
603
        return false;
604

605
    return is_current_time(timestamp);
724 ✔
606
}
607

608
bool full_node::is_recent() const NOEXCEPT
532 ✔
609
{
610
    if (is_nonzero(config_.node.maximum_height) &&
532 ✔
611
        (query_.get_top_confirmed() >= config_.node.maximum_height))
3 ✔
612
        return true;
613

614
    return is_current_chain(true);
531 ✔
615
}
616

617
time_t full_node::start_time() const NOEXCEPT
7 ✔
618
{
619
    return start_time_;
7 ✔
620
}
621

622
// Methods.
623
// ----------------------------------------------------------------------------
624

625
void full_node::estimate(size_t target, estimate_mode mode,
27 ✔
626
    estimate_handler&& handler) NOEXCEPT
627
{
628
    chaser_transaction_.estimate(target, mode, std::move(handler));
27 ✔
629
}
27 ✔
630

631
void full_node::get_confirmable_txs(confirmable_txs_handler&& handler) NOEXCEPT
15 ✔
632
{
633
    chaser_transaction_.get_confirmable_txs(std::move(handler));
15 ✔
634
}
15 ✔
635

636
void full_node::get_confirmable_fees(
7 ✔
637
    confirmable_fees_handler&& handler) NOEXCEPT
638
{
639
    chaser_transaction_.get_confirmable_fees(std::move(handler));
7 ✔
640
}
7 ✔
641

642
void full_node::get_unconfirmed_totals(const database::pool_receipts& receipts,
4 ✔
643
    unconfirmed_totals_handler&& handler) NOEXCEPT
644
{
645
    chaser_transaction_.get_unconfirmed_totals(receipts, std::move(handler));
4 ✔
646
}
4 ✔
647

648
void full_node::performance(object_key key, uint64_t speed,
24 ✔
649
    result_handler&& handler) NOEXCEPT
650
{
651
    chaser_download_.update(key, speed, std::move(handler));
24 ✔
652
}
24 ✔
653

654
// Session attachments.
655
// ----------------------------------------------------------------------------
656

657
network::session_manual::ptr full_node::attach_manual_session() NOEXCEPT
536 ✔
658
{
659
    return net::attach<node::session_manual>(*this);
536 ✔
660
}
661

662
network::session_inbound::ptr full_node::attach_inbound_session() NOEXCEPT
526 ✔
663
{
664
    return net::attach<node::session_inbound>(*this);
526 ✔
665
}
666

667
network::session_outbound::ptr full_node::attach_outbound_session() NOEXCEPT
526 ✔
668
{
669
    return net::attach<node::session_outbound>(*this);
526 ✔
670
}
671

672
BC_POP_WARNING()
673

674
} // namespace node
675
} // 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