Skip to content

Commit

Permalink
Merge pull request #741 from iotaledger/remove/genesis-snapshot-submo…
Browse files Browse the repository at this point in the history
…dule

Remove submodule for genesis-snapshot to enable import by other projects
  • Loading branch information
muXxer authored Feb 15, 2024
2 parents df4e244 + a71b225 commit cd5b582
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 240 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:

- name: Build genesis-snapshot tool
working-directory: tools/genesis-snapshot
run: go mod tidy && go build .
run: go build .
2 changes: 1 addition & 1 deletion .github/workflows/feature-network-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version-file: 'tools/genesis-snapshot/go.mod'
go-version-file: 'go.mod'
cache: false

- name: Print Go version
Expand Down
4 changes: 0 additions & 4 deletions scripts/go_mod_tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@ pushd tools/gendoc
go mod tidy
popd

pushd tools/genesis-snapshot
go mod tidy
popd

popd
69 changes: 0 additions & 69 deletions tools/genesis-snapshot/go.mod

This file was deleted.

145 changes: 0 additions & 145 deletions tools/genesis-snapshot/go.sum

This file was deleted.

6 changes: 3 additions & 3 deletions tools/genesis-snapshot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ func main() {
parsedOpts, configSelected := parseFlags()
opts := presets.Base
if strings.Contains(configSelected, ".yml") {
if yamlOpts, err := presets.GenerateFromYaml(configSelected); err != nil {
yamlOpts, err := presets.GenerateFromYaml(configSelected)
if err != nil {
panic(err)
} else {
opts = append(opts, yamlOpts...)
}
opts = append(opts, yamlOpts...)
} else {
switch configSelected {
case "docker":
Expand Down
6 changes: 3 additions & 3 deletions tools/genesis-snapshot/presets/presets.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ import (
)

var (
// use defaults from iota.go
// use defaults from iota.go.
protocolParamsBase = iotago.NewV3SnapshotProtocolParameters(
iotago.WithNetworkOptions("default", iotago.PrefixTestnet),
)

// use defaults from iota.go
// use defaults from iota.go.
protocolParamsDocker = iotago.NewV3SnapshotProtocolParameters(
iotago.WithNetworkOptions("docker", iotago.PrefixTestnet),
iotago.WithTimeProviderOptions(5, time.Now().Unix(), 10, 7),
iotago.WithLivenessOptions(10, 15, 3, 6, 8),
)

// use defaults from iota.go
// use defaults from iota.go.
protocolParamsFeature = iotago.NewV3SnapshotProtocolParameters(
iotago.WithNetworkOptions("feature", iotago.PrefixTestnet),
iotago.WithTimeProviderOptions(666666, time.Now().Unix()-100_000, 10, 13),
Expand Down
Loading

0 comments on commit cd5b582

Please sign in to comment.