-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This issue is the tenth bug in issue 53: #53
- channelInfo's fields are different from the obd.
when obd commits channelInfo to a tracker, now we have the code to convert:
//infoRequest is the data submit to tracker
infoRequest.PeerIdA = channelInfo.PeerIdA
infoRequest.PeerIdB = channelInfo.PeerIdB
infoRequest.IsAlice = false
if commitmentTx.Id > 0 {
if commitmentTx.Owner == channelInfo.PeerIdA {
infoRequest.IsAlice = true
infoRequest.AmountA = commitmentTx.AmountToRSMC
infoRequest.AmountB = commitmentTx.AmountToCounterparty
} else {
infoRequest.AmountB = commitmentTx.AmountToRSMC
infoRequest.AmountA = commitmentTx.AmountToCounterparty
}
}We should modify channelInfo's fields to be the same as the tracker. It will be easy when updates the sync mode between the obd and tracker.
channelInfo.IsAlice should be a function, it's a computed field. For example:
func (c *channelInfo)IsAlice(currentUserPeerID) bool{
return c.PeerIdA==currentUserPeerID
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working