diff --git a/src/full_node/blockchain.py b/src/full_node/blockchain.py index 73b2a34072..d3816e6155 100644 --- a/src/full_node/blockchain.py +++ b/src/full_node/blockchain.py @@ -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 diff --git a/src/full_node/mempool_manager.py b/src/full_node/mempool_manager.py index 58c06302a9..cec87b6db3 100644 --- a/src/full_node/mempool_manager.py +++ b/src/full_node/mempool_manager.py @@ -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