Skip to content

Commit bd870e8

Browse files
authored
Fixed small issues (#62)
Signed-off-by: artyom-yurin <[email protected]>
1 parent ee46209 commit bd870e8

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

core/vm/actor/cron_actor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
std::vector<fc::vm::actor::CronTableEntry> fc::vm::actor::CronActor::entries = {
1010
{kStoragePowerAddress, SpaMethods::CHECK_PROOF_SUBMISSIONS}};
1111

12-
fc::outcome::result<void> fc::vm::actor::CronActor::EpochTick(
12+
fc::outcome::result<void> fc::vm::actor::CronActor::epochTick(
1313
fc::vm::actor::Actor &actor,
1414
fc::vm::VMContext &vmctx,
1515
const std::vector<uint8_t> &params) {

core/vm/actor/cron_actor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace fc::vm::actor {
3131
* @param params from Lotus(doesn't use)
3232
* @return success or error
3333
*/
34-
static outcome::result<void> EpochTick(Actor &actor,
34+
static outcome::result<void> epochTick(Actor &actor,
3535
vm::VMContext &vmctx,
3636
const std::vector<uint8_t> &params);
3737
};

test/core/fslock/fslock_test.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ class FSLockTest : public test::BaseFS_Test {
3434
void SetUp() override {
3535
BaseFS_Test::SetUp();
3636
lock_file_path = fs::canonical(createFile("test.lock")).string();
37-
auto path_model = fs::current_path().append("%%%%%");
37+
auto path_model = fs::canonical(base_path).append("%%%%%");
3838
not_exist_file_path = boost::filesystem::unique_path(path_model).string();
3939

40-
dir_path = fs::current_path().string();
40+
dir_path = fs::canonical(base_path).string();
4141
}
4242
};
4343

@@ -59,7 +59,8 @@ TEST_F(FSLockTest, LockFileSuccess) {
5959

6060
/**
6161
* @given path to file that doesn't exist
62-
* @when one process create and lock file and another tries to lock it at the same time
62+
* @when one process create and lock file and another tries to lock it at the
63+
* same time
6364
* @then the first get lock file and the second get error FILE_LOCKED
6465
*/
6566
TEST_F(FSLockTest, LockNotExistingFileSuccess) {
@@ -80,6 +81,6 @@ TEST_F(FSLockTest, LockNotExistingFileSuccess) {
8081
* @then error IS_DIRECTORY
8182
*/
8283
TEST_F(FSLockTest, LockDirectoryFail) {
83-
EXPECT_OUTCOME_FALSE(err1,fc::fslock::Locker::lock(dir_path));
84+
EXPECT_OUTCOME_FALSE(err1, fc::fslock::Locker::lock(dir_path));
8485
ASSERT_EQ(err1, fc::fslock::FSLockError::IS_DIRECTORY);
8586
}

test/core/vm/actor/cron_actor_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ TEST(CronActorTest, WrongSender) {
2424
actor::Actor actor;
2525
EXPECT_CALL(vmctx, message())
2626
.WillRepeatedly(testing::Return(message_wrong_sender));
27-
EXPECT_OUTCOME_FALSE(err, actor::CronActor::EpochTick(actor, vmctx, {}));
27+
EXPECT_OUTCOME_FALSE(err, actor::CronActor::epochTick(actor, vmctx, {}));
2828
ASSERT_EQ(err, actor::CronActorError::WRONG_CALL);
2929
}
3030

@@ -44,5 +44,5 @@ TEST(CronActorTest, Correct) {
4444
actor::BigInt(0),
4545
std::vector<uint8_t>()))
4646
.WillRepeatedly(testing::Return(fc::outcome::success()));
47-
EXPECT_OUTCOME_TRUE_1(actor::CronActor::EpochTick(actor, vmctx, {}));
47+
EXPECT_OUTCOME_TRUE_1(actor::CronActor::epochTick(actor, vmctx, {}));
4848
}

0 commit comments

Comments
 (0)