Skip to content

Commit 27a4609

Browse files
authored
fix: panic in mpool selection (#6325)
1 parent 7e9af82 commit 27a4609

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343

4444
### Fixed
4545

46+
- [#6325](https://github.com/ChainSafe/forest/pull/6325) Fixed a panic that could occur under certain message pool conditions and the `Filecoin.MpoolSelect` RPC method.
47+
4648
## Forest v0.30.4 "DeLorean"
4749

4850
This is a non-mandatory release that fixes a chain sync issue that is caused by time traveling block(s).

src/message_pool/msgpool/selection.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,8 @@ where
545545
if chains[i].cmp_effective(&chains[i + 1]) == Ordering::Greater {
546546
break;
547547
}
548+
chains.key_vec.swap(i, i + 1);
548549
}
549-
550-
chains.key_vec.swap(i, i + 1);
551550
}
552551

553552
// select the next (valid and fitting) chain and its dependencies for inclusion

0 commit comments

Comments
 (0)