mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
Remove obsolete FIXME messages.
1. htlc->fail has been changed to a u8 *. 2. wallet_get_newindex saves to the db. 3. peer->next_htlc_id is saved to the db in peer_save_commitsig_sent() below. 4. We do store commit in peer_save_commitsig_received(peer, commitnum), and the fixme below talks about HTLC sigs. 5. We do commit shachain and next_per_commit_point in wallet_shachain_add_hash and update_per_commit_point respectively. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
27e0ea2358
commit
9a8eca4fee
@@ -1446,7 +1446,6 @@ static void handle_peer_fail_malformed_htlc(struct peer *peer, const u8 *msg)
|
|||||||
fail = tal_arr(htlc, u8, 0);
|
fail = tal_arr(htlc, u8, 0);
|
||||||
towire_u16(&fail, failure_code);
|
towire_u16(&fail, failure_code);
|
||||||
towire_sha256(&fail, &sha256_of_onion);
|
towire_sha256(&fail, &sha256_of_onion);
|
||||||
/* FIXME: Make htlc->fail a u8 *! */
|
|
||||||
htlc->fail = fail;
|
htlc->fail = fail;
|
||||||
start_commit_timer(peer);
|
start_commit_timer(peer);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1434,7 +1434,6 @@ static enum watch_result funding_spent(struct peer *peer,
|
|||||||
if (peer->local_shutdown_idx >= 0)
|
if (peer->local_shutdown_idx >= 0)
|
||||||
keyindex = peer->local_shutdown_idx;
|
keyindex = peer->local_shutdown_idx;
|
||||||
else {
|
else {
|
||||||
/* FIXME: Save to db */
|
|
||||||
keyindex = wallet_get_newindex(peer->ld);
|
keyindex = wallet_get_newindex(peer->ld);
|
||||||
if (keyindex < 0) {
|
if (keyindex < 0) {
|
||||||
log_broken(peer->log, "Could not get keyindex");
|
log_broken(peer->log, "Could not get keyindex");
|
||||||
|
|||||||
@@ -983,7 +983,6 @@ void peer_sending_commitsig(struct peer *peer, const u8 *msg)
|
|||||||
num_local_added, maxid, peer->next_htlc_id);
|
num_local_added, maxid, peer->next_htlc_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* FIXME: Save to db */
|
|
||||||
peer->next_htlc_id += num_local_added;
|
peer->next_htlc_id += num_local_added;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1100,8 +1099,6 @@ void peer_got_commitsig(struct peer *peer, const u8 *msg)
|
|||||||
commitnum, feerate, tal_count(added), tal_count(fulfilled),
|
commitnum, feerate, tal_count(added), tal_count(fulfilled),
|
||||||
tal_count(failed), tal_count(changed));
|
tal_count(failed), tal_count(changed));
|
||||||
|
|
||||||
/* FIXME: store commit & htlc signature information. */
|
|
||||||
|
|
||||||
/* New HTLCs */
|
/* New HTLCs */
|
||||||
for (i = 0; i < tal_count(added); i++)
|
for (i = 0; i < tal_count(added); i++)
|
||||||
added_their_htlc(peer, &added[i], &shared_secrets[i]);
|
added_their_htlc(peer, &added[i], &shared_secrets[i]);
|
||||||
@@ -1227,8 +1224,6 @@ void peer_got_revoke(struct peer *peer, const u8 *msg)
|
|||||||
/* FIXME: Check per_commitment_secret -> per_commit_point */
|
/* FIXME: Check per_commitment_secret -> per_commit_point */
|
||||||
update_per_commit_point(peer, &next_per_commitment_point);
|
update_per_commit_point(peer, &next_per_commitment_point);
|
||||||
|
|
||||||
/* FIXME: Commit shachain and next_per_commit_point to db */
|
|
||||||
|
|
||||||
/* Tell it we've committed, and to go ahead with revoke. */
|
/* Tell it we've committed, and to go ahead with revoke. */
|
||||||
msg = towire_channel_got_revoke_reply(msg);
|
msg = towire_channel_got_revoke_reply(msg);
|
||||||
subd_send_msg(peer->owner, take(msg));
|
subd_send_msg(peer->owner, take(msg));
|
||||||
|
|||||||
Reference in New Issue
Block a user