invoiceregistry: enforce stricter check on duplicate ntfn avoidance

This commit is contained in:
Olaoluwa Osuntokun 2018-07-10 19:37:24 -07:00
parent db4a09d3b5
commit 1189e703da
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -144,13 +144,13 @@ func (i *invoiceRegistry) invoiceEventNotifier() {
// If we've already sent this settle event to
// the client, then we can skip this.
case event.isSettle &&
client.settleIndex == invoice.SettleIndex:
client.settleIndex >= invoice.SettleIndex:
continue
// Similarly, if we've already sent this add to
// the client then we can skip this one.
case !event.isSettle &&
client.addIndex == invoice.AddIndex:
client.addIndex >= invoice.AddIndex:
continue
// These two states should never happen, but we