OSDN Git Service

modify list-pubkeys response order (#1170)
authoroysheng <33340252+oysheng@users.noreply.github.com>
Tue, 24 Jul 2018 07:24:32 +0000 (15:24 +0800)
committerPaladz <yzhu101@uottawa.ca>
Tue, 24 Jul 2018 07:24:32 +0000 (15:24 +0800)
api/query.go

index 79315ae..939adbd 100644 (file)
@@ -318,10 +318,10 @@ func (a *API) listPubKeys(ctx context.Context, ins struct {
                        path = append(path, chainjson.HexBytes(p))
                }
 
-               pubKeyInfos = append([]PubKeyInfo{{
+               pubKeyInfos = append(pubKeyInfos, PubKeyInfo{
                        Pubkey: hex.EncodeToString(pubkey),
                        Path:   path,
-               }}, pubKeyInfos...)
+               })
        }
 
        if len(pubKeyInfos) == 0 {