Some checks failed
CodeQL / Analyze (push) Waiting to run
golangci-lint / lint (push) Waiting to run
Tests / Code Coverage / build (amd64) (push) Waiting to run
Tests / Code Coverage / build (arm64) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[additional-args:-tags="test_e2e" name:e2e path:./e2e]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:08-wasm path:./modules/light-clients/08-wasm]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:ibc-go path:.]) (push) Waiting to run
Docker Build & Push Simapp (main) / docker-build (push) Has been cancelled
61 lines
1.4 KiB
Go
61 lines
1.4 KiB
Go
package ibctesting
|
|
|
|
import (
|
|
"time"
|
|
|
|
connectiontypes "git.cw.tr/mukan-network/mukan-ibc/modules/core/03-connection/types"
|
|
channeltypes "git.cw.tr/mukan-network/mukan-ibc/modules/core/04-channel/types"
|
|
"git.cw.tr/mukan-network/mukan-ibc/modules/core/exported"
|
|
ibctm "git.cw.tr/mukan-network/mukan-ibc/modules/light-clients/07-tendermint"
|
|
"git.cw.tr/mukan-network/mukan-ibc/testing/mock"
|
|
)
|
|
|
|
type ClientConfig interface {
|
|
GetClientType() string
|
|
}
|
|
|
|
type TendermintConfig struct {
|
|
TrustLevel ibctm.Fraction
|
|
TrustingPeriod time.Duration
|
|
UnbondingPeriod time.Duration
|
|
MaxClockDrift time.Duration
|
|
}
|
|
|
|
func NewTendermintConfig() *TendermintConfig {
|
|
return &TendermintConfig{
|
|
TrustLevel: DefaultTrustLevel,
|
|
TrustingPeriod: TrustingPeriod,
|
|
UnbondingPeriod: UnbondingPeriod,
|
|
MaxClockDrift: MaxClockDrift,
|
|
}
|
|
}
|
|
|
|
func (*TendermintConfig) GetClientType() string {
|
|
return exported.Tendermint
|
|
}
|
|
|
|
type ConnectionConfig struct {
|
|
DelayPeriod uint64
|
|
Version *connectiontypes.Version
|
|
}
|
|
|
|
func NewConnectionConfig() *ConnectionConfig {
|
|
return &ConnectionConfig{
|
|
DelayPeriod: DefaultDelayPeriod,
|
|
Version: ConnectionVersion,
|
|
}
|
|
}
|
|
|
|
type ChannelConfig struct {
|
|
PortID string
|
|
Version string
|
|
Order channeltypes.Order
|
|
}
|
|
|
|
func NewChannelConfig() *ChannelConfig {
|
|
return &ChannelConfig{
|
|
PortID: mock.PortID,
|
|
Version: DefaultChannelVersion,
|
|
Order: channeltypes.UNORDERED,
|
|
}
|
|
}
|