mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 15:11:09 +02:00
refactor: use maps.Copy for cleaner map handling
Signed-off-by: xinhangzhou <shuangcui@aliyun.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"maps"
|
||||
"math"
|
||||
"net"
|
||||
"net/http"
|
||||
@@ -3339,9 +3340,7 @@ func (r *rpcServer) GetInfo(_ context.Context,
|
||||
// Add the features to our map of features, allowing over writing of
|
||||
// existing values because features in different sets with the same bit
|
||||
// are duplicated across sets.
|
||||
for bit, feature := range rpcFeatures {
|
||||
features[bit] = feature
|
||||
}
|
||||
maps.Copy(features, rpcFeatures)
|
||||
}
|
||||
|
||||
// TODO(roasbeef): add synced height n stuff
|
||||
|
Reference in New Issue
Block a user