13 std::shared_ptr<runtime::Core> r_core,
14 std::shared_ptr<runtime::BlockBuilder> r_block_builder,
15 std::shared_ptr<blockchain::BlockHeaderRepository> header_backend)
16 : r_core_(
std::move(r_core)),
17 r_block_builder_(
std::move(r_block_builder)),
18 header_backend_(
std::move(header_backend)),
20 BOOST_ASSERT(
r_core_ !=
nullptr);
28 #ifndef BOOST_ASSERT_IS_VOID 31 BOOST_ASSERT(parent_number == parent.
number);
33 auto number = parent.
number + 1;
37 header.
digest = std::move(inherent_digest);
39 if (
auto res =
r_core_->initialize_block(header); not res) {
40 logger_->error(
"Core_initialize_block failed: {}", res.error().message());
43 return std::make_unique<BlockBuilderImpl>(
outcome::result< std::unique_ptr< BlockBuilder > > make(const kagome::primitives::BlockInfo &parent_block, primitives::Digest inherent_digest) const override
std::shared_ptr< blockchain::BlockHeaderRepository > header_backend_
BlockBuilderFactoryImpl(std::shared_ptr< runtime::Core > r_core, std::shared_ptr< runtime::BlockBuilder > r_block_builder, std::shared_ptr< blockchain::BlockHeaderRepository > header_backend)
std::shared_ptr< runtime::BlockBuilder > r_block_builder_
std::shared_ptr< runtime::Core > r_core_
Logger createLogger(const std::string &tag)