hermeznetwork / hermez-node

Hermez node Go implementation
GNU Affero General Public License v3.0
60 stars 33 forks source link

Avoid non-selected txs to have info field update when the batch is full #1155

Closed tclemos closed 2 years ago

tclemos commented 2 years ago

What does this PR does?

Avoid non-selected txs due to batch full to have its info filed updated in the database unnecessarily.

How to test?

Add more transactions in the pool that can fit in one batch, the info field will not be updated if they can't be added to the batch being forged because the batch is full.

Checklist

These are the criteria that every PR should meet, please check them off as you review them:

tclemos commented 2 years ago

Starting test ✓ Init variables (5370ms) ✓ Check ETH L1 deposit (44406ms) ✓ Check ERC20 L1 deposit (48462ms) ✓ Check ETH L1 force exit (38127ms) ✓ Check ERC20 L1 force exit (44144ms) ✓ Check ETH withdrawal from firsts forceExits (12117ms) ✓ Check ERC20 withdrawal from firsts forceExits (12136ms) ✓ Check ETH N L1 force exits (54137ms) ✓ Check ETH withdrawal from previous N force exits (4048ms) ✓ Check single ETH L2 transfer (40236ms) ✓ Check single ERC20 L2 transfer (40206ms) ✓ Transfer ETH to a non-existent Bjj address (40242ms) ✓ Transfer ERC20 to a non-existent Bjj address (50329ms) ✓ Transfer ETH to hermez ethereum address (40199ms) ✓ Transfer ERC20 to hermez ethereum address (50219ms) ✓ Transfer ETH to non-existent ETH address (40350ms) ✓ Transfer ETH to hermez ethereum address from internal account (40245ms) ✓ Transfer ERC20 to hermez ethereum address from internal account (40211ms) ✓ Check multiple L2 ETH transfer in same batch (50969ms) ✓ Check multiple L2 ETH transfer in different batches (150872ms) ✓ Atomic txs (40395ms) ✓ Check L2 ETH exit (50221ms) ✓ Check L2 ERC20 exit (40238ms) ✓ Check ETH withdrawal from L2 exit (8058ms) ✓ Check ERC20 withdrawal from L2 exit (8068ms) ✓ Exit ETH and circuit withdrawal (42464ms) ✓ Assert API endpoints (1683ms) ✓ Update Buckets (16209ms) ✓ Check ETH L1 force exit bucket (54151ms) ✓ Check ERC20 L1 force exit bucket (38144ms) ✓ Check ETH withdrawal buckets (12115ms) ✓ Check ERC20 withdrawal buckets (12129ms) ✓ Check withdrawals buckets

33 passing (20m)