channeldb: make chanStatus unexported

Since the ChanStatus field can be changed from concurrent callers, we
make it unexported and add the method ChanStatus() for safe retrieval.
This commit is contained in:
Johan T. Halseth committed 2018-07-31 15:07:30 +02:00
1 parent eed052eba5
commit ea6aca26a5
3 files changed
+20 -12

No files matched your search

+1 -1
View File
@@ -456,7 +456,7 @@ func fetchChannels(d *DB, pending, waitingClose bool) ([]*OpenChannel, error) {
// than Default, then it means it is
// waiting to be closed.
channelWaitingClose :=
channel.ChanStatus != Default
channel.ChanStatus() != Default
// Only include it if we requested
// channels with the same waitingClose