lnd: removing activeNetParams global, passed around instead via configs

This commit removes the activeNetParams global in chainparams.go. This
is necessary to isolate code from the lnd package so we can import it
for use in tests, other projects, etc.
This commit is contained in:
nsa
2020-08-04 14:56:31 -04:00
committed by eugene
parent 37a29b4869
commit 3791c9efcb
9 changed files with 105 additions and 92 deletions

View File

@ -219,7 +219,7 @@ type mockChainIO struct {
var _ lnwallet.BlockChainIO = (*mockChainIO)(nil)
func (m *mockChainIO) GetBestBlock() (*chainhash.Hash, int32, error) {
return activeNetParams.GenesisHash, m.bestHeight, nil
return chaincfg.TestNet3Params.GenesisHash, m.bestHeight, nil
}
func (*mockChainIO) GetUtxo(op *wire.OutPoint, _ []byte,