Commit f5741cd
committed
Refactor NodeKeyFactory to improve key derivation logic
- Updated the `NodeKeyFactory` to use a constant for the uncompressed public key prefix length, enhancing code readability and maintainability.
- Adjusted the logic for deriving the `enode` to utilize the new constant, ensuring consistency across the implementation.
- Modified tests in `node-key-factory.test.ts` to reflect the changes in the key derivation process and validate the correct behavior of the `enode` field.
This refactor aims to streamline the key generation process and improve the clarity of the codebase.1 parent 995e11c commit f5741cd
2 files changed
Lines changed: 26 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| |||
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
17 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
18 | 30 | | |
19 | | - | |
| 31 | + | |
20 | 32 | | |
21 | 33 | | |
22 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
11 | 21 | | |
12 | 22 | | |
13 | 23 | | |
| |||
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
32 | | - | |
33 | | - | |
| 42 | + | |
| 43 | + | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
| |||
0 commit comments