get mempool transactions of some bitcoin node?

1

1

May I connect to any bitcoin core node, for example, this node 119.23.63.114:8333 using telnet and get its mempool transactions or even broadcast some transaction?

I've read that section https://bitcoin.org/en/developer-reference#mempool but can somebody give an example?

Adam

Posted 2018-04-22T09:54:01.283

Reputation: 3 215

Answers

3

No, you cannot use telnet. You will need to use a software that can speak the Bitcoin Peer-to-Peer protocol. There is no easy command line way to do this with the typical utilities, you need to have your own software. Note that you cannot just send the message to the node, you will need to perform the connection handshake as well.

You can use the Python Bitcoin library to write a python script that does what you need.

For sending a raw transaction over the P2P network, you can use the submittx tool.

Andrew Chow

Posted 2018-04-22T09:54:01.283

Reputation: 40 910