Hi,

I want to see every transaction which is broadcasted and not only for the 
addresses in the wallet. I have below code now, but the listener is never 
triggered:

        NetworkParameters params = TestNet3Params.get();
       
        // Start up a basic app using a class that automates some 
boilerplate.
        kit = new WalletAppKit(params, new File("."), "walletfile");
        // Download the block chain and wait until it's done.
        kit.startAsync();
        kit.awaitRunning();

       * //THIS LISTENER IS NEVER TRIGGERED:*
*        kit.peerGroup().addOnTransactionBroadcastListener( new 
OnTransactionBroadcastListener() {*
*            @Override*
*            public void onTransaction(Peer peer, final Transaction 
transaction) {*
* //NEW TXN*
* System.out.println(transaction);*
*            }*
*        });*

        try {
            Thread.sleep(Long.MAX_VALUE);
        } catch (InterruptedException ignored) {}

What could be the reason of this issue? 
Note: I based myself on the ForwardingService example. This service is 
working perfectly for the listener WalletCoinsReceivedEventListener. Also 
the logs don't show any relevant error, and are showing updates whenever a 
new block is found.Hence, connection to peers seems fine.

Kr

-- 
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