// Add new entry or overwrite a present one.
// Panics if new height < last_entry().height
Add new entry or overwrite a present one.
Panics if new height < last_entry().height
Add new entry or overwrite a present one . Panics if new height < last_entry () . height
pub fn insert(&mut self, height: BlockHeight, amount: Tokens) {
        #[allow(clippy::comparison_chain)]
        if let Some((h, a)) = self.inner.last_mut() {
            if *h > height {
                panic!(
                    "Attempt to insert balance at height {}, when previous recorded height is already {}",
                    height, *h
                );
            } else if *h == height {
                *a = amount;
                return;
            }
        }
        self.inner.push((height, amount));
    }
pub fn insert ( & mut self , height : BlockHeight , amount : Tokens ) { # [ allow ( clippy comparison_chain ) ] if let Some ( ( h , a ) ) = self . inner . last_mut ( ) { if * h > height { panic ! ( " " height h ) ; } else if * h == height { * a = amount ; return ; } } self . inner . push ( ( height , amount ) ) ; }
Add new entry or overwrite a present one.
Add new entry or overwrite a present one .
&mut self
height
BlockHeight
amount
Tokens