mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
lightningd/plugin_hook.c: Make db_write a chained hook.
Fixes: #4219 Changelog-Changed: Plugins: Multiple plugins can now register `db_write` hooks.
This commit is contained in:
committed by
Rusty Russell
parent
904e110554
commit
32de621886
@@ -897,6 +897,14 @@ to error without
|
||||
committing to the database!
|
||||
This is the expected way to halt and catch fire.
|
||||
|
||||
`db_write` is a parallel-chained hook, i.e., multiple plugins can
|
||||
register it, and all of them will be invoked simultaneously without
|
||||
regard for order of registration.
|
||||
The hook is considered handled if all registered plugins return
|
||||
`{"result": "continue"}`.
|
||||
If any plugin returns anything else, `lightningd` will error without
|
||||
committing to the database.
|
||||
|
||||
### `invoice_payment`
|
||||
|
||||
This hook is called whenever a valid payment for an unpaid invoice has arrived.
|
||||
|
||||
Reference in New Issue
Block a user