From 7dccff07d64990edd0ce130633dd1c6aa5f42299 Mon Sep 17 00:00:00 2001 From: Fernando Pelliccioni Date: Fri, 3 Nov 2023 10:24:41 +0100 Subject: [PATCH] build fixes --- src/full_node.cpp | 2 +- src/protocols/protocol_block_out.cpp | 2 +- src/utility/reservation.cpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/full_node.cpp b/src/full_node.cpp index e140cde..6b67f49 100644 --- a/src/full_node.cpp +++ b/src/full_node.cpp @@ -285,7 +285,7 @@ bool full_node::handle_reorganized(code ec, size_t fork_height, block_const_ptr_ , encode_hash(block->header().hash()), "]"); } - auto const height = safe_add(fork_height, incoming->size()); + auto const height = *safe_add(fork_height, incoming->size()); set_top_block({ incoming->back()->hash(), height }); return true; diff --git a/src/protocols/protocol_block_out.cpp b/src/protocols/protocol_block_out.cpp index 66ea55e..ace5190 100644 --- a/src/protocols/protocol_block_out.cpp +++ b/src/protocols/protocol_block_out.cpp @@ -589,7 +589,7 @@ void protocol_block_out::handle_stop(code const&) { // generating fork-relative locators. size_t protocol_block_out::locator_limit() { auto const height = node_.top_block().height(); - return safe_add(domain::chain::block::locator_size(height), size_t(1)); + return *safe_add(domain::chain::block::locator_size(height), size_t(1)); } // Threshold: diff --git a/src/utility/reservation.cpp b/src/utility/reservation.cpp index 3519820..8ce7170 100644 --- a/src/utility/reservation.cpp +++ b/src/utility/reservation.cpp @@ -18,6 +18,7 @@ #include #include #include +#include namespace kth::node {