Skip to content

Commit

Permalink
fix producer ID
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Mar 10, 2024
1 parent 0a4f5d1 commit 0e2435a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions go/enclave/components/rollup_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import (
)

type rollupProducerImpl struct {
sequencerID gethcommon.Address
enclaveID gethcommon.Address
storage storage.Storage
batchRegistry BatchRegistry
logger gethlog.Logger
}

func NewRollupProducer(sequencerID gethcommon.Address, storage storage.Storage, batchRegistry BatchRegistry, logger gethlog.Logger) RollupProducer {
func NewRollupProducer(enclaveID gethcommon.Address, storage storage.Storage, batchRegistry BatchRegistry, logger gethlog.Logger) RollupProducer {
return &rollupProducerImpl{
sequencerID: sequencerID,
enclaveID: enclaveID,
logger: logger,
batchRegistry: batchRegistry,
storage: storage,
Expand All @@ -54,7 +54,7 @@ func (re *rollupProducerImpl) CreateInternalRollup(fromBatchNo uint64, upToL1Hei

rh := common.RollupHeader{}
rh.CompressionL1Head = block.Hash()
rh.EnclaveID = re.sequencerID
rh.EnclaveID = re.enclaveID

rh.CrossChainMessages = make([]MessageBus.StructsCrossChainMessage, 0)
for _, b := range batches {
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func NewEnclave(
batchExecutor := components.NewBatchExecutor(storage, gethEncodingService, crossChainProcessors, genesis, gasOracle, chainConfig, config.GasBatchExecutionLimit, logger)
sigVerifier, err := components.NewSignatureValidator(config.SequencerID, storage)
registry := components.NewBatchRegistry(storage, logger)
rProducer := components.NewRollupProducer(config.SequencerID, storage, registry, logger)
rProducer := components.NewRollupProducer(enclaveKey.EnclaveID(), storage, registry, logger)
if err != nil {
logger.Crit("Could not initialise the signature validator", log.ErrKey, err)
}
Expand Down

0 comments on commit 0e2435a

Please sign in to comment.