|
@@ -1,15 +1,17 @@
|
|
|
#[allow(deprecated)]
|
|
#[allow(deprecated)]
|
|
|
use crate::sysvar::recent_blockhashes;
|
|
use crate::sysvar::recent_blockhashes;
|
|
|
-use crate::{
|
|
|
|
|
- decode_error::DecodeError,
|
|
|
|
|
- instruction::{AccountMeta, Instruction, InstructionError},
|
|
|
|
|
- nonce,
|
|
|
|
|
- pubkey::Pubkey,
|
|
|
|
|
- system_program,
|
|
|
|
|
- sysvar::rent,
|
|
|
|
|
|
|
+use {
|
|
|
|
|
+ crate::{
|
|
|
|
|
+ decode_error::DecodeError,
|
|
|
|
|
+ instruction::{AccountMeta, Instruction, InstructionError},
|
|
|
|
|
+ nonce,
|
|
|
|
|
+ pubkey::Pubkey,
|
|
|
|
|
+ system_program,
|
|
|
|
|
+ sysvar::rent,
|
|
|
|
|
+ },
|
|
|
|
|
+ num_derive::{FromPrimitive, ToPrimitive},
|
|
|
|
|
+ thiserror::Error,
|
|
|
};
|
|
};
|
|
|
-use num_derive::{FromPrimitive, ToPrimitive};
|
|
|
|
|
-use thiserror::Error;
|
|
|
|
|
|
|
|
|
|
#[derive(Error, Debug, Serialize, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
|
#[derive(Error, Debug, Serialize, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
|
|
pub enum SystemError {
|
|
pub enum SystemError {
|
|
@@ -573,9 +575,11 @@ pub fn authorize_nonce_account(
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
#[cfg(test)]
|
|
|
mod tests {
|
|
mod tests {
|
|
|
- use super::*;
|
|
|
|
|
- use crate::instruction::{Instruction, InstructionError};
|
|
|
|
|
- use num_traits::ToPrimitive;
|
|
|
|
|
|
|
+ use {
|
|
|
|
|
+ super::*,
|
|
|
|
|
+ crate::instruction::{Instruction, InstructionError},
|
|
|
|
|
+ num_traits::ToPrimitive,
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
fn get_keys(instruction: &Instruction) -> Vec<Pubkey> {
|
|
fn get_keys(instruction: &Instruction) -> Vec<Pubkey> {
|
|
|
instruction.accounts.iter().map(|x| x.pubkey).collect()
|
|
instruction.accounts.iter().map(|x| x.pubkey).collect()
|