gballet / multiproof-rs

A rust implementation of Alexey Akhunov's multiproof algorithm
Apache License 2.0
32 stars 8 forks source link

Add BRANCH instr when adding a hash before nested nodes #6

Closed s1na closed 5 years ago

s1na commented 5 years ago

When generating a multiproof, if a branch child didn't contain any of the target keys, two opcodes: HASHER(0) and ADD(idx) would be added, which fails during rebuild of the tree if there was no previous child to add a BRANCH opcode.