Skip to content

Commit

Permalink
Clear the leftover payment array before using it in setConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jan 26, 2022
1 parent 77c4901 commit c6c19c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/programs/ocr2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ pub mod ocr2 {
.any(|leftover| leftover.amount != 0);
require!(!leftovers, PaymentsRemaining);

leftover_payments.clear();

// Move current balances to leftover payments
for oracle in oracles.iter() {
leftover_payments.push(LeftoverPayment {
Expand Down

0 comments on commit c6c19c4

Please sign in to comment.