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
110 stars 17 forks source link

Dev/performance improvement #3

Closed txaty closed 1 year ago

txaty commented 1 year 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.