From 7420503c7a67f49cec2785c7debd202f177e25fa Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 24 Mar 2016 14:32:44 -0700 Subject: [PATCH] lnwallet: publicly export WaddrmgrEncryptorDecryptor --- lnwallet/wallet.go | 14 +++++++------- lnwallet/wallet_test.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index fdcdf16f..1df86bea 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -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 } diff --git a/lnwallet/wallet_test.go b/lnwallet/wallet_test.go index e20b8359..d9f883d9 100644 --- a/lnwallet/wallet_test.go +++ b/lnwallet/wallet_test.go @@ -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 {