refactor: use maps.Copy for cleaner map handling

Signed-off-by: xinhangzhou <shuangcui@aliyun.com>
This commit is contained in:
xinhangzhou
2025-03-24 17:13:47 +08:00
parent 5235f3b24f
commit b7e3c20383
7 changed files with 18 additions and 28 deletions

View File

@@ -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