Commit 1f88013
authored
feat(sync): short-hex Debug for peer from (#98)
## Description
Remote peer identity in `Debug` for `InsertOrigin::Sync` and
`Event::RemoteInsert` was printed as a `[u8; 32]` integer list, unlike
other logs that use compact hex. This switches those fields to
`derive_more::Debug` with `hex::encode` of the **first 5 bytes**,
matching `iroh_base::PublicKey::fmt_short()` / `EndpointId` logging
style.
Also updates the `PeerIdBytes` doc line to refer to **`EndpointId`**,
and refreshes the TODO to suggest `iroh::EndpointId` (re-exported from
`iroh-base`) instead of outdated `PeerId` / `iroh-net` wording.
## Breaking Changes
None.
## Notes & open questions
Using `iroh::EndpointId` instead of `PeerIdBytes` (`[u8; 32]`) would be
a breaking public API change but give us stronger typing, validation and
built-in helpers (`fmt_short`, etc.). Happy to open a follow-up PR with
that.
## Change checklist
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [x] All breaking changes documented.1 parent 722c200 commit 1f88013
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | | - | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
0 commit comments