mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-21 08:31:52 +03:00
remove run_program, move hash to util
This commit is contained in:
parent
e49e1a1f6c
commit
84a51ee87a
10
src/util/Hash.py
Normal file
10
src/util/Hash.py
Normal file
@ -0,0 +1,10 @@
|
||||
import blspy
|
||||
|
||||
from src.types.sized_bytes import bytes32
|
||||
|
||||
|
||||
def std_hash(b) -> bytes32:
|
||||
"""
|
||||
The standard hash used in many places.
|
||||
"""
|
||||
return bytes32(blspy.Util.hash256(bytes(b)))
|
@ -17,7 +17,7 @@ from src.util.consensus import conditions_dict_for_solution
|
||||
import time
|
||||
|
||||
from src.util.ints import uint64
|
||||
from src.util.run_program import run_program
|
||||
from clvm import run_program
|
||||
|
||||
|
||||
def mempool_assert_coin_consumed(
|
||||
|
@ -1,3 +0,0 @@
|
||||
import clvm
|
||||
|
||||
run_program = clvm.run_program
|
@ -20,7 +20,7 @@ from src.types.hashable.Program import Program
|
||||
# contract:
|
||||
# generate puzzle: (() . puzzle_parameters)
|
||||
# generate solution: (1 . (puzzle_parameters . solution_parameters))
|
||||
from src.util.run_program import run_program
|
||||
from clvm import run_program
|
||||
|
||||
|
||||
def make_contract():
|
||||
|
@ -18,7 +18,7 @@ import hashlib
|
||||
from clvm_tools import binutils
|
||||
|
||||
from src.types.hashable.Program import Program
|
||||
from src.util.run_program import run_program
|
||||
from clvm import run_program
|
||||
|
||||
from .load_clvm import load_clvm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user