Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zjg555543 committed Oct 22, 2024
1 parent 9b1165f commit e64fba9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions validator/db/celldb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ void CellDbIn::migrate_cells() {
}
}

int getRandom(){
int getRandom1(){
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> distr(0, 999);
Expand All @@ -464,7 +464,7 @@ int getRandom(){

void CellDb::load_cell(RootHash hash, td::Promise<td::Ref<vm::DataCell>> promise, std::uint64_t counter_) {
// LOG(INFO) << " load_cell: counter" << counter_ << ", 1";
int ranNum = getRandom();
int ranNum = getRandom1();
static int64_t ranCount = 0;
ranCount++;
if (ranCount % 1000 == 0) {
Expand Down
4 changes: 2 additions & 2 deletions validator/db/rootdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void RootDb::store_block_state(BlockHandle handle, td::Ref<ShardState> state,
}
}

int getRandom(){
int getRandom2(){
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> distr(0, 99);
Expand Down Expand Up @@ -284,7 +284,7 @@ void RootDb::get_block_state(ConstBlockHandle handle, td::Promise<td::Ref<ShardS
});
LOG(INFO) << "get_block_state, counter" << counter_ << ", 4";

int ranNum = getRandom();
int ranNum = getRandom2();
static int64_t ranCount = 0;
ranCount++;
if (ranCount % 1000 == 0) {
Expand Down

0 comments on commit e64fba9

Please sign in to comment.