From 73421caecc0004e5cdcd664d7feb0bed2585e6db Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 30 Aug 2017 20:32:33 -0700 Subject: [PATCH] lnwallet: don't attach the rpcclient to the lnwallet logging instance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We no longer attach the RPC client to the lnwallet logging instance as it can generate a ton of spam in trace mode as it’ll dump the entire hex encoded blocks, transactions, etc. --- lnwallet/log.go | 2 -- lnwallet/wallet.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lnwallet/log.go b/lnwallet/log.go index 478a2378..f4508536 100644 --- a/lnwallet/log.go +++ b/lnwallet/log.go @@ -2,7 +2,6 @@ package lnwallet import ( "github.com/btcsuite/btclog" - "github.com/roasbeef/btcd/rpcclient" "github.com/roasbeef/btcwallet/chain" btcwallet "github.com/roasbeef/btcwallet/wallet" "github.com/roasbeef/btcwallet/wtxmgr" @@ -32,7 +31,6 @@ func UseLogger(logger btclog.Logger) { btcwallet.UseLogger(logger) wtxmgr.UseLogger(logger) - rpcclient.UseLogger(logger) chain.UseLogger(logger) } diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index 1b5dedc0..3824f654 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -481,7 +481,7 @@ func (l *LightningWallet) handleFundingReserveRequest(req *initFundingReserveMsg // If the funding request is for a different chain than the one the // wallet is aware of, then we'll reject the request. - if *l.Cfg.NetParams.GenesisHash != *req.chainHash { + if !bytes.Equal(l.Cfg.NetParams.GenesisHash[:], req.chainHash[:]) { req.err <- fmt.Errorf("unable to create channel reservation "+ "for chain=%v, wallet is on chain=%v", req.chainHash, l.Cfg.NetParams.GenesisHash)