Skip to content

Commit

Permalink
update worker
Browse files Browse the repository at this point in the history
  • Loading branch information
wincenteam committed Nov 7, 2021
1 parent b6d9b67 commit d8331a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ func (env *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsB
}

var coalescedLogs []*types.Log

LOOP:
for {
// If we don't have enough gas for any further transactions then we're done
if env.gasPool.Gas() < params.TxGas {
Expand All @@ -636,11 +636,11 @@ func (env *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsB
err, logs := env.commitTransaction(tx, bc, coinbase, env.gasPool)
switch err {
case core.ErrGasLimitReached:
log.Info("Gas limit exceeded for current block", "block", bc.CurrentBlock().Header().Number.Uint64())
log.Info("Gas limit exceeded for current block", "block", bc.CurrentBlock().Header().Number.Uint64(), "txHash", tx.Hash().Hex())
// Pop the current out-of-gas transaction without shifting in the next from the account
log.Trace("Gas limit exceeded for current block", "sender", tx.From())
//log.Trace("Gas limit exceeded for current block", "sender", tx.From())
txs.Pop()
break
break LOOP

case nil:
// Everything ok, collect the logs and shift in the next transaction from the same account
Expand Down
2 changes: 1 addition & 1 deletion zero/txs/zstate/zstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (state *ZState) AddTxOutWithCheck(addr common.Address, asset assets.Asset,
if state.Num() >= seroparam.VP0() {
count := state.State.AddTxOut_Log(addr.ToPKr())
if count > seroparam.MAX_CONTRACT_OUT_COUNT_LENGTH {
log.Error("[ALARM] ZState AddTxOut Overflow", "MAX_CONTRACT_OUT_COUNT_LENGTH", seroparam.MAX_CONTRACT_OUT_COUNT_LENGTH)
log.Error("[ALARM] ZState AddTxOut Overflow", "MAX_CONTRACT_OUT_COUNT_LENGTH", seroparam.MAX_CONTRACT_OUT_COUNT_LENGTH, "txHash", txhash.Hex())
alarm = true
}
}
Expand Down

0 comments on commit d8331a3

Please sign in to comment.