validator/utils: fixed missmatched returned value in median()

This commit is contained in:
skoupidi
2026-02-11 15:06:41 +02:00
parent de5b7699c6
commit b4fa82cb3f

View File

@@ -196,10 +196,9 @@ pub fn median(mut v: Vec<u64>) -> u64 {
v.sort_unstable();
if v.len().is_multiple_of(2) {
v[n]
} else {
get_mid(v[n - 1], v[n])
return get_mid(v[n - 1], v[n])
}
v[n]
}
/// Given a proposal, find the index of a fork chain it extends, along with the specific