Author

Topic: How to get instant message on new block in bitcoind (Read 1168 times)

full member
Activity: 149
Merit: 100
newbie
Activity: 3
Merit: 0
Hey,

I'm using nodejs & bitcoind. I would like nodejs to emit a message via websockets whenever a new block was found or a new tx was broadcasted. I know i could do that with the blockchain.info websocket API, but i would like to do it locally. The only way I can think of to emit every new block right when it reaches my Server would be an AJAX longpoll, since i dont know when I want to emit the newest block, because I dont know any way of getting the new block instantly.

Is there any way to emit a message every time a new block/tx is broadcasted to me?
Jump to: