mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-23 12:13:50 +02:00
rpcserver+docs: add default case to addr type switch
This commit adds a default case to the address type switch statement in the NewAddress rpc server function. This catches any invalid address types and returns an error.
This commit is contained in:
@@ -1542,6 +1542,9 @@ func (r *rpcServer) NewAddress(ctx context.Context,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown address type: %v", in.Type)
|
||||
}
|
||||
|
||||
rpcsLog.Debugf("[newaddress] account=%v type=%v addr=%v", account,
|
||||
|
Reference in New Issue
Block a user