feechange: fix db updates.

Found by PVS Studio.

Reported-by: Jon Griffiths <jgriffiths@blockstream.io>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-11-01 21:33:27 +10:30
parent 5349d2aaa7
commit 024e6a5855

View File

@ -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);