Skip to content

Commit b694a76

Browse files
committed
looprpc+loopd: deprecate string ID
1 parent 26c0c17 commit b694a76

File tree

4 files changed

+153
-94
lines changed

4 files changed

+153
-94
lines changed

loopd/swapclient_server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ func (s *swapClientServer) LoopOut(ctx context.Context,
9999

100100
return &looprpc.SwapResponse{
101101
Id: hash.String(),
102+
IdBytes: hash[:],
102103
HtlcAddress: htlc.String(),
103104
}, nil
104105
}
@@ -136,6 +137,7 @@ func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) (
136137
return &looprpc.SwapStatus{
137138
Amt: int64(loopSwap.AmountRequested),
138139
Id: loopSwap.SwapHash.String(),
140+
IdBytes: loopSwap.SwapHash[:],
139141
State: state,
140142
InitiationTime: loopSwap.InitiationTime.UnixNano(),
141143
LastUpdateTime: loopSwap.LastUpdate.UnixNano(),
@@ -396,6 +398,7 @@ func (s *swapClientServer) LoopIn(ctx context.Context,
396398

397399
return &looprpc.SwapResponse{
398400
Id: hash.String(),
401+
IdBytes: hash[:],
399402
HtlcAddress: htlc.String(),
400403
}, nil
401404
}

0 commit comments

Comments
 (0)