Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Update threads in coding.txt #1730

Merged
merged 2 commits into from
Jun 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 38 additions & 22 deletions doc/coding.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,40 +60,56 @@ and its cs_KeyStore lock for example).
-------
Threads

StartNode : Starts other threads.
ThreadAppInit2: Initializes Gridcoin. (grc-appinit2)

ThreadGetMyExternalIP : Determines outside-the-firewall IP address,
sends addr message to connected peers when it determines it.
ThreadFlushWalletDB: Close the wallet.dat file if it hasn't been used (grc-wallet)
in 500ms.

ThreadIRCSeed : Joins IRC bootstrapping channel, watching for new
peers and advertising this node's IP address.
StartNode : Starts other network threads. (grc-start)

ThreadSocketHandler : Sends/Receives data from peers on port 8333.
ThreadGetMyExternalIP : Determines outside-the-firewall IP address, (grc-ext-ip)
sends addr message to connected peers when
it determines it.

ThreadMessageHandler : Higher-level message handling (sending and
receiving).
ThreadDNSAddressSeed : Loads addresses of peers from the DNS. (grc-dnsseed)

ThreadOpenConnections : Initiates new connections to peers.
ThreadMapPort : Universal plug-and-play startup/shutdown. (grc-UPnP)

ThreadTopUpKeyPool : replenishes the keystore's keypool.
ThreadSocketHandler : Sends/Receives data from peers on port 8333. (grc-net)

ThreadCleanWalletPassphrase : re-locks an encrypted wallet after user
has unlocked it for a period of time.
ThreadOpenAddedConnections: Opens network connections to added nodes. (grc-opencon)

SendingDialogStartTransfer : used by pay-via-ip-address code (obsolete)
ThreadOpenConnections : Initiates new connections to peers. (grc-opencon)

ThreadMessageHandler : Higher-level message handling (sending and receiving). (grc-msghand)

ThreadDelayedRepaint : repaint the gui
ThreadDumpAddress : Saves peers to peers.dat (grc-adrdump)

ThreadFlushWalletDB : Close the wallet.dat file if it hasn't been used
in 500ms.
ThreadStakeMiner : Generates Gridcoins. (grc-stake-miner)

ThreadScraper : Pulls statistics from project servers.
Mutually exclusive with NeuralNetwork

ThreadRPCServer : Remote procedure call handler, listens on port 8332
for connections and services them.
NeuralNetwork : Generates superblocks.
Mutually exclusive with ThreadScraper

ThreadBitcoinMiner : Generates bitcoins
ThreadRPCServer : Remote procedure call handler, listens on port 8332
for connections and services them.

ThreadTopUpKeyPool : Replenishes the keystore's keypool. (grc-key-top)

ThreadCleanWalletPassphrase : Re-locks an encrypted wallet after user (grc-lock-wa)
has unlocked it for a period of time.

ThreadMapPort : Universal plug-and-play startup/shutdown
CScheduler : Schedules tasks.

Shutdown : Does an orderly shutdown of everything
ipcThread : Scans to check if a URI (gridcoin:) is used. (grc-gui-ipc)

ExitTimeout : Windows-only, sleeps 5 seconds then exits application
Shutdown : Does an orderly shutdown of everything. (grc-shutoff)

----------------
Snapshot Threads

SnapshotDownloadThread: Downloads the snapshot from gridcoin.us. (grc-snapshotdl)

SnapshotExtractThread : Extracts the downloaded snapshot. (grc-snapshotex)