Skip to content

Commit

Permalink
optimize delete key loop to minimize reads/writes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattlockyer committed Aug 20, 2020
1 parent 63022b6 commit 636e7e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion multisig/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ impl MultiSigContract {
.map(|(k, _r)| k)
.collect();
for request_id in request_ids {
self.remove_request(request_id);
// remove confirmations for this request
self.confirmations.remove(&request_id);
self.requests.remove(&request_id);
}
// remove num_requests_pk entry for public_key
self.num_requests_pk.remove(&pk);
Expand Down

0 comments on commit 636e7e4

Please sign in to comment.