Skip to content

Commit f186970

Browse files
authored
Fix (#358)
Signed-off-by: turuslan <[email protected]>
1 parent af64964 commit f186970

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+236
-879
lines changed

cmake/Hunter/config.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ hunter_config(
5555
)
5656

5757
hunter_config(libp2p
58-
URL https://github.com/libp2p/cpp-libp2p/archive/8468ec2e77ffaf2f689b2516814931183553bdab.zip
59-
SHA1 04a868164c18a0e1930b1b4a99e799051ff0c382
58+
URL https://github.com/libp2p/cpp-libp2p/archive/909419207a99d7faab606ceb9a052920f7c6cc83.zip
59+
SHA1 a203b7881ed5132f03c4f91f9bbff326b5d5f359
6060
CMAKE_ARGS TESTING=OFF EXAMPLES=OFF EXPOSE_MOCKS=ON
6161
KEEP_PACKAGE_SOURCES
6262
)

core/api/node_api.hpp

+12-6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace fc::api {
3535
using primitives::ChainEpoch;
3636
using primitives::DealId;
3737
using primitives::EpochDuration;
38+
using primitives::GasAmount;
3839
using primitives::RleBitset;
3940
using primitives::SectorNumber;
4041
using primitives::SectorSize;
@@ -195,12 +196,6 @@ namespace fc::api {
195196
};
196197

197198
struct MessageSendSpec {
198-
static TokenAmount maxFee(const boost::optional<MessageSendSpec> &spec) {
199-
if (spec) {
200-
return spec->max_fee;
201-
}
202-
return kFilecoinPrecision / 10;
203-
};
204199
TokenAmount max_fee;
205200
};
206201

@@ -255,6 +250,17 @@ namespace fc::api {
255250
const FileRef &)
256251
API_METHOD(ClientStartDeal, Wait<CID>, const StartDealParams &)
257252

253+
API_METHOD(GasEstimateFeeCap,
254+
TokenAmount,
255+
const UnsignedMessage &,
256+
int64_t,
257+
const TipsetKey &)
258+
API_METHOD(GasEstimateGasPremium,
259+
TokenAmount,
260+
uint64_t,
261+
const Address &,
262+
GasAmount,
263+
const TipsetKey &)
258264
API_METHOD(GasEstimateMessageGas,
259265
UnsignedMessage,
260266
const UnsignedMessage &,

core/api/utils.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ namespace fc::api {
9393

9494
template <typename T>
9595
struct is_wait<Wait<T>> : std::true_type {};
96-
}; // namespace fc::api
96+
} // namespace fc::api

core/api/visit.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ namespace fc::api {
9191
f(a.ClientQueryAsk);
9292
f(a.ClientRetrieve);
9393
f(a.ClientStartDeal);
94+
f(a.GasEstimateFeeCap);
95+
f(a.GasEstimateGasPremium);
9496
f(a.GasEstimateMessageGas);
9597
f(a.MarketReserveFunds);
9698
f(a.MinerCreateBlock);

core/blockchain/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#
55

66
add_subdirectory(block_validator)
7-
add_subdirectory(message_pool)
87
add_subdirectory(production)
98

109
add_library(weight_calculator

core/blockchain/message_pool/CMakeLists.txt

-12
This file was deleted.

core/blockchain/message_pool/impl/gas_price_scored_message_storage.cpp

-32
This file was deleted.

core/blockchain/message_pool/impl/gas_price_scored_message_storage.hpp

-59
This file was deleted.

core/blockchain/message_pool/impl/message_pool_error.cpp

-17
This file was deleted.

core/blockchain/message_pool/message_pool_error.hpp

-24
This file was deleted.

core/blockchain/message_pool/message_storage.hpp

-49
This file was deleted.

core/codec/rle/rle_plus.hpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#ifndef CODEC_RLE_PLUS_HPP
7-
#define CODEC_RLE_PLUS_HPP
6+
#pragma once
87

98
#include "codec/rle/rle_plus_decoding_stream.hpp"
109
#include "codec/rle/rle_plus_encoding_stream.hpp"
@@ -53,6 +52,4 @@ namespace fc::codec::rle {
5352
}
5453
return data;
5554
}
56-
}; // namespace fc::codec::rle
57-
58-
#endif
55+
} // namespace fc::codec::rle

core/codec/rle/rle_plus_config.hpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#ifndef CODEC_RLE_PLUS_CONFIG_HPP
7-
#define CODEC_RLE_PLUS_CONFIG_HPP
6+
#pragma once
87

98
namespace fc::codec::rle {
109
/**
@@ -42,6 +41,4 @@ namespace fc::codec::rle {
4241
*/
4342
const int OBJECT_MAX_SIZE = 0x100000;
4443

45-
}; // namespace fc::codec::rle
46-
47-
#endif
44+
} // namespace fc::codec::rle

core/codec/rle/rle_plus_decoding_stream.hpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#ifndef CPP_FILECOIN_RLE_PLUS_DECODING_STREAM_HPP
7-
#define CPP_FILECOIN_RLE_PLUS_DECODING_STREAM_HPP
6+
#pragma once
87

98
#include <set>
109
#include <vector>
@@ -172,6 +171,4 @@ namespace fc::codec::rle {
172171
magnitude_ = !magnitude_;
173172
}
174173
};
175-
}; // namespace fc::codec::rle
176-
177-
#endif
174+
} // namespace fc::codec::rle

core/codec/rle/rle_plus_encoding_stream.hpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#ifndef CPP_FILECOIN_RLE_PLUS_ENCODING_STREAM_HPP
7-
#define CPP_FILECOIN_RLE_PLUS_ENCODING_STREAM_HPP
6+
#pragma once
87

98
#include <set>
109
#include <vector>
@@ -135,6 +134,4 @@ namespace fc::codec::rle {
135134
using Runs64 = std::vector<uint64_t>;
136135
Runs64 toRuns(const Set64 &set);
137136
Set64 fromRuns(const Runs64 &runs);
138-
}; // namespace fc::codec::rle
139-
140-
#endif
137+
} // namespace fc::codec::rle

core/crypto/bls/bls_types.hpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
#ifndef CRYPTO_BLS_PROVIDER_TYPES_HPP
7-
#define CRYPTO_BLS_PROVIDER_TYPES_HPP
6+
#pragma once
87

98
#include "common/blob.hpp"
109
#include "common/outcome.hpp"
@@ -35,8 +34,6 @@ namespace fc::crypto::bls {
3534
kInvalidPublicKey,
3635
kAggregateError,
3736
};
38-
}; // namespace fc::crypto::bls
37+
} // namespace fc::crypto::bls
3938

4039
OUTCOME_HPP_DECLARE_ERROR(fc::crypto::bls, Errors);
41-
42-
#endif

core/crypto/bls/impl/bls_provider_impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ namespace fc::crypto::bls {
8686
}
8787
return ffi::array(response->signature.inner);
8888
}
89-
}; // namespace fc::crypto::bls
89+
} // namespace fc::crypto::bls
9090

9191
OUTCOME_CPP_DEFINE_CATEGORY(fc::crypto::bls, Errors, e) {
9292
using fc::crypto::bls::Errors;

core/markets/storage/client/impl/storage_market_client_impl.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "storage/ipfs/graphsync/impl/graphsync_impl.hpp"
1919
#include "vm/actor/builtin/v0/market/market_actor.hpp"
2020
#include "vm/message/message.hpp"
21-
#include "vm/message/message_util.hpp"
2221

2322
#define MOVE(x) \
2423
x { \
@@ -341,8 +340,9 @@ namespace fc::markets::storage::client {
341340
{}};
342341
OUTCOME_TRY(signed_message,
343342
api_->MpoolPushMessage(unsigned_message, api::kPushNoSpec));
344-
OUTCOME_TRY(message_cid, vm::message::cid(signed_message));
345-
OUTCOME_TRY(msg_wait, api_->StateWaitMsg(message_cid, api::kNoConfidence));
343+
OUTCOME_TRY(
344+
msg_wait,
345+
api_->StateWaitMsg(signed_message.getCid(), api::kNoConfidence));
346346
OUTCOME_TRY(msg_state, msg_wait.waitSync());
347347
if (msg_state.receipt.exit_code != VMExitCode::kOk) {
348348
return StorageMarketClientError::kAddFundsCallError;

0 commit comments

Comments
 (0)