Skip to content

Commit 5c52d9a

Browse files
committed
loopd: multi-address summary
1 parent 2371aa0 commit 5c52d9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

loopd/swapclient_server.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,15 @@ func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context,
19191919
return nil, err
19201920
}
19211921

1922+
addressIDMap := make(map[int32][]*deposit.Deposit)
1923+
pkScriptMap := make(map[string][]*deposit.Deposit)
1924+
for _, d := range allDeposits {
1925+
addressIDMap[d.AddressID] = append(addressIDMap[d.AddressID], d)
1926+
1927+
pkScript := string(d.AddressParams.PkScript)
1928+
pkScriptMap[pkScript] = append(pkScriptMap[pkScript], d)
1929+
}
1930+
19221931
var (
19231932
totalNumDeposits = len(allDeposits)
19241933
valueUnconfirmed int64

0 commit comments

Comments
 (0)