Browse Source

patch remove-bitcoin_release_anchor.patch

ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
8c5fae2b28
  1. 6
      daemon/peer.c
  2. 3
      state.c
  3. 4
      state.h

6
daemon/peer.c

@ -4101,12 +4101,6 @@ void bitcoin_create_anchor(struct peer *peer)
assert(tx->input[i].witness);
}
/* We didn't end up broadcasting the anchor: we don't need to do anything
* to "release" TXOs, since we have our own internal wallet now. */
void bitcoin_release_anchor(struct peer *peer, enum state_input done)
{
}
/* Get the bitcoin anchor tx. */
const struct bitcoin_tx *bitcoin_anchor(struct peer *peer)
{

3
state.c

@ -169,7 +169,6 @@ enum state state(struct peer *peer,
if (err) {
peer->local.commit->sig
= tal_free(peer->local.commit->sig);
bitcoin_release_anchor(peer, INPUT_NONE);
peer_open_complete(peer, err->error->problem);
goto err_breakdown;
}
@ -181,7 +180,6 @@ enum state state(struct peer *peer,
db_err = db_commit_transaction(peer);
if (db_err) {
bitcoin_release_anchor(peer, INPUT_NONE);
err = pkt_err(peer, "database error");
peer_open_complete(peer, db_err);
goto err_breakdown;
@ -190,7 +188,6 @@ enum state state(struct peer *peer,
peer_watch_anchor(peer, peer->local.mindepth);
return next_state(peer, STATE_OPEN_WAITING_OURANCHOR);
} else if (input_is_pkt(input)) {
bitcoin_release_anchor(peer, INPUT_NONE);
peer_open_complete(peer, "unexpected packet");
goto unexpected_pkt;
}

4
state.h

@ -112,8 +112,4 @@ void bitcoin_create_anchor(struct peer *peer);
/* Get the bitcoin anchor tx. */
const struct bitcoin_tx *bitcoin_anchor(struct peer *peer);
/* We didn't end up broadcasting the anchor: release the utxos.
* If done != INPUT_NONE, remove existing create_anchor too. */
void bitcoin_release_anchor(struct peer *peer, enum state_input done);
#endif /* LIGHTNING_STATE_H */

Loading…
Cancel
Save