|
March 24, 2014, 07:47:44 PM |
|
I have some confusion when I study the transaction relay module in the source code. As part of protocol every bitcoin node helps relay valid transactions from others so that everyone's transaction can get received by some miner and confirmed. However, it looks pretty hard for me to find out what reaction is taken when a valid transaction comes to me, given I am not a miner. I expect to see codes that help relay these unconfirmed transactions to nodes I am connecting to, but I did not find clues in the source.
Right now I am only able to get to know the function RelayTransaction() defined in main.cpp and CTxMemPoolEntry which keeps transactions in memory. RelayTransaction() is called when "tx" message is sent as a response to a "getdata" message. But which code describes the part I help relay unconfirmed transactions for others? I need full understanding for this part to go with my research on synchronization issues in Bitcoin. Anyone who experienced BTC development helping me is particularly appreciated. Thanks.
|