Versions in this module Expand all Collapse all v1 v1.0.0 May 10, 2019 Changes in this version + func NewMockConn(localPk, remotePk *btcec.PublicKey, localAddr, remoteAddr net.Addr, ...) (*MockPeer, *MockPeer) + type ClientDB struct + func NewClientDB() *ClientDB + func (m *ClientDB) AckUpdate(id *wtdb.SessionID, seqNum, lastApplied uint16) error + func (m *ClientDB) AddChanPkScript(chanID lnwire.ChannelID, pkScript []byte) error + func (m *ClientDB) CommitUpdate(id *wtdb.SessionID, seqNum uint16, update *wtdb.CommittedUpdate) (uint16, error) + func (m *ClientDB) CreateClientSession(session *wtdb.ClientSession) error + func (m *ClientDB) CreateTower(lnAddr *lnwire.NetAddress) (*wtdb.Tower, error) + func (m *ClientDB) FetchChanPkScripts() (map[lnwire.ChannelID][]byte, error) + func (m *ClientDB) ListClientSessions() (map[wtdb.SessionID]*wtdb.ClientSession, error) + func (m *ClientDB) LoadTower(towerID uint64) (*wtdb.Tower, error) + func (m *ClientDB) MarkBackupIneligible(chanID lnwire.ChannelID, commitHeight uint64) error + func (m *ClientDB) NextSessionKeyIndex(towerID uint64) (uint32, error) + type MockPeer struct + IncomingMsgs chan []byte + OutgoingMsgs chan []byte + Quit chan struct{} + RemoteQuit chan struct{} + func NewMockPeer(lpk, rpk *btcec.PublicKey, addr net.Addr, bufferSize int) *MockPeer + func (p *MockPeer) Close() error + func (p *MockPeer) LocalAddr() net.Addr + func (p *MockPeer) Read(dst []byte) (int, error) + func (p *MockPeer) ReadNextMessage() ([]byte, error) + func (p *MockPeer) RemoteAddr() net.Addr + func (p *MockPeer) RemotePub() *btcec.PublicKey + func (p *MockPeer) SetDeadline(t time.Time) error + func (p *MockPeer) SetReadDeadline(t time.Time) error + func (p *MockPeer) SetWriteDeadline(t time.Time) error + func (p *MockPeer) Write(b []byte) (n int, err error) + type MockSigner struct + func NewMockSigner() *MockSigner + func (s *MockSigner) AddPrivKey(privKey *btcec.PrivateKey) keychain.KeyLocator + func (s *MockSigner) ComputeInputScript(tx *wire.MsgTx, signDesc *input.SignDescriptor) (*input.Script, error) + func (s *MockSigner) SignOutputRaw(tx *wire.MsgTx, signDesc *input.SignDescriptor) ([]byte, error) + type SecretKeyRing struct + func NewSecretKeyRing() *SecretKeyRing + func (m *SecretKeyRing) DerivePrivKey(desc keychain.KeyDescriptor) (*btcec.PrivateKey, error) + type TowerDB struct + func NewTowerDB() *TowerDB + func (db *TowerDB) DeleteSession(target wtdb.SessionID) error + func (db *TowerDB) GetLookoutTip() (*chainntnfs.BlockEpoch, error) + func (db *TowerDB) GetSessionInfo(id *wtdb.SessionID) (*wtdb.SessionInfo, error) + func (db *TowerDB) InsertSessionInfo(info *wtdb.SessionInfo) error + func (db *TowerDB) InsertStateUpdate(update *wtdb.SessionStateUpdate) (uint16, error) + func (db *TowerDB) QueryMatches(breachHints []wtdb.BreachHint) ([]wtdb.Match, error) + func (db *TowerDB) SetLookoutTip(epoch *chainntnfs.BlockEpoch) error