pub fn write_account(&mut self, key: Key, account: Account) -> Result<(), Error> {
        if let Key::Account(_) = key {
            self.validate_key(&key)?;
            let account_value = self.account_to_validated_value(account)?;
            self.metered_write_gs_unsafe(key, account_value)?;
            Ok(())
        } else {
            panic!("Do not use this function for writing non-account keys")
        }
    }
/// Write an account to the global state.
Write an account to the global state.
Write an account to the global state .
pub fn write_account(&mut self, key: Key, account: Account) -> Result<(), Error> {
        if let Key::Account(_) = key {
            self.validate_key(&key)?;
            let account_value = self.account_to_validated_value(account)?;
            self.metered_write_gs_unsafe(key, account_value)?;
            Ok(())
        } else {
            panic!("Do not use this function for writing non-account keys")
        }
    }
pub fn write_account ( & mut self , key : Key , account : Account ) -> Result < ( ) , Error > { if let Key :: Account ( _ ) = key { self . validate_key ( & key ) ? ; let account_value = self . account_to_validated_value ( account ) ? ; self . metered_write_gs_unsafe ( key , account_value ) ? ; Ok ( ( ) ) } else { panic ! ( " " ) } }
Write an account to the global state.
Write an account to the global state .
&mut self
key
Key
account
Account
&mut self
key
Key
account
Account