CatapultServer  v0.5.0.1 (Elephant)
MoveBlockFiles.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "catapult/types.h"
23 
24 namespace catapult {
25  namespace io {
26  class BlockStorage;
27  class PrunableBlockStorage;
28  }
29 }
30 
31 namespace catapult { namespace io {
32 
34  void MoveBlockFiles(PrunableBlockStorage& sourceStorage, BlockStorage& destinationStorage, Height startHeight);
35 }}
catapult::io::BlockStorage::loadBlockStatementData
virtual std::pair< std::vector< uint8_t >, bool > loadBlockStatementData(Height height) const =0
Returns the optional block statement data at height.
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
BlockStorage.h
catapult::io::BlockStorage::loadBlockElement
virtual std::shared_ptr< const model::BlockElement > loadBlockElement(Height height) const =0
Returns the block element (owning a block) at height.
MoveBlockFiles.h
catapult::io::PrunableBlockStorage
Interface that allows saving, loading and pruning blocks.
Definition: BlockStorage.h:63
catapult::io::ReadBlockStatement
void ReadBlockStatement(InputStream &inputStream, model::BlockStatement &blockStatement)
Reads block statement from inputStream into blockStatement.
Definition: BlockStatementSerializer.cpp:123
catapult::utils::BaseValue
Immutable wrapper for basic types, to provide some type-safety.
Definition: BaseValue.h:100
catapult::io::LightBlockStorage::dropBlocksAfter
virtual void dropBlocksAfter(Height height)=0
Drops all blocks after height.
catapult::io::MoveBlockFiles
void MoveBlockFiles(PrunableBlockStorage &sourceStorage, BlockStorage &destinationStorage, Height startHeight)
Moves block files starting at startHeight from sourceStorage to destinationStorage.
Definition: MoveBlockFiles.cpp:28
catapult::io::LightBlockStorage::chainHeight
virtual Height chainHeight() const =0
Gets the number of blocks.
CATAPULT_THROW_INVALID_ARGUMENT_1
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
catapult::io::BufferInputStreamAdapter
Adapt a typed buffer to be used as an input stream.
Definition: BufferInputStreamAdapter.h:30
BlockStatementSerializer.h
types.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::io::PrunableBlockStorage::purge
virtual void purge()=0
Purges all blocks from storage.
catapult::io::BlockStorage
Interface for saving and loading blocks.
Definition: BlockStorage.h:50
BufferInputStreamAdapter.h
catapult::io::LightBlockStorage::saveBlock
virtual void saveBlock(const model::BlockElement &blockElement)=0
Saves blockElement.