Write the contents of a slot to the XRPLD trace log

Behaviour

  • Serialize the object currently occupying the specified slot
  • Write the serialized version of the object as hex to the trace log along with a message (if any)

Definition

int64_t trace_slot (
    uint32_t mread_ptr,
    uint32_t mread_len,
    uint32_t slot_no
);

Example

#define SBUF(str) (uint32_t)(str), sizeof(str)
trace_slot(SBUF("Slot one contained"), 1);

Parameters

Name

Type

Description

rmead_ptr

uint32_t

Pointer to a message to output before the hex-encoded serialized object found in the slot. May be null.

mread_len

uint32_t

Length of the message. May be null.

slot_no

uint32_t

The slot number.

Return Code

Type

Description

int64_t

0 if successful

If negative, an error:
OUT_OF_BOUNDS

  • pointers/lengths specified outside of hook memory.

DOESNT_EXIST

  • slot was not occupied or was invalid