Skip to content

Commit

Permalink
Revert "state: workaround until a proper leaf hashing system is devel…
Browse files Browse the repository at this point in the history
…oped"

This reverts commit 0ebfa17.
  • Loading branch information
altergui committed Dec 19, 2024
1 parent 431c13c commit 417454b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ func New(db db.Database, processId []byte) (*State, error) {
//
// after Initialize, caller is expected to StartBatch, AddVote, EndBatch, StartBatch...
func (o *State) Initialize(censusRoot, ballotMode, encryptionKey []byte) error {
if err := o.tree.Add(KeyProcessID, o.processID[:31]); err != nil {
if err := o.tree.Add(KeyProcessID, o.processID); err != nil {
return err
}
if err := o.tree.Add(KeyCensusRoot, censusRoot[:31]); err != nil {
if err := o.tree.Add(KeyCensusRoot, censusRoot); err != nil {
return err
}
if err := o.tree.Add(KeyBallotMode, ballotMode[:31]); err != nil {
if err := o.tree.Add(KeyBallotMode, ballotMode); err != nil {
return err
}
if err := o.tree.Add(KeyEncryptionKey, encryptionKey[:31]); err != nil {
if err := o.tree.Add(KeyEncryptionKey, encryptionKey); err != nil {
return err
}
if err := o.tree.Add(KeyResultsAdd, elgamal.NewCiphertext(Curve).Serialize()); err != nil {
Expand Down

0 comments on commit 417454b

Please sign in to comment.