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
This commit is contained in:
Olaoluwa Osuntokun 2015-12-16 14:40:11 -06:00
parent 07984836e4
commit 354bc74d3c

View File

@ -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
}