Skip to content

Commit

Permalink
Merge pull request ethereum#17 from quilt/fix-miner
Browse files Browse the repository at this point in the history
Switch use of `Signer` to `Sponsor` in miner
  • Loading branch information
lightclient authored Jun 22, 2020
2 parents a73274a + 9e002a8 commit 5268cc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func (s TxByNonce) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
type TxByPrice Transactions

func (s TxByPrice) Len() int { return len(s) }
func (s TxByPrice) Less(i, j int) bool { return s[i].data.Price.Cmp(s[j].data.Price) > 0 }
func (s TxByPrice) Less(i, j int) bool { return s[i].GasPrice().Cmp(s[j].GasPrice()) > 0 }
func (s TxByPrice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }

func (s *TxByPrice) Push(x interface{}) {
Expand Down
2 changes: 1 addition & 1 deletion miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ func (w *worker) mainLoop() {

txs := make(map[common.Address]types.Transactions)
for _, tx := range ev.Txs {
acc, _ := types.Sender(w.current.signer, tx)
acc, _ := tx.Sponsor(w.current.signer)
txs[acc] = append(txs[acc], tx)
}
txset := types.NewTransactionsByPriceAndNonce(w.current.signer, txs)
Expand Down

0 comments on commit 5268cc4

Please sign in to comment.