Browse Source

Merge pull request #613 from hermeznetwork/fix/zkinputs-ISExitRoot-L1CoordTxs

Fix ZKInputs.ISExitRoot for case of L1CoordTxs
tmp/txsel-fix
Eduard S 3 years ago
committed by GitHub
parent
commit
9e96bc89f0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 94 additions and 1 deletions
  1. +2
    -1
      txprocessor/txprocessor.go
  2. +92
    -0
      txprocessor/zkinputsgen_test.go

+ 2
- 1
txprocessor/txprocessor.go

@ -340,6 +340,7 @@ func (tp *TxProcessor) ProcessTxs(coordIdxs []common.Idx, l1usertxs, l1coordinat
tp.zki.ISOutIdx[tp.i] = tp.s.CurrentIdx().BigInt()
tp.zki.ISStateRoot[tp.i] = tp.s.MT.Root().BigInt()
tp.zki.ISExitRoot[tp.i] = exitTree.Root().BigInt()
tp.i++
}
}
@ -1333,7 +1334,7 @@ func (tp *TxProcessor) applyExit(coordIdxsMap map[common.TokenID]common.Idx,
}
return exitAccount, true, nil
} else if err != nil {
return exitAccount, false, tracerr.Wrap(err)
return nil, false, tracerr.Wrap(err)
}
// 1b. if idx already exist in exitTree:

+ 92
- 0
txprocessor/zkinputsgen_test.go
File diff suppressed because it is too large
View File


Loading…
Cancel
Save