CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
27 namespace catapult {
namespace io {
class BlockStorageCache; } }
29 namespace catapult {
namespace handlers {
34 ionet::ServerPacketHandlers& handlers,
35 const model::TransactionRegistry& registry,
44 ionet::ServerPacketHandlers& handlers,
45 const io::BlockStorageCache& storage,
49 void RegisterBlockHashesHandler(ionet::ServerPacketHandlers& handlers,
const io::BlockStorageCache& storage, uint32_t maxHashes);
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
void RegisterPushBlockHandler(ionet::ServerPacketHandlers &handlers, const model::TransactionRegistry ®istry, const BlockRangeHandler &blockRangeHandler)
Definition: ChainHandlers.cpp:33
void RegisterBlockHashesHandler(ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage, uint32_t maxHashes)
Registers a block hashes handler in handlers that responds with at most maxHashes hashes in storage.
Definition: ChainHandlers.cpp:108
void registerHandler(PacketType type, const PacketHandler &handler)
Registers a handler for the specified packet type.
Definition: PacketHandlers.cpp:100
BlockStorageView view() const
Gets a read only view of the storage.
Definition: BlockStorageCache.cpp:176
supplier< ChainScore > ChainScoreSupplier
Prototype for a function that returns a chain score.
Definition: ChainScore.h:120
void RegisterPullBlocksHandler(ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage, const PullBlocksHandlerConfiguration &config)
Definition: ChainHandlers.cpp:153
static constexpr auto Packet_Type
Definition: RemoteNodeApi.cpp:33
Definition: BlockStorageCache.h:97
def info(*args)
Definition: forwardsValidation.py:12
Height chainHeight() const
Gets the number of blocks.
Definition: BlockStorageCache.cpp:81
A chain info response.
Definition: ChainPackets.h:30
RangeHandler< model::Block > BlockRangeHandler
Prototype for a function that processes a range of blocks.
Definition: HandlerTypes.h:32
static HeightRequestInfo< TRequest > Process(const io::BlockStorageView &storage, const ionet::Packet &packet, ionet::ServerPacketHandlerContext &context, bool shouldAllowZeroHeight)
Definition: HeightRequestProcessor.h:66
uint32_t MaxBlocks
Maximum blocks to return.
Definition: ChainHandlers.h:54
static PacketPayload FromFixedSizeRange(PacketType type, model::EntityRange< TStructure > &&range)
Creates a packet payload with the specified packet type around a fixed size structure range.
Definition: PacketPayloadFactory.h:45
void RegisterChainInfoHandler(ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage, const model::ChainScoreSupplier &chainScoreSupplier)
Definition: ChainHandlers.cpp:79
uint32_t MaxResponseBytes
Maximum response bytes.
Definition: ChainHandlers.h:57
A packet payload that can be written.
Definition: PacketPayload.h:29
Definition: AddressExtractionExtension.cpp:28
A registry of transaction plugins.
Definition: TransactionPlugin.h:98
static PacketPayload FromEntities(PacketType type, const std::vector< std::shared_ptr< TEntity >> &entities)
Creates a packet payload with the specified packet type around multiple entities.
Definition: PacketPayloadFactory.h:37
void RegisterPullBlockHandler(ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage)
Registers a pull block handler in handlers that responds with a block in storage.
Definition: ChainHandlers.cpp:57
static PacketPayload FromEntity(PacketType type, const std::shared_ptr< TEntity > &pEntity)
Creates a packet payload with the specified packet type around a single entity (pEntity).
Definition: PacketPayloadFactory.h:31
constexpr bool IsPacketValid(const Packet &packet, PacketType type)
Checks if packet is valid with type.
Definition: Packet.h:75
Configuration for pull blocks handler.
Definition: ChainHandlers.h:52
A collection of packet handlers where there is at most one handler per packet type.
Definition: PacketHandlers.h:62
HeightPacket< ionet::PacketType::Pull_Block > PullBlockRequest
A pull block request.
Definition: ChainPackets.h:53