Skip to content

Commit

Permalink
Merge branch 'feat/chain-go-sdk' into MX-15080-genesis-accounts-with-…
Browse files Browse the repository at this point in the history
…esdt-tokens
  • Loading branch information
mariusmihaic authored Jan 31, 2024
2 parents adac471 + 5c25b88 commit 21f7362
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cmd/sovereignnode/config/sovereignConfig.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
# Time to wait in seconds for outgoing operations that need to be bridged from sovereign chain to main chain.
# If no confirmation of bridged data is received after this time, next leader should retry sending data.
TimeToWaitForUnconfirmedOutGoingOperationInSeconds = 30

SubscribedEvents = [
{ Identifier = "deposit", Addresses = ["erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"] }
]

[OutGoingBridge]
GRPCHost = "localhost"
Expand Down
3 changes: 2 additions & 1 deletion config/sovereignConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ type SovereignConfig struct {

// OutgoingSubscribedEvents holds config for outgoing subscribed events
type OutgoingSubscribedEvents struct {
TimeToWaitForUnconfirmedOutGoingOperationInSeconds uint32 `toml:"TimeToWaitForUnconfirmedOutGoingOperationInSeconds"`
TimeToWaitForUnconfirmedOutGoingOperationInSeconds uint32 `toml:"TimeToWaitForUnconfirmedOutGoingOperationInSeconds"`
SubscribedEvents []SubscribedEvent `toml:"SubscribedEvents"`
}

// MainChainNotarization defines necessary data to start main chain notarization on a sovereign shard
Expand Down
2 changes: 1 addition & 1 deletion factory/processing/blockProcessorCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ func (pcf *processComponentsFactory) createBlockProcessor(
// TODO: Radu Chis: move this in the factory of the sovereign block processor once the refactor is completed

outgoingOpFormatter, errOpFormatter := sovereign.CreateOutgoingOperationsFormatter(
pcf.config.SovereignConfig.NotifierConfig.SubscribedEvents,
pcf.config.SovereignConfig.OutgoingSubscribedEvents.SubscribedEvents,
pcf.coreData.AddressPubKeyConverter(),
pcf.coreData.RoundHandler(),
)
Expand Down
8 changes: 8 additions & 0 deletions testscommon/components/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ func GetGeneralConfig() config.Config {
},
},
},
OutgoingSubscribedEvents: config.OutgoingSubscribedEvents{
SubscribedEvents: []config.SubscribedEvent{
{
Identifier: "bridgeOps",
Addresses: []string{"erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"},
},
},
},
},
}
}
Expand Down
8 changes: 8 additions & 0 deletions testscommon/generalConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,14 @@ func GetGeneralConfig() config.Config {
},
},
},
OutgoingSubscribedEvents: config.OutgoingSubscribedEvents{
SubscribedEvents: []config.SubscribedEvent{
{
Identifier: "bridgeOps",
Addresses: []string{"erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"},
},
},
},
},
}
}
Expand Down

0 comments on commit 21f7362

Please sign in to comment.