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
25 lines
688 B
Go
25 lines
688 B
Go
package tendermint
|
|
|
|
import (
|
|
cmtmath "git.cw.tr/mukan-network/mukan-consensus/libs/math"
|
|
"git.cw.tr/mukan-network/mukan-consensus/light"
|
|
)
|
|
|
|
// DefaultTrustLevel is the tendermint light client default trust level
|
|
var DefaultTrustLevel = NewFractionFromTm(light.DefaultTrustLevel)
|
|
|
|
// NewFractionFromTm returns a new Fraction instance from a tmmath.Fraction
|
|
func NewFractionFromTm(f cmtmath.Fraction) Fraction {
|
|
return Fraction{
|
|
Numerator: f.Numerator,
|
|
Denominator: f.Denominator,
|
|
}
|
|
}
|
|
|
|
// ToTendermint converts Fraction to tmmath.Fraction
|
|
func (f Fraction) ToTendermint() cmtmath.Fraction {
|
|
return cmtmath.Fraction{
|
|
Numerator: f.Numerator,
|
|
Denominator: f.Denominator,
|
|
}
|
|
}
|