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:
parent
07984836e4
commit
354bc74d3c
@ -1,4 +1,33 @@
|
|||||||
package wallet
|
package wallet
|
||||||
|
|
||||||
|
import (
|
||||||
|
"sync"
|
||||||
|
|
||||||
|
"li.lan/labs/plasma/chainntfs"
|
||||||
|
"li.lan/labs/plasma/revocation"
|
||||||
|
|
||||||
|
"github.com/btcsuite/btcwallet/walletdb"
|
||||||
|
)
|
||||||
|
|
||||||
type LightningChannel struct {
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user