Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions internal/blockchain/tezos/connector/tezosconnect/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ type FFCoreConfig struct {
}

type ConfirmationsConfig struct {
Required *int `yaml:"required,omitempty"`
Required *int `yaml:"required,omitempty"`
FetchReceiptUponEntry bool `yaml:"fetchReceiptUponEntry,omitempty"`
}

func (c *Config) WriteConfig(filename string, extraTezosconnectConfigPath string) error {
Expand Down Expand Up @@ -133,7 +134,7 @@ func (t *Tezosconnect) GenerateConfig(stack *types.Stack, org *types.Organizatio
},
Persistence: &PersistenceConfig{
LevelDB: &LevelDBConfig{
Path: "/tezosconnect/leveldb",
Path: "/tezosconnect/db/leveldb",
},
},
FFCore: &FFCoreConfig{
Expand All @@ -142,7 +143,8 @@ func (t *Tezosconnect) GenerateConfig(stack *types.Stack, org *types.Organizatio
},
Metrics: metrics,
Confirmations: &ConfirmationsConfig{
Required: confirmations,
Required: confirmations,
FetchReceiptUponEntry: true,
},
}
}
Expand Down
10 changes: 5 additions & 5 deletions internal/blockchain/tezos/connector/tezosconnect/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ func (t *Tezosconnect) GetServiceDefinitions(s *types.Stack, dependentServices m
}
serviceDefinitions := make([]*docker.ServiceDefinition, len(s.Members))
for i, member := range s.Members {
dataVolumeName := fmt.Sprintf("tezosconnect_data_%s", member.ID)
serviceDefinitions[i] = &docker.ServiceDefinition{
ServiceName: "tezosconnect_" + member.ID,
Service: &docker.Service{
Image: s.VersionManifest.Tezosconnect.GetDockerImageString(),
ContainerName: fmt.Sprintf("%s_tezosconnect_%v", s.Name, i),
Command: "-f /tezosconnect/config/config.yaml",
Command: "-f /tezosconnect/config.yaml",
DependsOn: dependsOn,
Ports: []string{fmt.Sprintf("%d:%v", member.ExposedConnectorPort, t.Port())},
Volumes: []string{
fmt.Sprintf("tezosconnect_config_%s:/tezosconnect/config", member.ID),
fmt.Sprintf("tezosconnect_leveldb_%s:/tezosconnect/leveldb", member.ID),
fmt.Sprintf("%s/config/tezosconnect_%s.yaml:/tezosconnect/config.yaml", s.RuntimeDir, member.ID),
fmt.Sprintf("%s:/tezosconnect/db", dataVolumeName),
},
Logging: docker.StandardLogOptions,
Environment: s.EnvironmentVars,
},
VolumeNames: []string{
fmt.Sprintf("tezosconnect_config_%s", member.ID),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to this volume? Does it still get created? I do not see code to remove the creation of that volume

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you see the code above - we use binding instead of mount for the connector configuration.
It allows us to update the config from the host machine.
We're using the same approach for the evmconnect now as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha

fmt.Sprintf("tezosconnect_leveldb_%s", member.ID),
dataVolumeName,
},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestGetServiceDefinition(t *testing.T) {
serviceDefinitions := tezos.GetServiceDefinitions(tc.Members, tc.DependentServices)
assert.NotNil(t, serviceDefinitions)

expectedCommand := "-f /tezosconnect/config/config.yaml"
expectedCommand := "-f /tezosconnect/config.yaml"
if serviceDefinitions[0].Service.Command != expectedCommand {
t.Errorf("Expected Command %q, got %q", expectedCommand, serviceDefinitions[0].Service.Command)
}
Expand Down
Loading