pub fn accept(msg: &[u8], error_code: i64) -> !
Expand description
Accept the originating transaction and commit any changes the hook made
ยงExample
You can use a byte string to return a message
accept(b"accept.rs: Finished.", line!().into());
You can also return any forms of bytes, like:
let txn_hash = match emit(&xrp_payment_txn) {
Ok(hash) => hash,
Err(err) => {
rollback(b"could not emit xrp payment txn", err.into());
}
};
accept(&txn_hash, 0);