Skip to content

Commit

Permalink
Linter fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed Sep 20, 2023
1 parent 37923e8 commit d8eba3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
4 changes: 2 additions & 2 deletions go/enclave/components/batch_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func NewBatchExecutor(
}

// payL1Fees - this function modifies the state db according to the transactions contained within the batch context
// in order to substract gas fees from the balance. It returns a list of the transactions that have prepaid for their L1
// in order to subtract gas fees from the balance. It returns a list of the transactions that have prepaid for their L1
// publishing costs.
func (executor *batchExecutor) payL1Fees(stateDB *state.StateDB, context *BatchExecutionContext) (common.L2Transactions, common.L2Transactions) {
transactions := make(common.L2Transactions, 0)
Expand Down Expand Up @@ -270,7 +270,7 @@ func (executor *batchExecutor) CreateGenesisState(
return nil, nil, err
}

var limit uint64 = params.MaxGasLimit / 6
var limit = params.MaxGasLimit / 6

Check failure on line 273 in go/enclave/components/batch_executor.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)
if gasLimit != nil {
limit = gasLimit.Uint64()
}
Expand Down
14 changes: 0 additions & 14 deletions go/enclave/gas/gas.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,3 @@ func CalculateL1GasUsed(data []byte, overhead *big.Int) *big.Int {
l1Gas := new(big.Int).SetUint64(reducedTxSize)
return new(big.Int).Add(l1Gas, overhead)
}

// zeroesAndOnes counts the number of 0 bytes and non 0 bytes in a byte slice
func zeroesAndOnes(data []byte) (uint64, uint64) {
var zeroes uint64
var ones uint64
for _, byt := range data {
if byt == 0 {
zeroes++
} else {
ones++
}
}
return zeroes, ones
}
2 changes: 1 addition & 1 deletion go/enclave/gas/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewGasOracle() Oracle {
}

// ProcessL1Block - should be used to update the gas oracle. Currently does not really
// fit into phase 1 gas mechancis as the information needs to be available per block.
// fit into phase 1 gas mechanics as the information needs to be available per block.
// would be fixed when this becomes a smart contract using the stateDB
func (o *oracle) ProcessL1Block(block *types.Block) {
blockBaseFee := block.BaseFee()
Expand Down

0 comments on commit d8eba3e

Please sign in to comment.