channeldb: convert settled boolean to state

This commit is a preparation for the addition of new invoice
states. A database migration is not needed because we keep
the same field length and values.
This commit is contained in:
Joost Jager committed 2019-01-04 07:53:55 +01:00
1 parent 552a9b7190
commit 5515713b88
8 files changed
+88 -46

No files matched your search

+1 -1
View File
@@ -2334,7 +2334,7 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg,
// TODO(conner): track ownership of settlements to
// properly recover from failures? or add batch invoice
// settlement
if invoice.Terms.Settled {
if invoice.Terms.State != channeldb.ContractOpen {
log.Warnf("Accepting duplicate payment for "+
"hash=%x", pd.RHash[:])
}