Closed philippecamacho closed 2 years ago
LGTM but I wonder why don't we check if there are no commitments instead of checking if there no pending deposits and no notes? It seems a bit simpler to me and since commitments are what go into the merkle tree I think it easier to understand why we reject the block.
In any event I think it would be good to add a comment somewhere about why we reject the block and what problem is caused by not doing that.
LGTM but I wonder why don't we check if there are no commitments instead of checking if there no pending deposits and no notes? It seems a bit simpler to me and since commitments are what go into the merkle tree I think it easier to understand why we reject the block.
Yes, I agree. On the other side it seems to save a bit of gas to reject the block right away. WDYT?
In any event I think it would be good to add a comment somewhere about why we reject the block and what problem is caused by not doing that.
Yes, added in e963fc1
I think we should add a comment as to why we reject empty blocks.
Yes, added in e963fc1.
Closes #1206