Bitcoin Forum
September 27, 2018, 10:52:28 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: help propagation transactions - source code question  (Read 357 times)
iacz489
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.
1538088748
Hero Member
*
Offline Offline

Posts: 1538088748

View Profile Personal Message (Offline)

Ignore
1538088748
Reply with quote  #2

1538088748
Report to moderator
1538088748
Hero Member
*
Offline Offline

Posts: 1538088748

View Profile Personal Message (Offline)

Ignore
1538088748
Reply with quote  #2

1538088748
Report to moderator
1538088748
Hero Member
*
Offline Offline

Posts: 1538088748

View Profile Personal Message (Offline)

Ignore
1538088748
Reply with quote  #2

1538088748
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1538088748
Hero Member
*
Offline Offline

Posts: 1538088748

View Profile Personal Message (Offline)

Ignore
1538088748
Reply with quote  #2

1538088748
Report to moderator
1538088748
Hero Member
*
Offline Offline

Posts: 1538088748

View Profile Personal Message (Offline)

Ignore
1538088748
Reply with quote  #2

1538088748
Report to moderator
1538088748
Hero Member
*
Offline Offline

Posts: 1538088748

View Profile Personal Message (Offline)

Ignore
1538088748
Reply with quote  #2

1538088748
Report to moderator
iacz489
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: 1596
Merit: 1000


House Nogleg


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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!