Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
feat: test new features
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Jul 20, 2023
1 parent ab7b0c3 commit 7a3ff7e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Push docker image to GCR"

on:
push:
branches: [main,grimsvotn]
branches: [main,grimsvotn-test]
tags:
- "v*"

Expand Down
31 changes: 28 additions & 3 deletions proposer/proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ func (p *Proposer) ProposeOp(ctx context.Context) error {
}

log.Info("Comparing proposer TKO balance to block fee", "proposer", p.l1ProposerAddress.Hex())

if err := p.checkTaikoTokenBalance(); err != nil {
return fmt.Errorf("failed to check Taiko token balance: %w", err)
return fmt.Errorf("failed to check token balance: %w", err)
}

// Wait until L2 execution engine is synced at first.
Expand All @@ -207,6 +206,32 @@ func (p *Proposer) ProposeOp(ctx context.Context) error {
return fmt.Errorf("failed to fetch transaction pool content: %w", err)
}

var (
newTxLists []types.Transactions
signer = types.LatestSignerForChainID(p.rpc.L2ChainID)
)
for _, txs := range txLists {
var filtered types.Transactions
for _, tx := range txs {
sender, err := types.Sender(signer, tx)
if err != nil {
return err
}

for _, localAddress := range p.locals {
if sender == localAddress {
filtered = append(filtered, tx)
}
}
}

if filtered.Len() != 0 {
newTxLists = append(newTxLists, filtered)
}
}

txLists = newTxLists

log.Info("Transactions lists count", "count", len(txLists))

if len(txLists) == 0 {
Expand Down Expand Up @@ -390,7 +415,7 @@ func getTxOpts(
}
}

opts.GasTipCap = gasTipCap
opts.GasTipCap = new(big.Int).Mul(gasTipCap, common.Big2)

return opts, nil
}
Expand Down

0 comments on commit 7a3ff7e

Please sign in to comment.