Commit 4e6f844
refactor: collapse spork signer recovery to one ECDSA op, restore peer info in logs
- Replace IsSporkValid() with GetValidSporkSigner() returning std::optional<CKeyID>
so the recovered signer key flows directly into ProcessSpork. This drops the
ECDSA RecoverCompact() count per inbound spork from three to one (was: once in
IsSporkValid, twice in ProcessSpork via has_value() + value()).
- ProcessSpork now takes the validated CKeyID as a parameter, removing the
unreachable defensive check that was added in 6a4ee52 to replace the original
assert.
- ProcessSpork takes a peer_log_suffix string_view so the "SPORK -- hash:..."
seen/updated/new-signer/new log lines include peer info again (was lost when
ProcessSpork stopped taking NodeId).
- Tighten ActiveSporks() doc comment to describe what it returns rather than
what it "handles".
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 6a4ee52 commit 4e6f844
3 files changed
Lines changed: 23 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5469 | 5469 | | |
5470 | 5470 | | |
5471 | 5471 | | |
5472 | | - | |
| 5472 | + | |
| 5473 | + | |
5473 | 5474 | | |
5474 | 5475 | | |
5475 | 5476 | | |
5476 | | - | |
| 5477 | + | |
5477 | 5478 | | |
5478 | 5479 | | |
5479 | 5480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 145 | + | |
| 146 | + | |
151 | 147 | | |
152 | 148 | | |
153 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| 252 | + | |
252 | 253 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
257 | 258 | | |
258 | | - | |
| 259 | + | |
| 260 | + | |
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
262 | | - | |
| 264 | + | |
| 265 | + | |
263 | 266 | | |
264 | 267 | | |
265 | 268 | | |
| |||
0 commit comments