The callback function of your hook
cbak
is a user defined function called by xahaud
in order to inform your hook about the status of a previously emitted transaction
State changes and further emit calls can be made from cbak but it cannot rollback
a transaction.
When cbak is executed the emitted transaction to which the callback relates is now the originating transaction.
C
C
what
uint32_t
if 0
:
- the emittted transaction to which this callback relates was successfully accepted into a ledger.
If 1
- the emitted transaction to which the callback relates was NOT successfully accepted into a ledger before it expired.
int64_t
An arbitrary return code you wish to return from your hook. This will be present in the metadata of the originating transaction.
The main function of your hook
hook
is a user defined function called by xahaud
in order to fire your hook.
Your hook
function calls either accept
or reject
to pass or reject the originating transaction.
If execution reaches the end of the function it is implicitly an accept
.
C
C
reserved
uint32_t
Reserved for future use.
int64_t
An arbitrary return code you wish to return from your hook. This will be present in the metadata of the originating transaction.