Commit 8eb3bd7
committed
Avoid parsing
`PublicKey` parsing is relatively expensive as we have to check if
the point is actually on the curve. To avoid it, our `NetworkGraph`
uses `NodeId`s which don't have the validity requirement.
Sadly, we were always parsing the broadcasting node's `PublicKey`
from the `node_id` in the network graph whenever we see an update
for that channel, whether we have a corresponding signature or not.
Here we fix this, only parsing the public key (and hashing the
message) if we're going to check a signature.PublicKeys when applying an unsigned chan update1 parent b5b6429 commit 8eb3bd7
2 files changed
+23
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2379 | 2379 | | |
2380 | 2380 | | |
2381 | 2381 | | |
2382 | | - | |
2383 | | - | |
| 2382 | + | |
| 2383 | + | |
2384 | 2384 | | |
2385 | 2385 | | |
2386 | 2386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2537 | 2537 | | |
2538 | 2538 | | |
2539 | 2539 | | |
2540 | | - | |
| 2540 | + | |
2541 | 2541 | | |
2542 | 2542 | | |
2543 | 2543 | | |
| |||
2556 | 2556 | | |
2557 | 2557 | | |
2558 | 2558 | | |
2559 | | - | |
2560 | | - | |
2561 | | - | |
2562 | | - | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
2563 | 2570 | | |
2564 | 2571 | | |
2565 | 2572 | | |
2566 | 2573 | | |
2567 | | - | |
2568 | 2574 | | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
2569 | 2584 | | |
2570 | 2585 | | |
2571 | 2586 | | |
| |||
0 commit comments