This commit is contained in:
Greg Fitzgerald
2018-05-25 16:05:37 -06:00
parent 9f5a3d6064
commit aaeb5ba52f
11 changed files with 104 additions and 104 deletions

View File

@@ -48,8 +48,8 @@ impl Mint {
pub fn create_transactions(&self) -> Vec<Transaction> {
let keypair = self.keypair();
let tr = Transaction::new(&keypair, self.pubkey(), self.tokens, self.seed());
vec![tr]
let tx = Transaction::new(&keypair, self.pubkey(), self.tokens, self.seed());
vec![tx]
}
pub fn create_entries(&self) -> Vec<Entry> {
@@ -75,10 +75,10 @@ mod tests {
#[test]
fn test_create_transactions() {
let mut transactions = Mint::new(100).create_transactions().into_iter();
let tr = transactions.next().unwrap();
if let Instruction::NewContract(contract) = tr.instruction {
let tx = transactions.next().unwrap();
if let Instruction::NewContract(contract) = tx.instruction {
if let Plan::Pay(payment) = contract.plan {
assert_eq!(tr.from, payment.to);
assert_eq!(tx.from, payment.to);
}
}
assert_eq!(transactions.next(), None);