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

Dev/performance improvement #3

Closed txaty closed 2 years ago

txaty commented 2 years ago

Refactor

  1. Change New method to New(config, blocks) rather than New(blocks, config),
  2. Replace node struct with []byte,
  3. Precompute tree depth for proof neighbor slice allocation,
  4. Fix err handling.