From 18059fc557b02fafd3f22817b339a732b722ec1e Mon Sep 17 00:00:00 2001 From: liyukun Date: Thu, 14 Mar 2024 15:53:00 +0800 Subject: [PATCH] bug: fix a payment check bug in mutant --- contracts/spore/src/entry.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contracts/spore/src/entry.rs b/contracts/spore/src/entry.rs index 697789f..86e825e 100644 --- a/contracts/spore/src/entry.rs +++ b/contracts/spore/src/entry.rs @@ -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;