In a standard wallet, there are two different kinds of balances:
estimated, which you have immediately upon learning of the transaction.
And available, for which you need to receive at least one confirmation.

PeerGroup: make sure (e.g. by examining the logfile) you're connected to
the Bitcoin network and that on average every 10 minutes a block arrives.


On 13/01/2019 02.46, Carpemer wrote:
> It looks vPeerGroup will be initialized by startUp()
> vPeerGroup = createPeerGroup();
> 
> Further, If I have already got the balance (0.13396268 BTC), It supposes
> connected to the peer?
> 
> Or Do I need explicitly broadcast the send request?
> 
> On Sunday, January 13, 2019 at 1:37:19 AM UTC+8, Andreas Schildbach wrote:
> 
>     Have you set up a PeerGroup to connect to the Bitcoin Testnet network,
>     so that your transaction is actually broadcasted? This should solve
>     both
>     of your problems.
> 
> 
>     On 12/01/2019 13.47, Carpemer wrote:
>     > Hi BitcoinJ, 
>     >
>     > I modified the SendRequest.java a little bit.
>     >
>     > I checked the balance before and after I send the coin. 
>     >
>     > System.out.println("You have " +
>     > kit.wallet().getBalance().toFriendlyString());
>     > System.out.println("Send money from: " +
>     > kit.wallet().getIssuedReceiveAddresses());
>     > System.out.println("Send money to: " + to.toString());
>     > Wallet.SendResult result = kit.wallet().sendCoins(kit.peerGroup(),
>     to,
>     > Coin.parseCoin("0.015"));
>     > System.out.println("coins sent. transaction hash: " +
>     > result.tx.getHashAsString());
>     > System.out.println("You have " +
>     > kit.wallet().getBalance().toFriendlyString());
>     >
>     > But the result is something like:
>     >
>     > You have 0.13396268 BTC
>     > Send money from: [moUjgbi6P9Xy8dLCfeWzAeg4UciS5SUaBm]
>     > Send money to: mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB
>     > coins sent. transaction hash:
>     > 3e8ca46fa911be7ca4c1c34bd25bdd43ef574e17c95dbaa83ed93ec6a4f9d9ee
>     > You have 0.00 BTC
>     >
>     > The remaining value should be 0.13396268 - 0.015, but it told me
>     0.0 here?
>     >
>     > Further, why I can not check the value in the testnet explorer like 
>     >
>     
> https://live.blockcypher.com/btc-testnet/address/moUjgbi6P9Xy8dLCfeWzAeg4UciS5SUaBm/
>     
> <https://live.blockcypher.com/btc-testnet/address/moUjgbi6P9Xy8dLCfeWzAeg4UciS5SUaBm/>
> 
>     >
>     > How long the delay suppose to be in the BTC testnet?
>     >
>     > Thanks
>     >
>     >
>     >
>     > --
>     > You received this message because you are subscribed to the Google
>     > Groups "bitcoinj" group.
>     > To unsubscribe from this group and stop receiving emails from it,
>     send
>     > an email to bitcoinj+u...@googlegroups.com
>     > <mailto:bitcoinj+u...@googlegroups.com>.
>     > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "bitcoinj" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bitcoinj+unsubscr...@googlegroups.com
> <mailto:bitcoinj+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to