Commit 30bdf817 authored by Smilenator's avatar Smilenator Committed by Péter Szilágyi

core/types: polish TxDifference code and docs a bit (#17130)

* 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
parent fbeb4f20
...@@ -266,9 +266,9 @@ func (s Transactions) GetRlp(i int) []byte { ...@@ -266,9 +266,9 @@ func (s Transactions) GetRlp(i int) []byte {
return enc return enc
} }
// TxDifference returns a new set t which is the difference between a to b. // TxDifference returns a new set which is the difference between a and b.
func TxDifference(a, b Transactions) (keep Transactions) { func TxDifference(a, b Transactions) Transactions {
keep = make(Transactions, 0, len(a)) keep := make(Transactions, 0, len(a))
remove := make(map[common.Hash]struct{}) remove := make(map[common.Hash]struct{})
for _, tx := range b { for _, tx := range b {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment