eos icon indicating copy to clipboard operation
eos copied to clipboard

why the notify_code has to process the same message?

Open ghost opened this issue 9 years ago • 2 comments

we notice that in process_message function in chain_controller.cpp, the same message is processed by the notify code. we can't understand it.

" process_message(trx, notify_code, message, output.notify.back().output, &apply_ctx); "

why the notify_code has to process the same message?

ghost avatar Aug 25 '17 14:08 ghost

The idea of notify is that code from other contracts get to process the same message. Eg, an exchange can process the currency transfer for both deposit and withdraw.

bytemaster avatar Aug 25 '17 23:08 bytemaster

good idea!

chenlian2015 avatar Aug 26 '17 06:08 chenlian2015