i am running bitcoin-core on linux box i.e. i am running it as a node/daemon.
what i want is, new bitcoin transaction details as soon as they happen .
which of the following approach is best ?
1) running node myself and listen for trasnactions
2) get transaction details from 3rd party API like blockchain.info
3) listen to socket.io for bitcoin transactions. provided by blockexplorer.com
Best? That depends on what you want to do.
which one of the above is fast.
They are all fast. They are all faster than waiting for the transaction to be in a block in the blockchain and then scanning the blockchain.
i am asking this becuase, lets say
2 people has exact same private key of the same wallet and both are waiting for receiving new transaction , which one will get the first and why ?
The person that is connected to the most peer nodes is
more likely the hear about the transaction first.
The node that has the fewest hops between itself and the transaction sending node
will hear about the transaction first.
So, here are some examples:
The sender uses a blockchain.info wallet. Person A is using blockchain.info API. Person B is using a Bitcoin Core node behind a firewall that is only connected to one other node. That other node is not connected directly to any blockchain.info nodes. In this example Person A will most likely have access to the transaction sooner.
The sender uses a Bitcoin Core wallet that is not directly connected to any of blockchain.info's nodes. Person A is using blockchain.info API. Person B is using a Bitcoin Core node that is connected directly to a the sender's Bitcoin Core node. In this example, Person B will most likely have access to the transaction sooner.
thanks for your time.
You're welcome.