Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contracts/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func CreateTransactionSign(chainConfig *params.ChainConfig, pool *txpool.TxPool,
return err
}
// Add tx signed to local tx pool.
err = pool.Add([]*types.Transaction{txSigned}, true, true)[0]
err = pool.AddLocal(txSigned, true)
if err != nil {
log.Error("Fail to add tx sign to local pool.", "error", err, "number", block.NumberU64(), "hash", block.Hash().Hex(), "from", account.Address, "nonce", nonce)
return err
Expand Down Expand Up @@ -121,7 +121,7 @@ func CreateTransactionSign(chainConfig *params.ChainConfig, pool *txpool.TxPool,
return err
}
// Add tx signed to local tx pool.
err = pool.Add([]*types.Transaction{txSigned}, true, true)[0]
err = pool.AddLocal(txSigned, true)
if err != nil {
log.Error("Fail to add tx secret to local pool.", "error", err, "number", block.NumberU64(), "hash", block.Hash().Hex(), "from", account.Address, "nonce", nonce)
return err
Expand Down Expand Up @@ -150,7 +150,7 @@ func CreateTransactionSign(chainConfig *params.ChainConfig, pool *txpool.TxPool,
return err
}
// Add tx to pool.
err = pool.Add([]*types.Transaction{txSigned}, true, true)[0]
err = pool.AddLocal(txSigned, true)
if err != nil {
log.Error("Fail to add tx opening to local pool.", "error", err, "number", block.NumberU64(), "hash", block.Hash().Hex(), "from", account.Address, "nonce", nonce)
return err
Expand Down
13 changes: 13 additions & 0 deletions core/txpool/legacypool/journal_shared.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package legacypool

import "errors"
Comment on lines +1 to +3
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New file is missing the standard go-ethereum/XDPoSChain license header comment block used throughout core/txpool/legacypool (e.g., list.go, order_tx_journal.go, noncer.go). Add the usual header to keep licensing/attribution consistent.

Copilot uses AI. Check for mistakes.

// errNoActiveJournal is returned if a transaction is attempted to be inserted
// into the journal, but no such file is currently open.
var errNoActiveJournal = errors.New("no active journal")

// devNull is a WriteCloser that just discards anything written into it.
type devNull struct{}

func (*devNull) Write(p []byte) (n int, err error) { return len(p), nil }
func (*devNull) Close() error { return nil }
Loading
Loading