Hi Andreas,

I removed old regtest folder in .bitcoin as well as old .wallet & .spvchain 
created by bitcoinj. Now its working fine!
Thank you very much for your reply!

On Friday, 23 June 2017 14:48:06 UTC+5:30, Andreas Schildbach wrote:
>
> I'm sorry, I have never used regtest mode. I always used testnet for 
> testing. 
>
> Can you give the DoubleSpend.java example a spin and see if it works for 
> you (progresses past the "awaitRunning()" line)? 
>
>
> On 06/23/2017 09:15 AM, Kunal Ransing wrote: 
> > @Andreas Schildbach 
> > Can you help me please ? 
> > 
> > On Wednesday, 21 June 2017 19:31:54 UTC+5:30, Kunal Ransing wrote: 
> > 
> >     Hi, 
> > 
> >     I am new to this. 
> >     I am trying to create test program to create new address to receive 
> >     payment. It *works well with "testnet"* mode but when using 
> >     "regtest" code stuck at  kit.awaitRunning(). 
> > 
> >     For regtest mode before running code, I did below 
> >     >bitcoind -regtest -debug -daemon 
> > 
> >     After started program I can see "connections": 1 by  running 
> >     "bitcoin-cli -regtest getinfo" but code just stuck at 
> >     walletAppKit.awaitRunning(). 
> > 
> >     Please check below code & *bitcoind log* 
> > 
> >             public static void main(String[] args) { 
> >                 //System.setProperty("-Dbitcoinj.logging", "true"); 
> >                 BriefLogFormatter.init(); 
> >                 NetworkParameters params = RegTestParams.get(); 
> >                 String filePrefix = "forwarding-service-regtest"; 
> >                 
> >                 WalletAppKit kit = new WalletAppKit(params, *new 
> >         File(".")*, filePrefix); 
> >                 if (params == RegTestParams.get()) { 
> >                      kit.connectToLocalHost(); 
> >                 } 
> > 
> >                  // Download the block chain and wait until it's done. 
> >                 kit.startAsync(); 
> >                *kit.awaitRunning(); //execution just stop here and for 
> >         long time..* 
> > 
> >                 List<Address> list = kit.wallet().getWatchedAddresses(); 
> >                 if (list.size() < 2) { 
> >                     
> >         
> kit.wallet().addWatchedAddress(kit.wallet().freshReceiveAddress()); 
> >                     System.out.println("New address created"); 
> >                 } 
> > 
> >                 System.out.println("You have " + list.size() + " 
> >         addresses!"); 
> >                 for (Address a: list) { 
> >                     System.out.println(a.toString()); 
> >                 } 
> > 
> >                 String balance = 
> >         kit.wallet().getBalance().toFriendlyString(); 
> >                 System.out.println(balance); 
> >             } 
> > 
> > 
> > 
> >     *bitcoind debug log* 
> >     -------------------------------- 
> >     2017-06-21 13:42:38 Added connection peer=1 
> >     2017-06-21 13:42:38 connection from 127.0.0.1:52972 
> >     <http://127.0.0.1:52972> accepted 
> >     2017-06-21 13:42:38 received: version (103 bytes) peer=1 
> >     2017-06-21 13:42:38 sending version (102 bytes) peer=1 
> >     2017-06-21 13:42:38 send version message: version 70015, blocks=101, 
> >     us=[::]:0, peer=1 
> >     2017-06-21 13:42:38 sending verack (0 bytes) peer=1 
> >     2017-06-21 13:42:38 receive version message: /bitcoinj:0.14.4/: 
> >     version 70001, blocks=0, us=127.0.0.1:18444 
> >     <http://127.0.0.1:18444>, peer=1 
> >     2017-06-21 13:42:38 added time data, samples 2, offset +0 (+0 
> minutes) 
> >     2017-06-21 13:42:38 sending alert (168 bytes) peer=1 
> >     2017-06-21 13:42:38 received: verack (0 bytes) peer=1 
> >     2017-06-21 13:42:38 sending ping (8 bytes) peer=1 
> >     2017-06-21 13:42:38 received: filterload (1935 bytes) peer=1 
> >     2017-06-21 13:42:38 received: mempool (0 bytes) peer=1 
> >     2017-06-21 13:42:38 received: getheaders (3269 bytes) peer=1 
> >     2017-06-21 13:42:38 Ignoring getheaders from peer=1 because node is 
> >     in initial block download 
> >     2017-06-21 13:42:38 received: pong (8 bytes) peer=1 
> >     2017-06-21 13:42:40 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:40 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:42:42 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:42 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:42:44 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:44 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:42:46 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:46 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:42:48 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:48 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:42:50 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:50 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:42:52 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:52 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:42:54 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:54 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:42:56 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:56 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:42:58 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:42:58 sending pong (8 bytes) peer=1 
> >     2017-06-21 13:43:00 received: ping (8 bytes) peer=1 
> >     2017-06-21 13:43:00 sending pong (8 bytes) peer=1 
> >     ---------------same message----------------------------- 
> > 
> > 
> >      Please help me to solve this. 
> >      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 [email protected] <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to