Skip to content

Commit

Permalink
clean debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Mar 5, 2025
1 parent c79a8ba commit 37a31df
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
7 changes: 3 additions & 4 deletions counterparty-core/counterpartycore/lib/api/apiv1.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,9 @@ def create_method(**kwargs):
exceptions.BalanceError,
) as error:
# TypeError happens when unexpected keyword arguments are passed in
import traceback

print(traceback.format_exc())
error_msg = f"Error composing {tx} transaction via API: {str(error)} {traceback.format_exc()}"
# import traceback
# print(traceback.format_exc())
error_msg = f"Error composing {tx} transaction via API: {str(error)}"
logger.trace(error_msg)
raise JSONRPCDispatchException(
code=JSON_RPC_ERROR_API_COMPOSE, message=error_msg
Expand Down
5 changes: 2 additions & 3 deletions counterparty-core/counterpartycore/lib/cli/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ def run(self):
try:
self.run_server()
except Exception as e: # pylint: disable=broad-except
import traceback

print(traceback.format_exc())
# import traceback
# print(traceback.format_exc())
logger.error("Error in server thread: %s", e, stack_info=True)
_thread.interrupt_main()

Expand Down
4 changes: 0 additions & 4 deletions counterparty-core/counterpartycore/lib/messages/sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def compose(
flags,
memo_bytes,
)
logger.warning(f"data_content: {data}")
else:
data = messagetype.pack(ID)
data += struct.pack(FORMAT, short_address_bytes, flags)
Expand All @@ -113,7 +112,6 @@ def new_unpack(message):
"memo": memo_bytes,
}
except Exception as e: # pylint: disable=broad-exception-caught
logger.error(f"sweep unpack error: {e}")
raise exceptions.UnpackError("could not unpack") from e


Expand All @@ -137,7 +135,6 @@ def unpack(message):
# unpack address
full_address = address.unpack(short_address_bytes)
except struct.error as e:
logger.warning("sweep send unpack error: %s", e)
raise exceptions.UnpackError("could not unpack") from e

unpacked = {
Expand All @@ -156,7 +153,6 @@ def parse(db, tx, message):
# Unpack message.
try:
unpacked = unpack(message)
logger.warning("unpacked: %s", unpacked)
destination, flags, memo_bytes = (
unpacked["destination"],
unpacked["flags"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,10 @@ def compose(
short_address_bytes,
memo_bytes,
)
logger.warning(f"data1: {data}")
else:
data = messagetype.pack(ID)
data += struct.pack(FORMAT, asset_id, quantity, short_address_bytes)
data += memo_bytes
logger.warning(f"data2: {data}")

cursor.close()
# return an empty array as the second argument because we don't need to send BTC dust to the recipient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ def compose(
skip_validation: bool = False,
no_dispense: bool = False,
):
logger.warning("compose_send1")
cursor = db.cursor()

# Just send BTC?
Expand Down

0 comments on commit 37a31df

Please sign in to comment.