Bitcoin Forum
July 08, 2024, 02:33:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: help propagation transactions - source code question  (Read 445 times)
iacz489 (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
March 24, 2014, 07:47:44 PM
 #1

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.
iacz489 (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
March 24, 2014, 08:13:09 PM
 #2

https://bitcointalk.org/index.php?topic=197323.0
This thread reply should help clarify my question. What I am looking for is code part that deals with relay of unconfirmed transaction.
zvs
Legendary
*
Offline Offline

Activity: 1680
Merit: 1000


https://web.archive.org/web/*/nogleg.com


View Profile WWW
March 25, 2014, 09:40:40 AM
 #3

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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!