diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-02 16:44:57 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-02 16:44:57 +0000 |
| commit | cc21a1db50c14c0c41986e9137432e5ba8918b2d (patch) | |
| tree | 2a8c1aed3746395c493b91de314b360678abf90b /src | |
| parent | e3cc976ae3f211727e3fae702776aacca46efb0c (diff) | |
net: gate the dropped-send line on the category of the send it drops
2661de1 said all the "sending: " emission sites agree on the category.
There is a fourth, and it did not: EndMessage()'s -dropmessagestest path
hardcoded "net", so under plain -debug a dropped tx announced its own drop
while the "sending: tx" it interrupts was gated off under "relay". The
knob is test-only, so nothing operational rode on it, but the claim was
false as written.
Derive it from SendLogCategory() like the other three. nPushPos may be -1
at this point, and GetMessageCommand() returns "" there, so the category
is "net" exactly as before when there is no message in progress.
Diffstat (limited to 'src')
| -rw-r--r-- | src/net.h | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -841,7 +841,11 @@ public: | |||
| 841 | extern int nDropMessagesTest; | 841 | extern int nDropMessagesTest; |
| 842 | if (nDropMessagesTest > 0 && GetRand(nDropMessagesTest) == 0) | 842 | if (nDropMessagesTest > 0 && GetRand(nDropMessagesTest) == 0) |
| 843 | { | 843 | { |
| 844 | if (LogAcceptsCategory("net")) printf("dropmessages DROPPING SEND MESSAGE\n"); | 844 | // Same category as the "sending: " this line interrupts, so a tx |
| 845 | // does not announce its own drop under "net" having been gated | ||
| 846 | // off under "relay". nPushPos can be -1 here, and then | ||
| 847 | // GetMessageCommand() returns "" and this is "net" as before. | ||
| 848 | if (LogAcceptsCategory(SendLogCategory())) printf("dropmessages DROPPING SEND MESSAGE\n"); | ||
| 845 | AbortMessage(); | 849 | AbortMessage(); |
| 846 | return; | 850 | return; |
| 847 | } | 851 | } |