Commit 4f1d415
committed
graph: Fix silent truncation in BlockPtr::from(BlockWrapper)
Use From<(B256, u64)> which has proper i32::try_from().unwrap()
overflow checking instead of direct `as i32` cast that silently
truncates.1 parent e2a4704 commit 4f1d415
2 files changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1152 | 1152 | | |
1153 | 1153 | | |
1154 | 1154 | | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
| 1155 | + | |
1159 | 1156 | | |
1160 | 1157 | | |
1161 | 1158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
0 commit comments