Skip to content

Commit 72d6c36

Browse files
author
Naohiro Yoshida
committed
fix comment
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
1 parent 7b9c901 commit 72d6c36

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

light-client/src/header/eth_headers.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl ETHHeaders {
126126
) -> Result<Option<&Epoch>, Error> {
127127
let hs: Vec<&ETHHeader> = self.all.iter().filter(|h| h.number >= checkpoint).collect();
128128
match current_epoch {
129-
// ex) t=200 then 200 <= h < 411 (c_val(200) can be borrowed by p_val)
129+
// ex) t=200 then 200 <= h < 411 (at least 1 honest c_val(200)' can be in p_val)
130130
Untrusted(_) => {
131131
// Ensure headers are before the next_checkpoint
132132
if hs.iter().any(|h| h.number >= next_checkpoint) {
@@ -137,7 +137,7 @@ impl ETHHeaders {
137137
}
138138
Ok(None)
139139
}
140-
// ex) t=201 then 201 <= h < 611 (n_val(400) can be borrowed by c_val(200))
140+
// ex) t=201 then 201 <= h < 611 (at least 1 honest n_val(400) can be in c_val(200))
141141
Trusted(_) => {
142142
// Get next_epoch if epoch after checkpoint ex) 400
143143
let next_epoch = match hs.iter().find(|h| h.is_epoch()) {
@@ -155,7 +155,6 @@ impl ETHHeaders {
155155
return Ok(None);
156156
}
157157

158-
// Ensure n_val(400) can be borrowed by c_val(200)
159158
let next_next_checkpoint = (epoch + 2) * BLOCKS_PER_EPOCH + next_epoch.checkpoint();
160159

161160
// Ensure headers are before the next_next_checkpoint

0 commit comments

Comments
 (0)