mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-13 16:08:04 -05:00
Co-authored-by: Steven Gu <asongala@163.com> Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
22 lines
575 B
Go
22 lines
575 B
Go
package version
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// CheckScrollProverVersion check the "scroll-prover" version, if it's different from the local one, return false
|
|
func CheckScrollProverVersion(proverVersion string) bool {
|
|
// note the the version is in fact in the format of "tag-commit-scroll_prover-halo2",
|
|
// so split-by-'-' length should be 4
|
|
remote := strings.Split(proverVersion, "-")
|
|
if len(remote) != 4 {
|
|
return false
|
|
}
|
|
local := strings.Split(Version, "-")
|
|
if len(local) != 4 {
|
|
return false
|
|
}
|
|
// compare the `scroll_prover` version
|
|
return remote[2] == local[2]
|
|
}
|