Repository navigation
Commit a6ec360
authored
refactor(auth): audit reads the link a checkpoint signs in one place (#589)
Part of #544
The audit module built a `ChainLink { position: checkpoint.position,
hash: checkpoint.head }` by hand in five places: the public checkpoints
route, the sealer's starting point, a checkpoint's own check, the
dashboard's audit page and the verification's anchor.
`Chain::signed(&Checkpoint)`, beside `extend` and `point` on the `Chain`
trait, now builds it once. `Checkpoint` and `ChainLink` both live in the
repository crate, so the conversion is a method of the audit module's
own trait rather than a `From`.
- Tests merged or removed: none.
- Files edited outside the Operations area: none.
- Proof that behaviour is unchanged: each replaced literal copied the
same two fields, so the change is mechanical. `just db test` passes in
full, 497 of 497, including the 26 `audit::` tests that cover sealing,
verification, pruning and both checkpoint routes.
Checks: `just fmt`, `cargo clippy` with and without `--all-features`
(`-D warnings`), `cargo doc -D warnings`, `just db test`.
> [!NOTE]
> Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus
5.5 (via T3 Code)
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent 4a5336b commit a6ec360
4 files changed
Lines changed: 16 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
| |||
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
154 | 164 | | |
155 | 165 | | |
156 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 75 | + | |
80 | 76 | | |
81 | 77 | | |
82 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 195 | + | |
199 | 196 | | |
200 | 197 | | |
201 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 65 | + | |
69 | 66 | | |
70 | 67 | | |
71 | 68 | | |
| |||
202 | 199 | | |
203 | 200 | | |
204 | 201 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 202 | + | |
212 | 203 | | |
213 | 204 | | |
214 | 205 | | |
| |||
263 | 254 | | |
264 | 255 | | |
265 | 256 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 257 | + | |
270 | 258 | | |
271 | 259 | | |
272 | 260 | | |
| |||
0 commit comments