You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
varcheckNoncesQuery=fmt.Sprintf(` UPDATE tx_pool SET state = '%s', batch_num = %%d FROM (VALUES (NULL::::BIGINT, NULL::::BIGINT), (:idx, :nonce) ) as updated_acc (idx, nonce) WHERE tx_pool.from_idx = updated_acc.idx AND tx_pool.nonce <= updated_acc.nonce; `, common.PoolL2TxStateInvalid)
// CheckNonces invalidate txs with nonces that are smaller or equal than their// respective accounts nonces. The state of the affected txs will be changed// from Pending to Invalidfunc (l2db*L2DB) CheckNonces(updatedAccounts []common.IdxNonce, batchNum common.BatchNum) (errerror) {
iflen(updatedAccounts) ==0 {
returnnil
}
// Fill the batch_num in the query with Sprintf because we are using a// named query which works with slices, and doens't handle an extra// individual argument.query:=fmt.Sprintf(checkNoncesQuery, batchNum)
if_, err:=sqlx.NamedExec(l2db.db, query, updatedAccounts); err!=nil {
returntracerr.Wrap(err)
}
returnnil
}
The text was updated successfully, but these errors were encountered:
- Test all the purger functions
- Fix nonces set by til (previously til started with nonce 1 for pool l2txs,
but the correct implementation is to start with nonce 0)
- Rename L2DB.CheckNonces to L2DB.invalidateOldNoncesQuery
- Rename L2DB.checkNoncesQuery to L2DB.InvalidateOldNonces
Related #392 (Fix checkNoncesQuery)
Resolve#396
- Test all the purger functions
- Fix nonces set by til (previously til started with nonce 1 for pool l2txs,
but the correct implementation is to start with nonce 0)
- Rename L2DB.CheckNonces to L2DB.invalidateOldNoncesQuery
- Rename L2DB.checkNoncesQuery to L2DB.InvalidateOldNonces
Related #392 (Fix checkNoncesQuery)
Resolve#396
- Test all the purger functions
- Fix nonces set by til (previously til started with nonce 1 for pool l2txs,
but the correct implementation is to start with nonce 0)
- Rename L2DB.CheckNonces to L2DB.invalidateOldNoncesQuery
- Rename L2DB.checkNoncesQuery to L2DB.InvalidateOldNonces
Related #392 (Fix checkNoncesQuery)
Resolve#396
The text was updated successfully, but these errors were encountered: