multi: store swap cost in database

This commit is contained in:
Joost Jager 2019-05-15 14:01:27 +02:00
parent 24a1b8d642
commit 6efa62347b
No known key found for this signature in database
GPG key ID: A61B9D4C393C59C7
9 changed files with 146 additions and 15 deletions

View file

@ -19,7 +19,7 @@ type swapKit struct {
log *SwapLog
lastUpdateTime time.Time
cost SwapCost
cost loopdb.SwapCost
state loopdb.SwapState
executeConfig
swapConfig
@ -70,6 +70,7 @@ func (s *swapKit) sendUpdate(ctx context.Context) error {
LastUpdate: s.lastUpdateTime,
SwapStateData: loopdb.SwapStateData{
State: s.state,
Cost: s.cost,
},
HtlcAddress: s.htlc.Address,
}