From 354bc74d3c596767a9776f9235bb3cb2b240b583 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 16 Dec 2015 14:40:11 -0600 Subject: [PATCH] Flesh out LightningChannel struct a bit more * p2p logic will only know about this object * Purposes include storing old commitment txns, receiving them, triggering p2p actions base off of channelEvents, getting/verifying revocation hashes, etc --- wallet/channel.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/wallet/channel.go b/wallet/channel.go index e9d7428dc..68d8d24ce 100644 --- a/wallet/channel.go +++ b/wallet/channel.go @@ -1,4 +1,33 @@ package wallet +import ( + "sync" + + "li.lan/labs/plasma/chainntfs" + "li.lan/labs/plasma/revocation" + + "github.com/btcsuite/btcwallet/walletdb" +) + type LightningChannel struct { + shachan *revocation.ShaChain + wallet *LightningWallet + + channelEvents *chainntnfs.ChainNotifier + + sync.RWMutex + + channelNamespace walletdb.Namespace + + // TODO(roasbeef): create and embed 'Service' interface w/ below? + started int32 + + shutdown int32 + + quit chan struct{} + wg sync.WaitGroup +} + +func newLightningChannel() *LightningChannel { + return nil }