Skip to content

Commit

Permalink
bug: fix a payment check bug in mutant
Browse files Browse the repository at this point in the history
  • Loading branch information
liyukun committed Mar 14, 2024
1 parent e5f046d commit 18059fc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions contracts/spore/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,8 @@ fn check_payment(
if args.len() < MUTANT_ID_WITH_PAYMENT_LEN {
return Err(Error::InvalidExtensionPaymentFormat);
}
// we need a payment
let self_lock_hash = load_cell_lock_hash(0, GroupOutput)?;
let mutant_lock_hash = load_cell_lock_hash(mutant_index, CellDep)?;

let input_capacity = calc_capacity_sum(&self_lock_hash, Input);
let input_capacity = calc_capacity_sum(&mutant_lock_hash, Input);
let output_capacity = calc_capacity_sum(&mutant_lock_hash, Output);
let minimal_payment = {
let range = MUTANT_ID_LEN..MUTANT_ID_WITH_PAYMENT_LEN;
Expand Down

0 comments on commit 18059fc

Please sign in to comment.