Which part of code (function) handles received transactions?

1

I was trying to understand the flow of control between functions (operations performed and their order) when a transaction is received.

somesh

Posted 2014-10-17T18:52:36.603

Reputation: 397

When any transaction is recieved, or just when you recieve a transaction that pays to you?Nick ODell 2014-10-20T22:02:17.057

In both case, which functions will be called ? and in what order?somesh 2014-10-21T19:00:08.703

Answers

1

Any transaction

main.cpp, AcceptToMemoryPool:

bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
                        bool* pfMissingInputs, bool fRejectInsaneFee)

A transaction that pays to or from you

wallet.cpp, CWallet::AddToWallet:

bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)

Nick ODell

Posted 2014-10-17T18:52:36.603

Reputation: 26 536

can you please explain the arguments passed ?somesh 2014-10-21T19:31:41.133

@somesh Could you explain why you want to know? I initially assumed that you wanted to instrument the code somehow.Nick ODell 2014-10-22T02:13:53.263