Skip to content

Commit

Permalink
Add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
trunghai.bui committed Oct 19, 2023
1 parent cf5dbc2 commit b328e87
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etherman/etherman.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func (etherMan *Client) updateGlobalExitRootEvent(ctx context.Context, vLog type
t := time.Unix(int64(fullBlock.Time()), 0)
block := prepareBlock(vLog, t, fullBlock)
block.GlobalExitRoots = append(block.GlobalExitRoots, gExitRoot)
log.Debugf("[UpdateGlobalExitRoot Event] gExitRoot[%v]", gExitRoot)
*blocks = append(*blocks, block)
} else if (*blocks)[len(*blocks)-1].BlockHash == vLog.BlockHash && (*blocks)[len(*blocks)-1].BlockNumber == vLog.BlockNumber {
(*blocks)[len(*blocks)-1].GlobalExitRoots = append((*blocks)[len(*blocks)-1].GlobalExitRoots, gExitRoot)
Expand Down Expand Up @@ -239,6 +240,7 @@ func (etherMan *Client) depositEvent(ctx context.Context, vLog types.Log, blocks
}
block := prepareBlock(vLog, time.Unix(int64(fullBlock.Time()), 0), fullBlock)
block.Deposits = append(block.Deposits, deposit)
log.Debugf("[Deposit Event] deposit[%v]", deposit)
*blocks = append(*blocks, block)
} else if (*blocks)[len(*blocks)-1].BlockHash == vLog.BlockHash && (*blocks)[len(*blocks)-1].BlockNumber == vLog.BlockNumber {
(*blocks)[len(*blocks)-1].Deposits = append((*blocks)[len(*blocks)-1].Deposits, deposit)
Expand Down Expand Up @@ -276,6 +278,7 @@ func (etherMan *Client) claimEvent(ctx context.Context, vLog types.Log, blocks *
}
block := prepareBlock(vLog, time.Unix(int64(fullBlock.Time()), 0), fullBlock)
block.Claims = append(block.Claims, claim)
log.Debugf("[Claim Event] claim[%v]", claim)
*blocks = append(*blocks, block)
} else if (*blocks)[len(*blocks)-1].BlockHash == vLog.BlockHash && (*blocks)[len(*blocks)-1].BlockNumber == vLog.BlockNumber {
(*blocks)[len(*blocks)-1].Claims = append((*blocks)[len(*blocks)-1].Claims, claim)
Expand Down

0 comments on commit b328e87

Please sign in to comment.