Listening to all transactions of the Bitcoin network

4

2

I searched with all terms I could think of, but could not find anything in direction that helps me.

In the context of a research project, I am trying to listen to all transactions that are broadcasted over the Bitcoin network. So we are especially interested in transactions, that will not occur in the blockchain later (e.g. got "lost", took very long to get accepted, double spent, etc.).

I know of bitcoind, but the list of transactions is rather pull-oriented, whereby I'd like to have something like a callback, that informs me of a new transaction.

Can anybody recommend any software/libs/projects here?

PS: all I intend to do is read-only, so there does not have to be any wallet-support etc. I just like to get a deeper view into how the Bitcoin network actually works.

Bouncner

Posted 2013-03-05T00:10:04.337

Reputation: 143

I'm interested in your project. Please add me to your IM client to discuss it: http://oi47.tinypic.com/2ewk6xu.jpg

– None – 2013-03-05T03:35:33.553

Did you finalize on bitcoinj? Can you share sample code?Jus12 2014-10-28T04:49:50.813

Answers

4

You can do this using BitcoinJ by implementing the PeerEventListener interface.

The OnTransaction will be called every time a new Transaction is broadcast out and received from a Peer.

Pelle

Posted 2013-03-05T00:10:04.337

Reputation: 156

moved to https://bitcoinj.github.io/

jordiburgos 2017-11-24T14:10:38.767

1

Beginning with v0.8.2 of the Bitcoin-Qt/bitcoind client is -walletnotify option that can run a process when a transaction that affects the wallet is seen.

Stephen Gornick

Posted 2013-03-05T00:10:04.337

Reputation: 26 118