-
Notifications
You must be signed in to change notification settings - Fork 8
/
README
45 lines (31 loc) · 1.17 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
===
brc
===
Broadcaster component. Allows you to connect to Bitcoin nodes and
broadcast a transaction to them with feedback over ZMQ sockets.
Push transaction with REQ socket to port 9109.
Socket will respond back with either 1 (true) or 0 (fail).
Failure only happens because it couldn't deserialize the transaction data
before broadcasting.
Port 9110 will reply back with a message that has 3 frames:
[ tx_hash:32 ]
[ success:8 ] (little-endian, number of successes)
[ failure:8 ] (little-endian, number of failures)
The success and failures simply indicate whether the transaction got
delivered or not. It does not say anything about the validity of that
transaction.
If the transaction cannot be deserialized the daemon outputs "Bad stream"
but does nothing further.
You can change the ports in define.hpp
$ ./brc -h
INFO: Usage: brc [ZMQ_TRANSPORT] [CLIENT_CERTS_DIR]
INFO: Example: brc tcp://*:8989
INFO: An empty CLIENT_CERTS_DIR will accept all certificates.
INFO: See ZMQ manual for more info.
Simple invocation:
$ ./brc
For testing see the test/ subdirectory.
$ cd test/
$ python listen.py &
$ python poke.py
And watch the output of the brc terminal.