move std hash to util
This commit is contained in:
parent
7e0677c94e
commit
0943af63bb
|
@ -23,7 +23,7 @@ from src.types.challenge import Challenge
|
||||||
from src.types.full_block import FullBlock
|
from src.types.full_block import FullBlock
|
||||||
from src.types.hashable.Coin import Coin
|
from src.types.hashable.Coin import Coin
|
||||||
from src.types.hashable.BLSSignature import BLSSignature
|
from src.types.hashable.BLSSignature import BLSSignature
|
||||||
from src.types.hashable.Hash import std_hash
|
from src.util.Hash import std_hash
|
||||||
from src.types.hashable.SpendBundle import SpendBundle
|
from src.types.hashable.SpendBundle import SpendBundle
|
||||||
from src.types.hashable.Program import Program
|
from src.types.hashable.Program import Program
|
||||||
from src.types.header import Header, HeaderData
|
from src.types.header import Header, HeaderData
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
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)))
|
|
|
@ -6,7 +6,7 @@ from clvm.serialize import sexp_from_stream, sexp_to_stream
|
||||||
from clvm.subclass_sexp import BaseSExp
|
from clvm.subclass_sexp import BaseSExp
|
||||||
|
|
||||||
from src.types.sized_bytes import bytes32
|
from src.types.sized_bytes import bytes32
|
||||||
from .Hash import std_hash
|
from src.util.Hash import std_hash
|
||||||
|
|
||||||
SExp = to_sexp_f(1).__class__
|
SExp = to_sexp_f(1).__class__
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from src.types.hashable.Hash import std_hash
|
from src.util.Hash import std_hash
|
||||||
from src.util.Conditions import conditions_by_opcode
|
from src.util.Conditions import conditions_by_opcode
|
||||||
from src.util.consensus import (
|
from src.util.consensus import (
|
||||||
conditions_for_solution,
|
conditions_for_solution,
|
||||||
|
|
Loading…
Reference in New Issue