mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
Remove redundant code
This commit is contained in:
parent
0353ec0983
commit
4452e3f3f1
@ -2396,7 +2396,7 @@ static bool peer_write_pending(struct peer *peer)
|
||||
dev_sabotage_fd(PEER_FD);
|
||||
break;
|
||||
case DEV_DISCONNECT_DROPPKT:
|
||||
msg = tal_free(msg);
|
||||
tal_free(msg);
|
||||
peer->post_sabotage = true;
|
||||
peer->peer_outmsg = NULL;
|
||||
peer->peer_outoff = 0;
|
||||
|
@ -189,15 +189,11 @@ static void tx_must_be_eq(const struct bitcoin_tx *a,
|
||||
{
|
||||
tal_t *tmpctx = tal_tmpctx(NULL);
|
||||
u8 *lina, *linb;
|
||||
size_t i, len;
|
||||
size_t i;
|
||||
|
||||
lina = linearize_tx(tmpctx, a);
|
||||
linb = linearize_tx(tmpctx, b);
|
||||
|
||||
len = tal_len(lina);
|
||||
if (tal_len(linb) < len)
|
||||
len = tal_len(linb);
|
||||
|
||||
for (i = 0; i < tal_len(lina); i++) {
|
||||
if (i >= tal_len(linb))
|
||||
errx(1, "Second tx is truncated:\n"
|
||||
|
@ -581,7 +581,7 @@ void peer_connected(struct lightningd *ld, const u8 *msg,
|
||||
|
||||
/* Reconnect: discard old one. */
|
||||
case OPENINGD:
|
||||
peer = tal_free(peer);
|
||||
tal_free(peer);
|
||||
goto return_to_gossipd;
|
||||
|
||||
case ONCHAIND_CHEATED:
|
||||
|
@ -75,15 +75,11 @@ static void tx_must_be_eq(const struct bitcoin_tx *a,
|
||||
{
|
||||
tal_t *tmpctx = tal_tmpctx(NULL);
|
||||
u8 *lina, *linb;
|
||||
size_t i, len;
|
||||
size_t i;
|
||||
|
||||
lina = linearize_tx(tmpctx, a);
|
||||
linb = linearize_tx(tmpctx, b);
|
||||
|
||||
len = tal_len(lina);
|
||||
if (tal_len(linb) < len)
|
||||
len = tal_len(linb);
|
||||
|
||||
for (i = 0; i < tal_len(lina); i++) {
|
||||
if (i >= tal_len(linb))
|
||||
errx(1, "Second tx is truncated:\n"
|
||||
|
Loading…
Reference in New Issue
Block a user