You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we store jobs in a Vec. This is very inefficient since we need to read the whol list and save the whole list on updates.
letmut jobs = DRAND_JOBS.may_load(deps.storage, round)?
.unwrap_or_default();
jobs.push(job);DRAND_JOBS.save(deps.storage, round,&jobs)?;
All removed at the same time:
ifletSome(jobs) = DRAND_JOBS.may_load(deps.storage, round)? {DRAND_JOBS.remove(deps.storage, round);for job in jobs {// Use IbcMsg::SendPacket to send packages to the proxies.let msg = process_job(env.block.time, job, beacon)?;
out_msgs.push(msg.into());}}
Currently we store jobs in a Vec. This is very inefficient since we need to read the whol list and save the whole list on updates.
All removed at the same time:
Better use Deque (in cw-store-plus 0.15.2) which gives us a stack or queue storage.
The text was updated successfully, but these errors were encountered: