From d1d9f34e519c25ac9d7366e760969ed2065e9426 Mon Sep 17 00:00:00 2001 From: winterjihwan <113398351+winterjihwan@users.noreply.github.com> Date: Sun, 26 May 2024 18:54:37 +0900 Subject: [PATCH] core/types: clarify set inclusion in comments (#29839) --- core/types/transaction.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/types/transaction.go b/core/types/transaction.go index 6a27ecbfec..4ac9187bdb 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -556,7 +556,7 @@ func (s Transactions) EncodeIndex(i int, w *bytes.Buffer) { } } -// TxDifference returns a new set which is the difference between a and b. +// TxDifference returns a new set of transactions that are present in a but not in b. func TxDifference(a, b Transactions) Transactions { keep := make(Transactions, 0, len(a)) @@ -574,7 +574,7 @@ func TxDifference(a, b Transactions) Transactions { return keep } -// HashDifference returns a new set which is the difference between a and b. +// HashDifference returns a new set of hashes that are present in a but not in b. func HashDifference(a, b []common.Hash) []common.Hash { keep := make([]common.Hash, 0, len(a))