Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Commit

Permalink
Fix encodng tx in stream (#2629) (#2631)
Browse files Browse the repository at this point in the history
* Fixes Tx encoding in data stream

* fix
  • Loading branch information
ToniRamirezM authored Oct 9, 2023
1 parent d61b40d commit 52ee880
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 7 additions & 2 deletions sequencer/dbmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,16 @@ func (d *dbManager) StoreProcessedTxAndDeleteFromPool(ctx context.Context, tx tr
StateRoot: l2BlockHeader.Root,
}

binaryTxData, err := tx.response.Tx.MarshalBinary()
if err != nil {
return err
}

l2Transaction := state.DSL2Transaction{
EffectiveGasPricePercentage: uint8(tx.response.EffectivePercentage),
IsValid: 1,
EncodedLength: uint32(len(txData)),
Encoded: txData,
EncodedLength: uint32(len(binaryTxData)),
Encoded: binaryTxData,
}

d.dataToStream <- state.DSL2FullBlock{
Expand Down
3 changes: 0 additions & 3 deletions sequencer/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ func (s *Sequencer) updateDataStreamerFile(ctx context.Context, streamServer *da
}

log.Infof("Current transaction index: %d", currentTxIndex)
if currentTxIndex == 0 {
currentL2Block++
}
log.Infof("Current L2 block number: %d", currentL2Block)

var limit uint64 = 1000
Expand Down

0 comments on commit 52ee880

Please sign in to comment.