Pop the next withdrawal for the given epoch.
(&mut self, epoch: u64)
| 213 | /// The next withdrawal index to assign. |
| 214 | next_index: u64, |
| 215 | } |
| 216 | |
| 217 | impl WithdrawalQueue { |
| 218 | fn schedule(&self, kind: WithdrawalKind) -> &BTreeMap<u64, VecDeque<[u8; 32]>> { |
| 219 | match kind { |
| 220 | WithdrawalKind::Validator => &self.validator_schedule, |
| 221 | WithdrawalKind::DepositRefund => &self.refund_schedule, |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | fn schedule_mut(&mut self, kind: WithdrawalKind) -> &mut BTreeMap<u64, VecDeque<[u8; 32]>> { |
| 226 | match kind { |
| 227 | WithdrawalKind::Validator => &mut self.validator_schedule, |
| 228 | WithdrawalKind::DepositRefund => &mut self.refund_schedule, |