Skip to content

Commit

Permalink
core/types: polish TxDifference code and docs a bit (ethereum#17130)
Browse files Browse the repository at this point in the history
* core: fix func TxDifference

fix a typo in func comment;
change named return to unnamed as there's explicit return in the body

* fix another typo in TxDifference
  • Loading branch information
Smilenator authored and karalabe committed Jul 9, 2018
1 parent fbeb4f2 commit 30bdf81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ func (s Transactions) GetRlp(i int) []byte {
return enc
}

// TxDifference returns a new set t which is the difference between a to b.
func TxDifference(a, b Transactions) (keep Transactions) {
keep = make(Transactions, 0, len(a))
// TxDifference returns a new set which is the difference between a and b.
func TxDifference(a, b Transactions) Transactions {
keep := make(Transactions, 0, len(a))

remove := make(map[common.Hash]struct{})
for _, tx := range b {
Expand Down

0 comments on commit 30bdf81

Please sign in to comment.