Remove the rlp dependency in merklehash
u2 opened this issue · comments
The rlp should not be the part of merklehash, we should provide a more abstract way.
https://github.com/cryptape/cita-common/blob/develop/merklehash/src/lib.rs#L39
This could be removed directly.
https://github.com/cryptape/cita-common/blob/develop/merklehash/src/lib.rs#L185
This should be implemented by Fn parameter.
https://github.com/cryptape/cita-common/blob/develop/merklehash/src/lib.rs#L115
What about this one?
ref:
https://github.com/rust-lang/rust/blob/master/src/liballoc/collections/vec_deque.rs
https://github.com/contain-rs/trie
https://github.com/paritytech/parity-bitcoin/blob/master/sync/src/utils/partial_merkle_tree.rs
https://github.com/paritytech/parity-bitcoin/blob/master/chain/src/merkle_root.rs