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:
8 files changed
+88
-46
No files matched your search
@@ -106,7 +106,7 @@ func TestInvoiceWorkflow(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("unable to fetch invoice: %v", err)
|
||||
}
|
||||
if !dbInvoice2.Terms.Settled {
|
||||
if dbInvoice2.Terms.State != ContractSettled {
|
||||
t.Fatalf("invoice should now be settled but isn't")
|
||||
}
|
||||
if dbInvoice2.SettleDate.IsZero() {
|
||||
@@ -348,7 +348,7 @@ func TestDuplicateSettleInvoice(t *testing.T) {
|
||||
// We'll update what we expect the settle invoice to be so that our
|
||||
// comparison below has the correct assumption.
|
||||
invoice.SettleIndex = 1
|
||||
invoice.Terms.Settled = true
|
||||
invoice.Terms.State = ContractSettled
|
||||
invoice.AmtPaid = amt
|
||||
invoice.SettleDate = dbInvoice.SettleDate
|
||||
|
||||
|
||||
Reference in new issue
Block a user