mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-10 10:05:10 -05:00
@@ -839,7 +839,7 @@ class Blockchain:
|
||||
return Err.WRONG_PUZZLE_HASH
|
||||
|
||||
# Verify conditions, create hash_key list for aggsig check
|
||||
hash_key_pairs = set()
|
||||
hash_key_pairs = []
|
||||
for npc in npc_list:
|
||||
unspent = removal_coin_records[npc.coin_name]
|
||||
error = blockchain_check_conditions_dict(
|
||||
@@ -847,7 +847,7 @@ class Blockchain:
|
||||
)
|
||||
if error:
|
||||
return error
|
||||
hash_key_pairs.update(
|
||||
hash_key_pairs.extend(
|
||||
hash_key_pairs_for_conditions_dict(npc.condition_dict, npc.coin_name)
|
||||
)
|
||||
|
||||
@@ -855,7 +855,7 @@ class Blockchain:
|
||||
# TODO: move this to pre_validate_blocks_multiprocessing so we can sync faster
|
||||
if not block.header.data.aggregated_signature:
|
||||
return Err.BAD_AGGREGATE_SIGNATURE
|
||||
if not block.header.data.aggregated_signature.validate(list(hash_key_pairs)):
|
||||
if not block.header.data.aggregated_signature.validate(hash_key_pairs):
|
||||
return Err.BAD_AGGREGATE_SIGNATURE
|
||||
|
||||
return None
|
||||
|
||||
@@ -276,7 +276,7 @@ class MempoolManager:
|
||||
continue
|
||||
|
||||
# Verify conditions, create hash_key list for aggsig check
|
||||
hash_key_pairs = set()
|
||||
hash_key_pairs = []
|
||||
error: Optional[Err] = None
|
||||
for npc in npc_list:
|
||||
coin_record: CoinRecord = removal_record_dict[npc.coin_name]
|
||||
@@ -301,17 +301,18 @@ class MempoolManager:
|
||||
added_to_potential = True
|
||||
potential_error = error
|
||||
break
|
||||
more_pairs = hash_key_pairs_for_conditions_dict(
|
||||
npc.condition_dict, npc.coin_name
|
||||
)
|
||||
hash_key_pairs.update(more_pairs)
|
||||
|
||||
hash_key_pairs.extend(
|
||||
hash_key_pairs_for_conditions_dict(
|
||||
npc.condition_dict, npc.coin_name
|
||||
)
|
||||
)
|
||||
if error:
|
||||
errors.append(error)
|
||||
continue
|
||||
|
||||
# Verify aggregated signature
|
||||
if not new_spend.aggregated_signature.validate(list(hash_key_pairs)):
|
||||
if not new_spend.aggregated_signature.validate(hash_key_pairs):
|
||||
return None, MempoolInclusionStatus.FAILED, Err.BAD_AGGREGATE_SIGNATURE
|
||||
|
||||
# Remove all conflicting Coins and SpendBundles
|
||||
|
||||
Reference in New Issue
Block a user