mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-11-06 12:50:52 -04:00
Annotate debug_spend_bundle.py.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user