txaty / go-merkletree

Go Merkle Tree. High performance, Supporting parallel run, OpenZeppelin sorting pairs.
https://pkg.go.dev/github.com/txaty/go-merkletree
MIT License
114 stars 18 forks source link

Race detected with this library #25

Closed filefilegoadmin closed 1 year ago

filefilegoadmin commented 1 year ago

Running a tests using the -race flag, and using this lib to generate merkle hashes throw a data race signal

txaty commented 1 year ago

Hi, thanks for using the library and making the issue. If you are doing the parallelized execution, please make sure your self-defined hash function is concurrent safe. You may go to default_hash.go and the README for more detail. If the problem is not caused by self-defined hash function, would you mind sharing the console log with data race signal to me please?