Skip to content

Commit d20dfc0

Browse files
committed
IPLD another CR fixes
1 parent 6daa523 commit d20dfc0

File tree

10 files changed

+4
-116
lines changed

10 files changed

+4
-116
lines changed

core/crypto/hasher/hasher.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ namespace fc::crypto {
2222
Hasher::Multihash Hasher::sha2_256(gsl::span<const uint8_t> buffer) {
2323
auto digest = libp2p::crypto::sha256(buffer);
2424
auto multi_hash = Multihash::create(HashType::sha256, digest);
25+
BOOST_ASSERT_MSG(multi_hash.has_value(),
26+
"fc::crypto::Hasher - failed to create sha2-256 hash");
2527
return multi_hash.value();
2628
}
2729

2830
Hasher::Multihash Hasher::blake2b_256(gsl::span<const uint8_t> buffer) {
2931
auto digest = crypto::blake2b::blake2b_256(buffer);
3032
auto multi_hash = Multihash::create(HashType::blake2b_256, digest);
33+
BOOST_ASSERT_MSG(multi_hash.has_value(),
34+
"fc::crypto::Hasher - failed to create blake2b_256 hash");
3135
return multi_hash.value();
3236
}
3337
} // namespace fc::crypto

core/primitives/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ add_subdirectory(block)
88
add_subdirectory(chain)
99
add_subdirectory(chain_epoch)
1010
add_subdirectory(cid)
11-
add_subdirectory(persistent_block)
1211
add_subdirectory(rle_bitset)
1312
add_subdirectory(ticket)
1413
add_subdirectory(tipset)

core/primitives/persistent_block/CMakeLists.txt

-11
This file was deleted.

core/primitives/persistent_block/persistent_block.cpp

-22
This file was deleted.

core/primitives/persistent_block/persistent_block.hpp

-28
This file was deleted.

core/storage/chain/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ target_link_libraries(chain_store
88
datastore_key
99
ipfs_blockservice
1010
logger
11-
persistent_block
1211
)
1312

1413
add_library(datastore_key

core/storage/chain/chain_store.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
1111
#include "primitives/address/address_codec.hpp"
1212
#include "primitives/cid/cid_of_cbor.hpp"
1313
#include "primitives/cid/json_codec.hpp"
14-
#include "primitives/persistent_block/persistent_block.hpp"
1514
#include "primitives/tipset/tipset_key.hpp"
1615

1716
namespace fc::storage::blockchain {
1817
using primitives::block::BlockHeader;
19-
using primitives::blockchain::block::PersistentBlock;
2018
using primitives::tipset::Tipset;
2119

2220
namespace {

test/core/primitives/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ add_subdirectory(address)
77
add_subdirectory(block)
88
add_subdirectory(chain_epoch)
99
add_subdirectory(cid)
10-
add_subdirectory(persistent_block)
1110
add_subdirectory(rle_bitset)
1211
add_subdirectory(ticket)
1312
add_subdirectory(tipset)

test/core/primitives/persistent_block/CMakeLists.txt

-9
This file was deleted.

test/core/primitives/persistent_block/persistent_block_test.cpp

-41
This file was deleted.

0 commit comments

Comments
 (0)