In the first case, node A generated blocks, then sent some of the
generated funds to node B. However, node B didn't always manage to sync
the blockchain before receiving the transaction, so it would discard the
transaction as an orphan, and not include it in the next mined block.
The second case was similar: node B generated funds to node A's address,
however, node A did not manage to sync the blockchain and add the funds
to the wallet before it was asked to create a new transaction with them.
The test encountered two synchronization issues:
In the first case, node A generated blocks, then sent some of the generated funds to node B. However, node B didn't always manage to sync the blockchain before receiving the transaction, so it would discard the transaction as an orphan, and not include it in the next mined block.
The second case was similar: node B generated funds to node A's address, however, node A did not manage to sync the blockchain and add the funds to the wallet before it was asked to create a new transaction with them.
Fixes #1042.