Author

Topic: help propagation transactions - source code question (Read 467 times)

zvs
legendary
Activity: 1680
Merit: 1000
https://web.archive.org/web/*/nogleg.com
main.cpp, and I guess you'd be looking at the stuff below

        // Resend wallet transactions that haven't gotten in a block yet
        // Except during reindex, importing and IBD, when old wallet
        // transactions become unconfirmed and spams other nodes.

and

        //
        // Message: inventory
        //

^^ decides whether or not to broadcast transactions
newbie
Activity: 7
Merit: 0
https://bitcointalksearch.org/topic/how-are-unconfirmed-transactions-relayed-197323
This thread reply should help clarify my question. What I am looking for is code part that deals with relay of unconfirmed transaction.
newbie
Activity: 7
Merit: 0
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.
Jump to: