Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support non-clean shutdown #155

Merged
merged 17 commits into from
Sep 1, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix off by one
  • Loading branch information
rachel-bousfield committed Aug 22, 2022
commit 04e3b830f9c4aaa9edc3c6099a5eafffb43f5364
6 changes: 3 additions & 3 deletions core/blockchain_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ func (bc *BlockChain) FindRetentionBound() uint64 {
}

// binary search on the interval [a, b] for the first insufficiently old block
a := timeBound
a := timeBound + 1
b := heightBound
for a != b {
mid := a/2 + b/2
age := current.Time() - bc.GetBlockByNumber(mid).Time()
if age < minimumAge {
b = mid
} else {
a = mid
a = mid + 1
}
}
return current.NumberU64() - a + 1
return current.NumberU64() - a
}