From 74042b8ca34661ebd2799aab35d8f1a28fc69aba Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Mon, 8 Oct 2012 14:36:35 +0200 Subject: [PATCH] Fix minor bug in PingService. --- .../main/java/com/google/bitcoin/examples/PingService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/src/main/java/com/google/bitcoin/examples/PingService.java b/examples/src/main/java/com/google/bitcoin/examples/PingService.java index 6f7a689d..8ca86039 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/PingService.java +++ b/examples/src/main/java/com/google/bitcoin/examples/PingService.java @@ -19,7 +19,6 @@ package com.google.bitcoin.examples; import com.google.bitcoin.core.*; import com.google.bitcoin.discovery.DnsDiscovery; import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.BlockStoreException; import com.google.bitcoin.store.BoundedOverheadBlockStore; import com.google.bitcoin.utils.BriefLogFormatter; @@ -189,9 +188,9 @@ public class PingService { Address from = input.getFromAddress(); System.out.println("Received " + Utils.bitcoinValueToFriendlyString(value) + " from " + from.toString()); // Now send the coins back! - Transaction sendTx = w.sendCoins(peerGroup, from, value).tx; - assert sendTx != null; // We should never try to send more coins than we have! - System.out.println("Sent coins back! Transaction hash is " + sendTx.getHashAsString()); + Wallet.SendResult sendResult = w.sendCoins(peerGroup, from, value); + assert sendResult != null; // We should never try to send more coins than we have! + System.out.println("Sent coins back! Transaction hash is " + sendResult.tx.getHashAsString()); w.saveToFile(walletFile); } catch (ScriptException e) { // If we didn't understand the scriptSig, just crash.