Skip to content

Commit

Permalink
Move a struct
Browse files Browse the repository at this point in the history
  • Loading branch information
lassemoldrup committed Sep 27, 2023
1 parent 6ddb245 commit ab6a6df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions generator/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ impl ContractDeploymentInfo {
}
}

/// A transaction generator.
pub trait Generate {
/// Generate a transaction. Will be called in a loop.
fn generate(&mut self) -> anyhow::Result<AccountTransaction<EncodedPayload>>;
}

/// Arguments used by all transaction generators.
pub struct CommonArgs {
pub keys: WalletAccount,
pub expiry: u32,
}

/// A transaction generator.
pub trait Generate {
/// Generate a transaction. Will be called in a loop.
fn generate(&mut self) -> anyhow::Result<AccountTransaction<EncodedPayload>>;
}

pub async fn generate_transactions(
mut client: v2::Client,
mut generator: impl Generate + Send + 'static,
Expand Down

0 comments on commit ab6a6df

Please sign in to comment.