Skip to content

Commit 11af630

Browse files
author
Mikhail Tagirov
authored
Cosmetic fix (#483)
Signed-off-by: Mikhail Tagirov <[email protected]>
1 parent f73cb46 commit 11af630

File tree

21 files changed

+52
-74
lines changed

21 files changed

+52
-74
lines changed

core/blockchain/block_validator/impl/block_validator_impl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
namespace fc::blockchain::block_validator {
1515
using primitives::address::Protocol;
1616
using storage::amt::Amt;
17-
using SignedMessage = vm::message::SignedMessage;
18-
using UnsignedMessage = vm::message::UnsignedMessage;
17+
using vm::message::SignedMessage;
18+
using vm::message::UnsignedMessage;
1919
using BlsCryptoSignature = crypto::bls::Signature;
2020
using BlsCryptoPubKey = crypto::bls::PublicKey;
2121
using SecpCryptoSignature = crypto::secp256k1::Signature;
@@ -147,7 +147,7 @@ namespace fc::blockchain::block_validator {
147147
return ValidatorError::kInvalidParentState;
148148
}
149149

150-
outcome::result<std::reference_wrapper<BlockValidatorImpl::TipsetCPtr>>
150+
outcome::result<std::reference_wrapper<TipsetCPtr>>
151151
BlockValidatorImpl::getParentTipset(const BlockHeader &block) const {
152152
auto cid{primitives::cid::getCidOfCbor(block).value()};
153153
if (parent_tipset_cache_ && parent_tipset_cache_.value().first == cid) {

core/blockchain/block_validator/impl/block_validator_impl.hpp

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,19 @@
2121
#include "vm/interpreter/interpreter.hpp"
2222

2323
namespace fc::blockchain::block_validator {
24+
using scenarios::Stage;
25+
using storage::ipfs::IpfsDatastore;
26+
using EpochClock = clock::ChainEpochClock;
27+
using blockchain::weight::WeightCalculator;
28+
using clock::UTCClock;
29+
using crypto::bls::BlsProvider;
30+
using power::PowerTable;
31+
using SecpProvider = crypto::secp256k1::Secp256k1ProviderDefault;
32+
using primitives::tipset::Tipset;
33+
using primitives::tipset::TipsetCPtr;
34+
using vm::interpreter::InterpreterCache;
2435

2536
class BlockValidatorImpl : public BlockValidator {
26-
protected:
27-
using Stage = scenarios::Stage;
28-
using IpfsDatastore = storage::ipfs::IpfsDatastore;
29-
using EpochClock = clock::ChainEpochClock;
30-
using UTCClock = clock::UTCClock;
31-
using WeightCalculator = blockchain::weight::WeightCalculator;
32-
using PowerTable = power::PowerTable;
33-
using BlsProvider = crypto::bls::BlsProvider;
34-
using SecpProvider = crypto::secp256k1::Secp256k1ProviderDefault;
35-
using InterpreterCache = vm::interpreter::InterpreterCache;
36-
using Tipset = primitives::tipset::Tipset;
37-
using TipsetCPtr = primitives::tipset::TipsetCPtr;
38-
3937
public:
4038
using StageExecutor = outcome::result<void> (BlockValidatorImpl::*)(
4139
const BlockHeader &) const;

core/blockchain/block_validator/impl/syntax_rules.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
#include "primitives/block/block.hpp"
1010

1111
namespace fc::blockchain::block_validator {
12+
using primitives::block::BlockHeader;
13+
1214
/**
1315
* @class Validating block header syntax
1416
*/
1517
class SyntaxRules {
16-
protected:
17-
using BlockHeader = primitives::block::BlockHeader;
18-
1918
public:
2019
/**
2120
* @brief Check parents count

core/node/receive_hello.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515

1616
namespace fc::sync {
1717
using common::libp2p::CborStream;
18+
using libp2p::peer::PeerId;
1819

1920
class ReceiveHello : public std::enable_shared_from_this<ReceiveHello> {
2021
public:
21-
using PeerId = libp2p::peer::PeerId;
22-
2322
ReceiveHello(std::shared_ptr<libp2p::Host> host,
2423
std::shared_ptr<clock::UTCClock> clock,
2524
CID genesis,

core/node/say_hello.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@
2222
namespace fc::sync {
2323
using common::libp2p::CborStream;
2424
using libp2p::basic::Scheduler;
25+
using libp2p::peer::PeerId;
2526

2627
class SayHello : public std::enable_shared_from_this<SayHello> {
2728
public:
28-
using PeerId = libp2p::peer::PeerId;
29-
3029
SayHello(std::shared_ptr<libp2p::Host> host,
3130
std::shared_ptr<Scheduler> scheduler,
3231
std::shared_ptr<clock::UTCClock> clock);

core/primitives/resources/resources.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
#include "primitives/sector/sector.hpp"
1313

1414
namespace fc::primitives {
15-
16-
using fc::primitives::sector::RegisteredSealProof;
15+
using sector::RegisteredSealProof;
1716

1817
struct Resources {
1918
uint64_t min_memory; // What Must be in RAM for decent perf

core/sector_storage/impl/manager_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#include "sector_storage/stores/store_error.hpp"
2525

2626
namespace fc::sector_storage {
27-
using fc::primitives::sector_file::SectorFileType;
28-
using fc::primitives::sector_file::sectorName;
27+
using primitives::sector_file::SectorFileType;
28+
using primitives::sector_file::sectorName;
2929
namespace fs = boost::filesystem;
3030

3131
WorkerAction schedFetch(const SectorRef &sector,

core/sector_storage/stores/impl/index_impl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
#include "primitives/types.hpp"
1313

1414
namespace fc::sector_storage::stores {
15-
16-
using fc::common::HttpUri;
15+
using common::HttpUri;
1716
using primitives::BigInt;
1817
using primitives::sector_file::sectorName;
1918
using std::chrono::duration_cast;

core/sector_storage/stores/impl/local_store.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@
2222
#include "sector_storage/stores/storage_error.hpp"
2323
#include "sector_storage/stores/store_error.hpp"
2424

25-
using fc::primitives::LocalStorageMeta;
26-
using fc::primitives::sector_file::kSectorFileTypes;
27-
using std::chrono::duration_cast;
28-
2925
namespace fc::sector_storage::stores {
26+
using primitives::LocalStorageMeta;
27+
using primitives::sector_file::kSectorFileTypes;
28+
using std::chrono::duration_cast;
3029
namespace fs = boost::filesystem;
3130

3231
outcome::result<SectorId> parseSectorId(const std::string &filename) {

core/sector_storage/stores/index.hpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,19 @@
1212
#include "primitives/types.hpp"
1313

1414
namespace fc::sector_storage::stores {
15+
using primitives::FsStat;
16+
using primitives::SectorSize;
17+
using primitives::StorageID;
1518
using primitives::sector::RegisteredSealProof;
19+
using primitives::sector::SectorId;
20+
using primitives::sector_file::SectorFileType;
21+
using std::chrono::system_clock;
1622

1723
class WLock {
1824
public:
1925
virtual ~WLock() = default;
2026
};
2127

22-
using fc::primitives::sector::SectorId;
23-
using fc::primitives::sector_file::SectorFileType;
24-
using primitives::FsStat;
25-
using primitives::SectorSize;
26-
using primitives::StorageID;
27-
using std::chrono::system_clock;
28-
2928
const std::chrono::seconds kHeartbeatInterval(10);
3029
const std::chrono::seconds kSkippedHeartbeatThreshold =
3130
kHeartbeatInterval * 5;

0 commit comments

Comments
 (0)