Commit 88121b0
committed
Merge #6910: perf: bail out in RelayInvFiltered early if !CanRelay
a425211 perf: bail out in RelayInvFiltered early if !CanRelay (pasta)
Pull request description:
## Issue being fixed or feature implemented
m_peer_mutex, acquired in GetPeerRef, is relatively highly contended. Move the pnode->CanRelay up higher to bail out early if possible and avoid the need to acquire m_peer_mutex.
## What was done?
## How Has This Been Tested?
Builds
## Breaking Changes
## Checklist:
_Go over all the following points, and put an `x` in all the boxes that apply._
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK a425211
Tree-SHA512: bdeb868ace02c0ef27a8048fa3172847d88cf51392c8d8180b4ea08465a12f3f5248917fbdcd4be6c8ab8f6ad10c05b2a2c9af42ab1586a58a6142ab7788d0f51 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2406 | 2406 | | |
2407 | 2407 | | |
2408 | 2408 | | |
| 2409 | + | |
| 2410 | + | |
2409 | 2411 | | |
2410 | 2412 | | |
2411 | 2413 | | |
2412 | 2414 | | |
2413 | | - | |
| 2415 | + | |
2414 | 2416 | | |
2415 | 2417 | | |
2416 | 2418 | | |
| |||
0 commit comments