mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
TxProcessor put ExitInfos computation inside TypeSynchronizer logic to avoid computing it for TypeBatchBuilder case
This commit is contained in:
@@ -405,8 +405,9 @@ func (tp *TxProcessor) ProcessTxs(coordIdxs []common.Idx, l1usertxs, l1coordinat
|
|||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// once all txs processed (exitTree root frozen), for each Exit,
|
if tp.s.Type() == statedb.TypeSynchronizer {
|
||||||
// generate common.ExitInfo data
|
// once all txs processed (exitTree root frozen), for each
|
||||||
|
// Exit, generate common.ExitInfo data
|
||||||
var exitInfos []common.ExitInfo
|
var exitInfos []common.ExitInfo
|
||||||
exitInfosByIdx := make(map[common.Idx]*common.ExitInfo)
|
exitInfosByIdx := make(map[common.Idx]*common.ExitInfo)
|
||||||
for i := 0; i < nTx; i++ {
|
for i := 0; i < nTx; i++ {
|
||||||
@@ -436,9 +437,9 @@ func (tp *TxProcessor) ProcessTxs(coordIdxs []common.Idx, l1usertxs, l1coordinat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if tp.s.Type() == statedb.TypeSynchronizer {
|
// return exitInfos, createdAccounts and collectedFees, so
|
||||||
// retuTypeexitInfos, createdAccounts and collectedFees, so Synchronizer will
|
// Synchronizer will be able to store it into HistoryDB for the
|
||||||
// be able to store it into HistoryDB for the concrete BatchNum
|
// concrete BatchNum
|
||||||
return &ProcessTxOutput{
|
return &ProcessTxOutput{
|
||||||
ZKInputs: nil,
|
ZKInputs: nil,
|
||||||
ExitInfos: exitInfos,
|
ExitInfos: exitInfos,
|
||||||
|
|||||||
Reference in New Issue
Block a user