mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-01 21:17:13 +00:00
Address some review comments from Miron.
This commit is contained in:
committed by
Miron Cuperman
parent
35ec0b669d
commit
32f41dc1a9
@@ -793,7 +793,8 @@ public class Wallet implements Serializable {
|
||||
* @throws IOException if there was a problem broadcasting the transaction
|
||||
*/
|
||||
public synchronized Transaction sendCoins(PeerGroup peerGroup, Address to, BigInteger nanocoins) throws IOException {
|
||||
Transaction tx = createSend(to, nanocoins);
|
||||
Transaction tx = sendCoinsOffline(to, nanocoins);
|
||||
|
||||
if (tx == null) // Not enough money! :-(
|
||||
return null;
|
||||
try {
|
||||
@@ -801,6 +802,7 @@ public class Wallet implements Serializable {
|
||||
} catch (VerificationException e) {
|
||||
throw new RuntimeException(e); // Cannot happen unless there's a bug, as we just created this ourselves.
|
||||
}
|
||||
|
||||
if (!peerGroup.broadcastTransaction(tx)) {
|
||||
throw new IOException("Failed to broadcast tx to all connected peers");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user