Added the two functions alongside refactoring calc_merkle_root.
There are a few tests I used to verify that everything functions as planned - Remove those if they do not fit the norm, I am not sure what is our approach to testing in general.
There is a case for the leafRoute enum to function the other way around i.e. referring to the locus of the witness hash rather than the direction of the leaf. I chose what was easier to follow for me.
Added the two functions alongside refactoring calc_merkle_root.
There are a few tests I used to verify that everything functions as planned - Remove those if they do not fit the norm, I am not sure what is our approach to testing in general.
There is a case for the leafRoute enum to function the other way around i.e. referring to the locus of the witness hash rather than the direction of the leaf. I chose what was easier to follow for me.