Notifications from client/wallet



Summary:

A proposal has been made to add notifications to the client and wallet in order to decouple UI and core communication and eliminate the need for UIs to poll for changes. The boost::signal mechanism is proposed as a solution, which is essentially a callback system that allows decoupled delivery of signals from an object. Multiple other objects can listen in on an event without the emitting object having to care. Specific notifications that would be useful include balanceChanged for spendable balance changes, transactionAdded for new transactions added to wallet, transactionUpdated for transaction info changes, transactionRemoved for removed transactions, addressAdded for added addresses to address book, addressUpdated for modified address label/other metadata, addressRemoved for removed addresses from address book, notification for warning/error occurred in wallet or network processing, and askFee for asking user for fee. The implementation of a central notification interface is also suggested for source cleanup, allowing for clean separation of pieces and large-scale rewrites of one or another part without touching anything but the parts that are being redone. This should also allow for cool programs (like pushpoold/a block notification server/etc) to use Bitcoin as a library fairly efficiently.


Updated on: 2023-05-18T21:24:56.943516+00:00