2021-05-3 - Breaking API and behaviour changes
over 4 years ago by Richard Holland
Hooks testnet build 0a1cb3f175414a5a7bb1b6b4c4646c04
API Changes
emitnow takes awrite_ptrandwrite_lenparameter pair at the start of the paramaters. This must be at least 32 bytes and will be populated with the canonical hash of the emitted transaction.hookandcbaknow take auint32_tas the sole parameter. Incbakthis is1when the emitted txn has failed to be accepted beforesfLastLedgerSeqwhen0the emitted txn was accepted.
Behaviour Changes
- Emitted transactions that are successfully passed to
emitbut subsequently fail to be incorporated into a ledger beforesfLastLedgerSequenceexpires are now cleaned up by attEMIT_FAILUREpseudotransaction. ttEMIT_FAILUREalso triggerscbak(1)on the emitting hook. Note the previously reserved parameter to callback is now used to signal that an emitted transaction failed.0= success1= failure.- Maximum number of emitted transactions in a chain of emitted transactions (i.e. where one emitted txn emits another txn) is now 10.
sfLastLedgerSeqfor emitted transactions must be 5 more than the current ledger.