Skip to content

Commit 68710bc

Browse files
fix exception in preload
1 parent 2f01641 commit 68710bc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

libraries/vm_manager/vm_manager.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,11 @@ int vm_manager::load_vm_wavm() {
220220

221221
auto itr = vm_map.find(3);
222222
if (itr != vm_map.end()) {
223-
if (db_api::get().is_account(N(eosio.token))) {
224-
auto t = time_counter(N(eosio.token));
225-
itr->second->preload(N(eosio.token));
226-
}
227-
if (db_api::get().is_account(N(eosio))) {
228-
auto t = time_counter(N(eosio));
229-
itr->second->preload(N(eosio));
223+
for (uint64_t account : {N(eosio.token), N(eosio)}) {
224+
if (db_api::get().is_account(account) && db_api::get().get_code(account).size() > 0) {
225+
auto t = time_counter(account);
226+
itr->second->preload(account);
227+
}
230228
}
231229
}
232230

0 commit comments

Comments
 (0)