Skip to content

Commit cd573bb

Browse files
author
Janis Erdmanis
committed
parser fix revert
1 parent 49937aa commit cd573bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Parser.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,13 @@ width_elgamal_row(::Type{<:ECGroup}, tree::Tree) = depth(tree) == 2 ? 1 : length
553553
width_elgamal_vec(::Type{<:PGroup}, tree::Tree) = depth(tree) == 2 ? 1 : length(tree[1])
554554
width_elgamal_vec(::Type{<:ECGroup}, tree::Tree) = depth(tree) == 3 ? 1 : length(tree[1])
555555

556+
# There is an inconsitency with regards to L here as here it is used to pass length in bits
557+
# wheras in other places it is in lentght of octets. Changing it to mean octets breaks ShuffleProofs tests
558+
# The API here needs to be revised.
556559
# I would need to error on this actually
557560
#Tree(x::Vector{BigInt}; L = bitlength(maximum(x))) = Node([Leaf(i, L) for i in x])
558-
#Tree(x::Vector{BigInt}; L) = Node([Leaf(i; L) for i in x])
559-
Tree(x::Vector{BigInt}; L) = Node([Leaf(i, L) for i in x])
561+
Tree(x::Vector{BigInt}; L) = Node([Leaf(i; L) for i in x])
562+
#Tree(x::Vector{BigInt}; L) = Node([Leaf(i, L) for i in x])
560563

561564
export Tree, Node, Leaf, encode, decode, marshal, unmarshal
562565

0 commit comments

Comments
 (0)