From facd7b53876f4c2fd5ca661faf888e37fd606939 Mon Sep 17 00:00:00 2001 From: Matthew Howard Date: Tue, 23 Jul 2024 16:00:55 +0100 Subject: [PATCH] fix final pytest --- crates/chia-consensus/src/multiprocess_validation.rs | 1 - tests/test_blscache.py | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/chia-consensus/src/multiprocess_validation.rs b/crates/chia-consensus/src/multiprocess_validation.rs index 9ffad7f52..6deadde33 100644 --- a/crates/chia-consensus/src/multiprocess_validation.rs +++ b/crates/chia-consensus/src/multiprocess_validation.rs @@ -47,7 +47,6 @@ pub fn validate_clvm_and_signature( let npcresult = get_name_puzzle_conditions(spend_bundle, max_cost, true, height, constants) .map_err(|e| e.1)?; let iter = npcresult.spends.iter().flat_map(|spend| { - // let spend_clone = spend.clone(); let condition_items_pairs = [ (AGG_SIG_PARENT, &spend.agg_sig_parent), (AGG_SIG_PUZZLE, &spend.agg_sig_puzzle), diff --git a/tests/test_blscache.py b/tests/test_blscache.py index 394103cc0..d8d1b5af5 100644 --- a/tests/test_blscache.py +++ b/tests/test_blscache.py @@ -17,6 +17,7 @@ from typing import List from chia.util.hash import std_hash from chia.util.lru_cache import LRUCache +from chia.types.blockchain_format.program import Program as ChiaProgram from chia.util import cached_bls as cached_bls_old import pytest @@ -310,9 +311,9 @@ def test_validate_clvm_and_sig(): ) sol_bytes = bytes.fromhex( - "ffff32ffb0997cc43ed8788f841fcf3071f6f212b89ba494b6ebaf1bda88c3f9de9d968a61f3b7284a5ee13889399ca71a026549a2ff8568656c6c6f8080" + "ffff32ffb08578d10c07f5f086b08145a40f2b4b55f5cafeb8e6ed8c3c60e3ef92a66b608131225eb15d71fb32285bd7e1c461655fff8568656c6c6f8080" ) - # ((50 0x997cc43ed8788f841fcf3071f6f212b89ba494b6ebaf1bda88c3f9de9d968a61f3b7284a5ee13889399ca71a026549a2 "hello")) + # ((50 0x8578d10c07f5f086b08145a40f2b4b55f5cafeb8e6ed8c3c60e3ef92a66b608131225eb15d71fb32285bd7e1c461655f "hello")) solution = Program.from_bytes(sol_bytes) coin_spends = [CoinSpend(coin, puz_reveal, solution)] sk = AugSchemeMPL.key_gen( @@ -320,10 +321,9 @@ def test_validate_clvm_and_sig(): "52d75c4707e39595b27314547f9723e5530c01198af3fc5849d9a7af65631efb" ) ) - # pk = sk.get_g1() sig = AugSchemeMPL.sign( sk, - (b"hello" + coin.name() + DEFAULT_CONSTANTS.AGG_SIG_ME_ADDITIONAL_DATA), # noqa + (ChiaProgram.to("hello").as_atom() + coin.name() + DEFAULT_CONSTANTS.AGG_SIG_ME_ADDITIONAL_DATA), # noqa ) new_spend = SpendBundle(coin_spends, sig)