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 authored and eugene committed 2020-08-11 11:41:24 -04:00
1 parent 37a29b4869
commit 3791c9efcb
9 files changed
+105 -92

No files matched your search

+1 -1
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,