mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
* broadcast forfeit transaction in case the user is trying the cheat the ASP * fix connector input + --cheat flag in CLI * WIP * cleaning and fixes * add TODO * sweeper.go: mark round swept if vtxo are redeemed * fixes after reviews * revert "--cheat" flag in client * revert redeem.go * optimization * update account.go according to ocean ListUtxos new spec * WaitForSync implementation * ocean-wallet/service.go: remove go rountine while writing to notification channel
46 lines
892 B
Go
46 lines
892 B
Go
package domain
|
|
|
|
import "github.com/ark-network/ark/common/tree"
|
|
|
|
type RoundEvent interface {
|
|
isEvent()
|
|
}
|
|
|
|
func (r RoundStarted) isEvent() {}
|
|
func (r RoundFinalizationStarted) isEvent() {}
|
|
func (r RoundFinalized) isEvent() {}
|
|
func (r RoundFailed) isEvent() {}
|
|
func (r PaymentsRegistered) isEvent() {}
|
|
|
|
type RoundStarted struct {
|
|
Id string
|
|
Timestamp int64
|
|
}
|
|
|
|
type RoundFinalizationStarted struct {
|
|
Id string
|
|
CongestionTree tree.CongestionTree
|
|
Connectors []string
|
|
ConnectorAddress string
|
|
UnsignedForfeitTxs []string
|
|
PoolTx string
|
|
}
|
|
|
|
type RoundFinalized struct {
|
|
Id string
|
|
Txid string
|
|
ForfeitTxs []string
|
|
Timestamp int64
|
|
}
|
|
|
|
type RoundFailed struct {
|
|
Id string
|
|
Err string
|
|
Timestamp int64
|
|
}
|
|
|
|
type PaymentsRegistered struct {
|
|
Id string
|
|
Payments []Payment
|
|
}
|