From 024e6a585528424d9eb2da6d4ef940af84e44955 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 1 Nov 2016 21:33:27 +1030 Subject: [PATCH] feechange: fix db updates. Found by PVS Studio. Reported-by: Jon Griffiths Signed-off-by: Rusty Russell --- daemon/feechange.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/feechange.c b/daemon/feechange.c index 2991c6c90..f01d6b0d0 100644 --- a/daemon/feechange.c +++ b/daemon/feechange.c @@ -135,7 +135,7 @@ void feechange_changestate(struct peer *peer, || newstate == SENT_FEECHANGE_COMMIT) db_new_feechange(peer, f); else if (newstate == RCVD_FEECHANGE_ACK_REVOCATION - || SENT_FEECHANGE_ACK_REVOCATION) + || newstate == SENT_FEECHANGE_ACK_REVOCATION) db_remove_feechange(peer, f, oldstate); else db_update_feechange_state(peer, f, oldstate);