mirror of
https://github.com/arnaucube/arbo.git
synced 2026-01-09 07:21:28 +01:00
Add AddBatch CaseC
CASE C: ALMOST CASE B --> if Tree has few Leafs (but numLeafs>=minLeafsThreshold)
==============================================================================
- Use A, B, G, F as Roots of subtrees
- Do CASE B for each subtree
- Then go from L to the Root
R
/ \
/ \
/ \
* *
/ | / \
/ | / \
/ | / \
L: A B G D
/ \
/ \
/ \
C *
/ \
/ \
/ \
... ... (nLeafs >= minLeafsThreshold)
This commit is contained in:
2
utils.go
2
utils.go
@@ -13,7 +13,7 @@ func SwapEndianness(b []byte) []byte {
|
||||
|
||||
// BigIntToBytes converts a *big.Int into a byte array in Little-Endian
|
||||
func BigIntToBytes(bi *big.Int) []byte {
|
||||
var b [32]byte
|
||||
var b [32]byte // TODO make the length depending on the tree.hashFunction.Len()
|
||||
copy(b[:], SwapEndianness(bi.Bytes()))
|
||||
return b[:]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user