Skip to content

Commit e1235a2

Browse files
author
Yura Zarudniy
authored
refactor address (#51)
* refactor address Signed-off-by: Yura Zarudniy <[email protected]> * fix review issues Signed-off-by: Yura Zarudniy <[email protected]> * fix include order Signed-off-by: Yura Zarudniy <[email protected]>
1 parent bfe81fe commit e1235a2

34 files changed

+202
-190
lines changed

core/crypto/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55

66
add_subdirectory(blake2)
7-
add_subdirectory(bls_provider)
7+
add_subdirectory(bls)
88
add_subdirectory(murmur)
99
add_subdirectory(randomness)
1010
add_subdirectory(sha)

core/crypto/bls_provider/impl/CMakeLists.txt renamed to core/crypto/bls/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55

66
add_library(bls_provider
7-
bls_provider_impl.cpp
7+
impl/bls_provider_impl.cpp
88
)
99

1010
target_link_libraries(bls_provider

core/crypto/bls_provider/bls_provider.hpp renamed to core/crypto/bls/bls_provider.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <gsl/span>
1010

11-
#include "crypto/bls_provider/bls_types.hpp"
11+
#include "crypto/bls/bls_types.hpp"
1212

1313
namespace fc::crypto::bls {
1414
/**

core/crypto/bls_provider/bls_types.hpp renamed to core/crypto/bls/bls_types.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <array>
1010

1111
extern "C" {
12-
#include "crypto/bls_provider/libbls_signatures.h"
12+
#include "crypto/bls/libbls_signatures.h"
1313
}
1414

1515
#include "common/outcome.hpp"

core/crypto/bls_provider/impl/bls_provider_impl.cpp renamed to core/crypto/bls/impl/bls_provider_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#include "crypto/bls_provider/impl/bls_provider_impl.hpp"
6+
#include "crypto/bls/impl/bls_provider_impl.hpp"
77

88
#include <gsl/gsl_util>
99

core/crypto/bls_provider/impl/bls_provider_impl.hpp renamed to core/crypto/bls/impl/bls_provider_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef CRYPTO_BLS_PROVIDER_IMPL_HPP
77
#define CRYPTO_BLS_PROVIDER_IMPL_HPP
88

9-
#include "crypto/bls_provider/bls_provider.hpp"
9+
#include "crypto/bls/bls_provider.hpp"
1010

1111
namespace fc::crypto::bls::impl {
1212
class BlsProviderImpl : public BlsProvider {

core/crypto/bls_provider/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#ifndef CPP_FILECOIN_TEST_CORE_CRYPTO_SECP256K1_PROVIDER_SECP256K1_PROVIDER_HPP
7+
#define CPP_FILECOIN_TEST_CORE_CRYPTO_SECP256K1_PROVIDER_SECP256K1_PROVIDER_HPP
8+
9+
#include <libp2p/crypto/error.hpp>
10+
#include <libp2p/crypto/secp256k1_provider/secp256k1_provider_impl.hpp>
11+
12+
namespace fc::crypto::secp256k1 {
13+
using libp2p::crypto::secp256k1::KeyPair;
14+
using libp2p::crypto::secp256k1::kPrivateKeyLength;
15+
using libp2p::crypto::secp256k1::kPublicKeyLength;
16+
using libp2p::crypto::secp256k1::PrivateKey;
17+
using libp2p::crypto::secp256k1::PublicKey;
18+
using libp2p::crypto::secp256k1::Secp256k1Provider;
19+
using libp2p::crypto::secp256k1::Secp256k1ProviderImpl;
20+
using libp2p::crypto::secp256k1::Signature;
21+
} // namespace fc::crypto::secp256k1
22+
23+
#endif // CPP_FILECOIN_TEST_CORE_CRYPTO_SECP256K1_PROVIDER_SECP256K1_PROVIDER_HPP

core/primitives/CMakeLists.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,4 @@
33
# SPDX-License-Identifier: Apache-2.0
44
#
55

6-
add_library(address
7-
address.cpp
8-
address_codec.cpp
9-
address/impl/address_verifier_impl.cpp
10-
address/impl/address_builder_impl.cpp
11-
)
12-
13-
target_link_libraries(address
14-
Boost::boost
15-
blake2
16-
blob
17-
outcome
18-
)
6+
add_subdirectory(address)

0 commit comments

Comments
 (0)