Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
block_header.cpp
Go to the documentation of this file.
1
#include "
primitives/block_header.hpp
"
2
3
namespace
kagome::primitives
{
4
5
outcome::result<BlockHash>
calculateBlockHash
(
6
BlockHeader
const
&header,
crypto::Hasher
const
&hasher) {
7
OUTCOME_TRY(enc_header, scale::encode(header));
8
return
hasher.
blake2b_256
(enc_header);
9
}
10
11
}
kagome::crypto::Hasher
Definition:
hasher.hpp:13
kagome::primitives
Definition:
author_api.hpp:19
kagome::primitives::calculateBlockHash
outcome::result< BlockHash > calculateBlockHash(BlockHeader const &header, crypto::Hasher const &hasher)
Definition:
block_header.cpp:5
kagome::crypto::Hasher::blake2b_256
virtual Hash256 blake2b_256(gsl::span< const uint8_t > buffer) const =0
blake2b_256 function calculates 32-byte blake2b hash
block_header.hpp
kagome::primitives::BlockHeader
Definition:
block_header.hpp:25
core
primitives
block_header.cpp
Generated by
1.8.11