mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Add zki.ISAccFeeOut generation for circuits compat
- add IntermediateStates AccFeeOut correct generation for circuits
compatibility at ZKInputs
- Fix formatAccumulatedFees
- organize ZKInputs tests to check compatibility with Circom circuits
- Add TestZKInputs2
- which checks ZKInputs for 4 L1 txs + 2 L2Txs with fees
- tested with Hermez Circom circuits
This commit is contained in:
@@ -170,7 +170,7 @@ func formatAccumulatedFees(collectedFees map[common.TokenID]*big.Int, orderToken
|
||||
for i := 0; i < len(orderTokenIDs); i++ {
|
||||
tokenID := common.TokenIDFromBigInt(orderTokenIDs[i])
|
||||
if _, ok := collectedFees[tokenID]; ok {
|
||||
accFeeOut[i] = collectedFees[tokenID]
|
||||
accFeeOut[i] = new(big.Int).Set(collectedFees[tokenID])
|
||||
} else {
|
||||
accFeeOut[i] = big.NewInt(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user