Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions include/bitcoin/node/channels/channel_peer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ class BCN_API channel_peer
public:
typedef std::shared_ptr<channel_peer> ptr;

inline channel_peer(network::memory& allocator, const network::logger& log,
inline channel_peer(const network::logger& log,
const network::socket::ptr& socket, uint64_t identifier,
const node::configuration& config, const options_t& options) NOEXCEPT
: node::channel(log, socket, identifier, config),
network::channel_peer(allocator, log, socket, identifier,
config.network, options),
network::channel_peer(log, socket, identifier, config.network, options),
announced_(config.node.announcement_cache),
network::tracker<channel_peer>(log)
{
Expand Down
12 changes: 0 additions & 12 deletions include/bitcoin/node/full_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#ifndef LIBBITCOIN_NODE_FULL_NODE_HPP
#define LIBBITCOIN_NODE_FULL_NODE_HPP

#include <bitcoin/node/block_memory.hpp>
#include <bitcoin/node/chasers/chasers.hpp>
#include <bitcoin/node/configuration.hpp>
#include <bitcoin/node/define.hpp>
Expand All @@ -30,19 +29,12 @@ namespace libbitcoin {
namespace node {

/// Thread safe.
/// WARNING: when full node is using block_memory controller, all shared block
/// components invalidate when the block destructs. Lifetime of the block is
/// assured for the extent of all methods below, however if a sub-object is
/// retained by shared_ptr, beyond method completion, a copy of the block
/// shared_ptr must also be be retained. Taking a block or sub-object copy is
/// insufficient, as copies are shallow (copy internal shared_ptr objects).
class BCN_API full_node
: public network::net
{
public:
using store = node::store;
using query = node::query;
using memory_controller = block_memory;
using result_handler = network::result_handler;
typedef std::shared_ptr<full_node> ptr;

Expand Down Expand Up @@ -160,9 +152,6 @@ class BCN_API full_node
virtual void performance(object_key channel, uint64_t speed,
result_handler&& handler) NOEXCEPT;

/// Get the memory resource.
virtual network::memory& get_memory() NOEXCEPT;

protected:
/// Session attachments.
/// -----------------------------------------------------------------------
Expand All @@ -187,7 +176,6 @@ class BCN_API full_node

// These are thread safe.
const configuration& config_;
memory_controller memory_;
query& query_;

// These are protected by strand.
Expand Down
4 changes: 2 additions & 2 deletions include/bitcoin/node/impl/sessions/session_peer.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ inline CLASS::channel_ptr CLASS::create_channel(
BC_ASSERT(this->stranded());

const auto channel = system::emplace_shared<channel_t>(
this->get_memory(), this->log, socket, this->create_key(),
this->node_config(), this->options());
this->log, socket, this->create_key(), this->node_config(),
this->options());

return std::static_pointer_cast<network::channel>(channel);
}
Expand Down
3 changes: 0 additions & 3 deletions include/bitcoin/node/sessions/session.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ class BCN_API session
virtual void performance(object_key channel, uint64_t speed,
network::result_handler&& handler) NOEXCEPT;

/// Get the memory resource.
virtual network::memory& get_memory() const NOEXCEPT;

/// Suspensions.
/// -----------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion include/bitcoin/node/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class BCN_API settings
float minimum_fee_rate;
float minimum_bump_rate;
uint16_t announcement_cache;
uint16_t allocation_multiple;
uint16_t fee_estimate_horizon;
////uint64_t snapshot_bytes;
////uint32_t snapshot_valid;
Expand Down
6 changes: 0 additions & 6 deletions src/full_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ full_node::full_node(query& query, const configuration& configuration,
const logger& log) NOEXCEPT
: net(configuration.network, log),
config_(configuration),
memory_(config_.node.allocation_multiple, config_.network.threads),
query_(query),
chaser_block_(*this),
chaser_header_(*this),
Expand Down Expand Up @@ -444,11 +443,6 @@ void full_node::performance(object_key key, uint64_t speed,
chaser_check_.update(key, speed, std::move(handler));
}

network::memory& full_node::get_memory() NOEXCEPT
{
return memory_;
}

// Session attachments.
// ----------------------------------------------------------------------------

Expand Down
5 changes: 0 additions & 5 deletions src/sessions/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ void session::performance(object_key key, uint64_t speed,
node_.performance(key, speed, std::move(handler));
}

network::memory& session::get_memory() const NOEXCEPT
{
return node_.get_memory();
}

// Suspensions.
// ----------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ settings::settings() NOEXCEPT
minimum_bump_rate{ 0.0 },
allowed_deviation{ 1.5 },
announcement_cache{ 42 },
allocation_multiple{ 20 },
fee_estimate_horizon{ 0 },
////snapshot_bytes{ 200'000'000'000 },
////snapshot_valid{ 250'000 },
Expand Down
1 change: 0 additions & 1 deletion test/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ BOOST_AUTO_TEST_CASE(settings__node__default_context__expected)
BOOST_REQUIRE_EQUAL(node.minimum_bump_rate, 0.0);
BOOST_REQUIRE_EQUAL(node.allowed_deviation, 1.5);
BOOST_REQUIRE_EQUAL(node.announcement_cache, 42_u16);
BOOST_REQUIRE_EQUAL(node.allocation_multiple, 20_u16);
BOOST_REQUIRE_EQUAL(node.fee_estimate_horizon, 0u);
////BOOST_REQUIRE_EQUAL(node.snapshot_bytes, 200'000'000'000_u64);
////BOOST_REQUIRE_EQUAL(node.snapshot_valid, 250'000_u32);
Expand Down
12 changes: 0 additions & 12 deletions test/test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@ std::ostream& operator<<(std::ostream& stream,
return stream;
}

// std_vector<Type> -> join(<<Type)
template <typename Type>
std::ostream& operator<<(std::ostream& stream,
const std_vector<Type>& values) NOEXCEPT
{
// Ok when testing serialize because only used for error message out.
BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
stream << system::serialize(values);
BC_POP_WARNING()
return stream;
}

// array<Type, Size> -> join(<<Type)
template <typename Type, size_t Size>
std::ostream& operator<<(std::ostream& stream,
Expand Down
Loading