Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
XertroV committed Jun 13, 2018
1 parent 1836ed9 commit 54d8c95
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ethcore/src/miner/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1289,22 +1289,22 @@ mod tests {
let res = miner.import_own_transaction(&client, PendingTransaction::new(transaction.clone(), None));

// then
// check the same conditions as `should_import_external_transaction` first - behaviour should be identical
// that is: it's treated as though we added it through `import_external_transactions`
// Check the same conditions as `should_import_external_transaction` first. Behaviour should be identical.
// That is: it's treated as though we added it through `import_external_transactions`
assert_eq!(res.unwrap(), ());
assert_eq!(miner.pending_transactions(best_block), None);
assert_eq!(miner.pending_receipts(best_block), None);
assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 0);
assert!(miner.prepare_pending_block(&client));
assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 1);

// when - 2nd part, create a local transaction from account_provider
// borrow the transaction used before & sign with our generated keypair
// when - 2nd part: create a local transaction from account_provider.
// Borrow the transaction used before & sign with our generated keypair.
let local_transaction = transaction.deconstruct().0.as_unsigned().clone().sign(keypair.secret(), Some(TEST_CHAIN_ID));
let res2 = miner.import_own_transaction(&client, PendingTransaction::new(local_transaction, None));

// then - 2nd part, we add on the results from the last pending block.
// borrow this from `should_make_pending_block_when_importing_own_transaction`
// then - 2nd part: we add on the results from the last pending block.
// This is borrowed from `should_make_pending_block_when_importing_own_transaction` and slightly modified.
assert_eq!(res2.unwrap(), ());
assert_eq!(miner.pending_transactions(best_block).unwrap().len(), 2);
assert_eq!(miner.pending_receipts(best_block).unwrap().len(), 2);
Expand Down

0 comments on commit 54d8c95

Please sign in to comment.