Skip to content

Commit 0073489

Browse files
nit
1 parent 92e519b commit 0073489

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

consensus/src/marshal/core/actor.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,8 @@ where
741741
}
742742
Message::Prune { height } => {
743743
// Only allow pruning at or below the current floor.
744-
if height > self.floor.processed_height_floor() {
745-
warn!(%height, floor = %self.floor.processed_height_floor(), "prune height above floor, ignoring");
744+
if height > self.floor.processed_height() {
745+
warn!(%height, floor = %self.floor.processed_height(), "prune height above floor, ignoring");
746746
return;
747747
}
748748

@@ -1080,10 +1080,10 @@ where
10801080
// This anchor cannot move the application sync point, but its
10811081
// finalization round can still prune round-bound resolver work.
10821082
// Keep pending acks intact because processed_height is unchanged.
1083-
if height <= self.floor.processed_height_floor() {
1083+
if height <= self.floor.processed_height() {
10841084
warn!(
10851085
%height,
1086-
existing = %self.floor.processed_height_floor(),
1086+
existing = %self.floor.processed_height(),
10871087
"floor not updated, at or below existing"
10881088
);
10891089
let finalization = self
@@ -1239,7 +1239,7 @@ where
12391239
if annotations
12401240
.iter()
12411241
.any(|annotation| matches!(annotation, Annotation::Certified { .. }))
1242-
&& height > self.floor.processed_height_floor()
1242+
&& height > self.floor.processed_height()
12431243
{
12441244
if let Some(bounds) = self.epocher.containing(height) {
12451245
self.cache
@@ -1257,7 +1257,7 @@ where
12571257
let Some(bounds) = self.epocher.containing(height) else {
12581258
debug!(
12591259
%height,
1260-
floor = %self.floor.processed_height_floor(),
1260+
floor = %self.floor.processed_height(),
12611261
"ignoring stale delivery"
12621262
);
12631263
response.send_lossy(true);
@@ -1266,7 +1266,7 @@ where
12661266
let Some(scheme) = self.get_scheme_certificate_verifier(bounds.epoch()) else {
12671267
debug!(
12681268
%height,
1269-
floor = %self.floor.processed_height_floor(),
1269+
floor = %self.floor.processed_height(),
12701270
"ignoring stale delivery"
12711271
);
12721272
response.send_lossy(true);
@@ -1306,7 +1306,7 @@ where
13061306
let Some(scheme) = self.get_scheme_certificate_verifier(round.epoch()) else {
13071307
debug!(
13081308
?round,
1309-
floor = %self.floor.processed_height_floor(),
1309+
floor = %self.floor.processed_height(),
13101310
"ignoring stale delivery"
13111311
);
13121312
response.send_lossy(true);
@@ -1725,10 +1725,10 @@ where
17251725
// Blocks below the last processed height are not useful to us, so we ignore them (this
17261726
// has the nice byproduct of ensuring we don't call a backing store with a block below the
17271727
// pruning boundary)
1728-
if height <= self.floor.processed_height_floor() {
1728+
if height <= self.floor.processed_height() {
17291729
debug!(
17301730
%height,
1731-
floor = %self.floor.processed_height_floor(),
1731+
floor = %self.floor.processed_height(),
17321732
?digest,
17331733
"dropping finalization at or below processed height floor"
17341734
);
@@ -1903,7 +1903,7 @@ where
19031903
}
19041904

19051905
let mut wrote = false;
1906-
let start = self.floor.processed_height_floor().next();
1906+
let start = self.floor.processed_height().next();
19071907

19081908
// If finalizations extend beyond the last stored block, anchor the
19091909
// trailing block so the gap repair loop below can walk backward from it.
@@ -1912,7 +1912,7 @@ where
19121912
.finalized_blocks
19131913
.last_index()
19141914
.is_some_and(|last| last >= last_finalized);
1915-
if last_finalized > self.floor.processed_height_floor() && !have_block {
1915+
if last_finalized > self.floor.processed_height() && !have_block {
19161916
// Get the finalization for the last finalized block.
19171917
let finalization = self
19181918
.get_finalization_by_height(last_finalized)
@@ -2034,7 +2034,7 @@ where
20342034
self.floor.set_processed_height(height);
20352035
let _ = self
20362036
.processed_height
2037-
.try_set(self.floor.processed_height_floor().get());
2037+
.try_set(self.floor.processed_height().get());
20382038

20392039
// Prune any existing requests below the new floor.
20402040
resolver.retain(handler::above_height_floor::<V::Commitment>(height));
@@ -2091,7 +2091,7 @@ where
20912091
PublicKey = <P::Scheme as CertificateScheme>::PublicKey,
20922092
>,
20932093
) {
2094-
if height > self.floor.processed_height_floor() || round <= self.floor.processed_round() {
2094+
if height > self.floor.processed_height() || round <= self.floor.processed_round() {
20952095
return;
20962096
}
20972097

consensus/src/marshal/core/floor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl<S: CertificateScheme, C: Digest> Floor<S, C> {
6666
}
6767
}
6868

69-
pub(super) const fn processed_height_floor(&self) -> Height {
69+
pub(super) const fn processed_height(&self) -> Height {
7070
match self.processed.height {
7171
Some(height) => height,
7272
None => Height::zero(),

0 commit comments

Comments
 (0)