diff options
author | Smilenator <yurivanenko@yandex.ru> | 2018-07-09 16:48:54 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-07-09 16:48:54 +0800 |
commit | 30bdf817a0d0afb33f3635f1de877f9caf09be05 (patch) | |
tree | cf07aec8c261799e07cb5a499cfae1956ed12e00 /core/types/transaction.go | |
parent | fbeb4f20f97988c3715347fb06e0cb2f0e08f20b (diff) | |
download | go-tangerine-30bdf817a0d0afb33f3635f1de877f9caf09be05.tar go-tangerine-30bdf817a0d0afb33f3635f1de877f9caf09be05.tar.gz go-tangerine-30bdf817a0d0afb33f3635f1de877f9caf09be05.tar.bz2 go-tangerine-30bdf817a0d0afb33f3635f1de877f9caf09be05.tar.lz go-tangerine-30bdf817a0d0afb33f3635f1de877f9caf09be05.tar.xz go-tangerine-30bdf817a0d0afb33f3635f1de877f9caf09be05.tar.zst go-tangerine-30bdf817a0d0afb33f3635f1de877f9caf09be05.zip |
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
Diffstat (limited to 'core/types/transaction.go')
-rw-r--r-- | core/types/transaction.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |