If node is configured to avoid full block downloads, this will determine if we should skip downloading from this peer (for now)
| 5955 | // If node is configured to avoid full block downloads, |
| 5956 | // this will determine if we should skip downloading from this peer (for now) |
| 5957 | bool WillDownloadFromNode(CNode* pto, const ThinBlockWorker& worker) { |
| 5958 | |
| 5959 | // We always download full blocks during initial sync. |
| 5960 | if (IsInitialBlockDownload()) |
| 5961 | return true; |
| 5962 | |
| 5963 | // We don't mind full blocks. |
| 5964 | if (!Opt().UsingThinBlocks()) |
| 5965 | return true; |
| 5966 | |
| 5967 | if (!Opt().AvoidFullBlocks()) |
| 5968 | return true; |
| 5969 | |
| 5970 | // We want to download thin blocks only. |
| 5971 | return pto->SupportsXThinBlocks() |
| 5972 | || NodeStatePtr(pto->id)->supportsCompactBlocks; |
| 5973 | } |
| 5974 | |
| 5975 | |
| 5976 | bool SendMessages(CNode* pto) |
no test coverage detected