loop+cmd: extract types into swap module

This commit is contained in:
Oliver Gugger 2019-10-09 12:36:16 +02:00
parent 7a1680d7d6
commit 69f2af9fdc
No known key found for this signature in database
GPG key ID: 8E4256593F177720
13 changed files with 104 additions and 89 deletions

View file

@ -16,7 +16,7 @@ type swapKit struct {
height int32
log *SwapLog
log *swap.PrefixLog
lastUpdateTime time.Time
cost loopdb.SwapCost
@ -25,10 +25,10 @@ type swapKit struct {
swapConfig
contract *loopdb.SwapContract
swapType Type
swapType swap.Type
}
func newSwapKit(hash lntypes.Hash, swapType Type, cfg *swapConfig,
func newSwapKit(hash lntypes.Hash, swapType swap.Type, cfg *swapConfig,
contract *loopdb.SwapContract, outputType swap.HtlcOutputType) (
*swapKit, error) {
@ -42,7 +42,7 @@ func newSwapKit(hash lntypes.Hash, swapType Type, cfg *swapConfig,
return nil, err
}
log := &SwapLog{
log := &swap.PrefixLog{
Hash: hash,
Logger: logger,
}