Kagome
Polkadot Runtime Engine in C++17
store_impl.cpp
Go to the documentation of this file.
1 
7 
8 namespace kagome::parachain {
9  void BitfieldStoreImpl::putBitfield(const BlockHash &relay_parent,
10  const SignedBitfield &bitfield) {
11  bitfields_[relay_parent].push_back(bitfield);
12  }
13 
14  std::vector<BitfieldStore::SignedBitfield> BitfieldStoreImpl::getBitfields(
15  const BlockHash &relay_parent) const {
16  std::vector<SignedBitfield> bitfields;
17  auto it = bitfields_.find(relay_parent);
18  if (it != bitfields_.end()) {
19  bitfields = it->second;
20  }
21  return bitfields;
22  }
23 } // namespace kagome::parachain
Signed< scale::BitVec > SignedBitfield
Signed availability bitfield.
primitives::BlockHash BlockHash
Definition: store.hpp:15
std::unordered_map< BlockHash, std::vector< SignedBitfield > > bitfields_
Definition: store_impl.hpp:24
primitives::BlockHash BlockHash
Definition: common.hpp:23
void putBitfield(const BlockHash &relay_parent, const SignedBitfield &bitfield) override
Definition: store_impl.cpp:9
std::vector< SignedBitfield > getBitfields(const BlockHash &relay_parent) const override
Definition: store_impl.cpp:14