From 30bdf817a0d0afb33f3635f1de877f9caf09be05 Mon Sep 17 00:00:00 2001 From: Smilenator Date: Mon, 9 Jul 2018 11:48:54 +0300 Subject: 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 --- core/types/transaction.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/types/transaction.go b/core/types/transaction.go index b824a77f6..82af9335f 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -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 { -- cgit v1.2.3