lnwallet: publicly export WaddrmgrEncryptorDecryptor

This commit is contained in:
Olaoluwa Osuntokun 2016-03-24 14:32:44 -07:00
parent 3f5664b46d
commit 7420503c7a
2 changed files with 8 additions and 8 deletions

@ -1060,18 +1060,18 @@ func (l *LightningWallet) getNextRawKey() (*btcec.PrivateKey, error) {
return pkAddr.PrivKey()
}
type waddrmgrEncryptorDecryptor struct {
m *waddrmgr.Manager
type WaddrmgrEncryptorDecryptor struct {
M *waddrmgr.Manager
}
func (w *waddrmgrEncryptorDecryptor) Encrypt(p []byte) ([]byte, error) {
return w.m.Encrypt(waddrmgr.CKTPrivate, p)
func (w *WaddrmgrEncryptorDecryptor) Encrypt(p []byte) ([]byte, error) {
return w.M.Encrypt(waddrmgr.CKTPrivate, p)
}
func (w *waddrmgrEncryptorDecryptor) Decrypt(c []byte) ([]byte, error) {
return w.m.Decrypt(waddrmgr.CKTPrivate, c)
func (w *WaddrmgrEncryptorDecryptor) Decrypt(c []byte) ([]byte, error) {
return w.M.Decrypt(waddrmgr.CKTPrivate, c)
}
func (w *waddrmgrEncryptorDecryptor) OverheadSize() uint32 {
func (w *WaddrmgrEncryptorDecryptor) OverheadSize() uint32 {
return 24
}

@ -297,7 +297,7 @@ func createTestWallet(miningNode *rpctest.Harness, netParams *chaincfg.Params) (
return "", nil, err
}
cdb.RegisterCryptoSystem(&waddrmgrEncryptorDecryptor{wallet.Manager})
cdb.RegisterCryptoSystem(&WaddrmgrEncryptorDecryptor{wallet.Manager})
// Load our test wallet with 5 outputs each holding 4BTC.
if err := loadTestCredits(miningNode, wallet, 5, 4); err != nil {