daemon: fix unwatch anchor depth.

We still need to watch the anchor output in this case: that's what
makes us handle the commit transcction we broadcast.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-05-26 15:25:24 +09:30
parent b9d4f7c0ab
commit 5188b14c7c

View File

@ -1976,7 +1976,8 @@ void peer_unwatch_anchor_depth(struct peer *peer,
enum state_input timeout)
{
assert(peer->anchor.watches);
peer->anchor.watches = tal_free(peer->anchor.watches);
assert(peer->anchor.watches->depthok == depthok);
peer->anchor.watches->depthok = INPUT_NONE;
}
uint64_t commit_tx_fee(const struct bitcoin_tx *commit, uint64_t anchor_satoshis)