mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
state: add async anchor creation.
Actually generating the anchor transaction in my implementation requires interaction with bitcoind, which we want to be async. So add a callback and a new state to wait for it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -19,6 +19,7 @@ enum state {
|
||||
*/
|
||||
STATE_OPEN_WAIT_FOR_OPEN_NOANCHOR,
|
||||
STATE_OPEN_WAIT_FOR_OPEN_WITHANCHOR,
|
||||
STATE_OPEN_WAIT_FOR_ANCHOR_CREATE,
|
||||
STATE_OPEN_WAIT_FOR_ANCHOR,
|
||||
STATE_OPEN_WAIT_FOR_COMMIT_SIG,
|
||||
STATE_OPEN_WAITING_OURANCHOR,
|
||||
@@ -220,6 +221,8 @@ enum state_input {
|
||||
/*
|
||||
* Bitcoin events
|
||||
*/
|
||||
/* Bitcoin anchor tx created. */
|
||||
BITCOIN_ANCHOR_CREATED,
|
||||
/* It reached the required depth. */
|
||||
BITCOIN_ANCHOR_DEPTHOK,
|
||||
/* It didn't reach the required depth in time. */
|
||||
|
||||
Reference in New Issue
Block a user