mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-10 12:29:49 +03:00
Make SpendBundle.debug() use the default genesis challenge by default (#8431)
This commit is contained in:
parent
9d59079bfa
commit
e18a71376d
@ -6,6 +6,7 @@ from typing import List
|
||||
|
||||
from blspy import AugSchemeMPL, G2Element
|
||||
|
||||
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
||||
from chia.types.blockchain_format.coin import Coin
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.util.streamable import Streamable, dataclass_from_dict, recurse_jsonify, streamable
|
||||
@ -61,7 +62,7 @@ class SpendBundle(Streamable):
|
||||
def name(self) -> bytes32:
|
||||
return self.get_hash()
|
||||
|
||||
def debug(self, agg_sig_additional_data=bytes([3] * 32)):
|
||||
def debug(self, agg_sig_additional_data=DEFAULT_CONSTANTS.AGG_SIG_ME_ADDITIONAL_DATA):
|
||||
debug_spend_bundle(self, agg_sig_additional_data)
|
||||
|
||||
def not_ephemeral_additions(self):
|
||||
|
@ -7,6 +7,7 @@ from clvm_tools.binutils import disassemble as bu_disassemble
|
||||
from chia.types.blockchain_format.coin import Coin
|
||||
from chia.types.blockchain_format.program import Program, INFINITE_COST
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
||||
from chia.types.condition_opcodes import ConditionOpcode
|
||||
from chia.util.condition_tools import conditions_dict_for_solution, pkm_pairs_for_conditions_dict
|
||||
from chia.util.hash import std_hash
|
||||
@ -40,7 +41,7 @@ def dump_coin(coin: Coin) -> str:
|
||||
return disassemble(coin_as_program(coin))
|
||||
|
||||
|
||||
def debug_spend_bundle(spend_bundle, agg_sig_additional_data=bytes([3] * 32)) -> None:
|
||||
def debug_spend_bundle(spend_bundle, agg_sig_additional_data=DEFAULT_CONSTANTS.AGG_SIG_ME_ADDITIONAL_DATA) -> None:
|
||||
"""
|
||||
Print a lot of useful information about a `SpendBundle` that might help with debugging
|
||||
its clvm.
|
||||
|
Loading…
Reference in New Issue
Block a user