mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-17 22:24:21 +01:00
lnd: properly switch RPC port with target net change
With this commit, support for changing the target network (testnet, simnet, etc) has been finalized. Previously a command line option was present to swap networks, but the RPC port wouldn’t automatically be updated to reflect the network.
This commit is contained in:
@@ -71,7 +71,7 @@ func (r *rpcServer) Stop() error {
|
||||
func addrPairsToOutputs(addrPairs map[string]int64) ([]*wire.TxOut, error) {
|
||||
outputs := make([]*wire.TxOut, 0, len(addrPairs))
|
||||
for addr, amt := range addrPairs {
|
||||
addr, err := btcutil.DecodeAddress(addr, activeNetParams)
|
||||
addr, err := btcutil.DecodeAddress(addr, activeNetParams.Params)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -286,7 +286,7 @@ func (r *rpcServer) GetInfo(ctx context.Context,
|
||||
pendingChannels := r.server.fundingMgr.NumPendingChannels()
|
||||
|
||||
idPub := r.server.identityPriv.PubKey().SerializeCompressed()
|
||||
idAddr, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(idPub), activeNetParams)
|
||||
idAddr, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(idPub), activeNetParams.Params)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user