Skip to content

Commit

Permalink
Feat: Adding new registrations on validating node.
Browse files Browse the repository at this point in the history
  • Loading branch information
henriqueaklein committed Feb 25, 2024
1 parent 6740bd9 commit 149a11d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ add_executable (sgns_demo
clock
rocksdb
hasher
vrf_provider
block_storage
production_lottery
changes_tracker
trie_serializer
supergenius_trie_factory
p2p::p2p_basic_host
p2p::p2p_default_network
p2p::p2p_peer_repository
Expand Down
18 changes: 18 additions & 0 deletions src/application/impl/validating_node_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@
#include "integration/BufferStorageFactory.hpp"
#include "integration/HasherFactory.hpp"
#include "integration/BlockHeaderRepositoryFactory.hpp"
#include "integration/VRFProviderFactory.hpp"
#include "integration/ProductionLotteryFactory.hpp"
#include "integration/StorageChangesTrackerFactory.hpp"
#include "integration/TrieStorageBackendFactory.hpp"
#include "integration/TrieSerializerFactory.hpp"
#include "integration/BlockStorageFactory.hpp"
#include "integration/TrieStorageFactory.hpp"

#include "storage/trie/supergenius_trie/supergenius_trie_factory_impl.hpp"
#include "storage/trie/serialization/supergenius_codec.hpp"

#include "verification/production/impl/production_impl.hpp"
#include "verification/finality/impl/finality_impl.hpp"
Expand Down Expand Up @@ -36,7 +45,16 @@ namespace sgns::application

component_factory->Register( BufferStorageFactory::create( "rocksdb", app_config->rocksdb_path() ), "BufferStorage", boost::make_optional(std::string("rocksdb")) );
component_factory->Register( HasherFactory::create(), "Hasher", boost::none );
component_factory->Register( VRFProviderFactory::create(), "VRFProvider", boost::none );
component_factory->Register( ProductionLotteryFactory::create(), "ProductionLottery", boost::none );
component_factory->Register( BlockHeaderRepositoryFactory::create( "rocksdb" ), "BlockHeaderRepository", boost::none );
component_factory->Register( std::make_shared<sgns::storage::trie::SuperGeniusTrieFactoryImpl>(), "SuperGeniusTrieFactory", boost::none );
component_factory->Register( std::make_shared<sgns::storage::trie::SuperGeniusCodec>(), "Codec", boost::none );
component_factory->Register( StorageChangesTrackerFactory::create(), "ChangesTracker", boost::none );
component_factory->Register( TrieStorageBackendFactory::create(), "TrieStorageBackend", boost::none );
component_factory->Register( TrieSerializerFactory::create(), "TrieSerializer", boost::none );
component_factory->Register( TrieStorageFactory::create(), "TrieStorage", boost::none );
component_factory->Register( BlockStorageFactory::create(), "BlockStorage", boost::none );

auto result = component_factory->GetComponent( "AppStateManager", boost::none );
if ( result )
Expand Down

0 comments on commit 149a11d

Please sign in to comment.