core/types: clarify set inclusion in comments (#29839)

This commit is contained in:
winterjihwan 2024-05-26 18:54:37 +09:00 committed by GitHub
parent b6474e9f90
commit d1d9f34e51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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 { func TxDifference(a, b Transactions) Transactions {
keep := make(Transactions, 0, len(a)) keep := make(Transactions, 0, len(a))
@ -574,7 +574,7 @@ func TxDifference(a, b Transactions) Transactions {
return keep 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 { func HashDifference(a, b []common.Hash) []common.Hash {
keep := make([]common.Hash, 0, len(a)) keep := make([]common.Hash, 0, len(a))