Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joanestebanr committed Jul 25, 2024
1 parent fddefb1 commit 95799d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion dataavailability/datacommittee/datacommittee.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (d *Backend) PostSequence(ctx context.Context, sequence etherman.SequenceBa
MaxSequenceTimestamp: daTypes.ArgUint64(sequence.MaxSequenceTimestamp),
}

signature, err := sequenceBanana.Sign(s.privKey)
signature, err := sequenceBanana.Sign(d.privKey)
if err != nil {
return nil, err
}
Expand Down
9 changes: 0 additions & 9 deletions sequencesender/sequencesender.go
Original file line number Diff line number Diff line change
Expand Up @@ -941,27 +941,18 @@ func (s *SequenceSender) addNewBatchL2Block(l2Block *datastream.L2Block) {
data := s.sequenceData[s.wipBatch]
if data != nil {
wipBatchRaw := data.batchRaw
//data.batch.LastL2BLockTimestamp = l2Block.Timestamp
data.batch.SetLastL2BLockTimestamp(l2Block.Timestamp)
// Sanity check: should be the same coinbase within the batch
if common.BytesToAddress(l2Block.Coinbase) != data.batch.LastCoinbase() {
s.logFatalf("[SeqSender] coinbase changed within the batch! (Previous %v, Current %v)", data.batch.LastCoinbase, common.BytesToAddress(l2Block.Coinbase))
}
//data.batch.LastCoinbase = common.BytesToAddress(l2Block.Coinbase)
data.batch.SetLastCoinbase(common.BytesToAddress(l2Block.Coinbase))
//data.batch.L1InfoTreeIndex = l2Block.L1InfotreeIndex
data.batch.SetL1InfoTreeIndex(l2Block.L1InfotreeIndex)
// New L2 block raw
newBlockRaw := state.L2BlockRaw{}

// Add L2 block
wipBatchRaw.Blocks = append(wipBatchRaw.Blocks, newBlockRaw)

// Update batch timestamp
//data.batch.LastL2BLockTimestamp = l2Block.Timestamp
// TODO: Duplicated assignation
data.batch.SetLastL2BLockTimestamp(l2Block.Timestamp)

// Get current L2 block
_, blockRaw := s.getWipL2Block()
if blockRaw == nil {
Expand Down

0 comments on commit 95799d6

Please sign in to comment.