Skip to content

Commit 8072857

Browse files
author
Seulgi Kim
committed
Use proper names instead of 1 character name for variables
1 parent 1d4a25d commit 8072857

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

types/src/transaction/action.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,14 +1180,14 @@ fn verify_input_and_output_consistent_with_order(
11801180
Ok(())
11811181
}
11821182

1183-
fn is_ratio_equal(a: u64, b: u64, c: u64, d: u64) -> bool {
1184-
// a:b = c:d
1185-
u128::from(a) * u128::from(d) == u128::from(b) * u128::from(c)
1183+
fn is_ratio_equal(from: u64, fee: u64, spent: u64, fee_given: u64) -> bool {
1184+
// from:fee = spent:fee_given
1185+
u128::from(from) * u128::from(fee_given) == u128::from(fee) * u128::from(spent)
11861186
}
11871187

1188-
fn is_ratio_greater_or_equal(a: u64, b: u64, c: u64, d: u64) -> bool {
1189-
// a:b <= c:d
1190-
u128::from(a) * u128::from(d) >= u128::from(b) * u128::from(c)
1188+
fn is_ratio_greater_or_equal(from: u64, to: u64, spent: u64, output: u64) -> bool {
1189+
// from:to <= spent:output
1190+
u128::from(from) * u128::from(output) >= u128::from(to) * u128::from(spent)
11911191
}
11921192

11931193
#[cfg(test)]

0 commit comments

Comments
 (0)