Annotate debug_spend_bundle.py.

This commit is contained in:
Amine Khaldi
2026-10-21 17:20:46 +01:00
parent a77897c2eb
commit 4c244e30ab
2 changed files with 6 additions and 4 deletions
+6 -3
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
from chia_rs import AugSchemeMPL
from chia_rs import AugSchemeMPL, SpendBundle
from chia_rs.sized_bytes import bytes32
from clvm.operators import KEYWORD_FROM_ATOM
from clvm_tools.binutils import disassemble as bu_disassemble
@@ -21,7 +22,7 @@ KFA = {v: k for k, v in CONDITIONS.items()}
# we may need also to save the `genesis_coin_mod` or its hash
def disassemble(sexp: Program):
def disassemble(sexp: Program) -> str:
"""
This version of `disassemble` also disassembles condition opcodes like `ASSERT_ANNOUNCEMENT_CONSUMED`.
"""
@@ -65,7 +66,9 @@ def uncurry_dump(puzzle: Program, prefix: str = "") -> None:
recursive_uncurry_dump(puzzle, 1, prefix, UncurriedPuzzle(mod, curried_args))
def debug_spend_bundle(spend_bundle, agg_sig_additional_data=DEFAULT_CONSTANTS.AGG_SIG_ME_ADDITIONAL_DATA) -> None:
def debug_spend_bundle(
spend_bundle: SpendBundle, agg_sig_additional_data: bytes32 = DEFAULT_CONSTANTS.AGG_SIG_ME_ADDITIONAL_DATA
) -> None:
"""
Print a lot of useful information about a `SpendBundle` that might help with debugging
its clvm.
-1
View File
@@ -12,7 +12,6 @@ chia.simulator.keyring
chia.simulator.wallet_tools
chia.ssl.create_ssl
chia.types.blockchain_format.program
chia.wallet.util.debug_spend_bundle
chia.wallet.util.new_peak_queue
chia.wallet.wallet_transaction_store
chia._tests.clvm.test_puzzles