Fix exit tree nonces

Remove increment in exit tree leaf nonce when there are multiple exits for the
same account in the same batch.

Add a test to verify the correct implementation of exit leafs caused by
multiple exits.
This commit is contained in:
Eduard S
2021-01-21 16:28:01 +01:00
parent 3801d0bee6
commit 1772422803
2 changed files with 52 additions and 1 deletions

View File

@@ -1134,7 +1134,6 @@ func (tp *TxProcessor) applyExit(coordIdxsMap map[common.TokenID]common.Idx,
} else if err != nil {
return exitAccount, false, tracerr.Wrap(err)
}
exitAccount.Nonce = exitAccount.Nonce + 1
// 1b. if idx already exist in exitTree:
if tp.zki != nil {