-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #779 from matter-labs/sb-sync-reorg-with-stable
Sync reorg with stable
- Loading branch information
Showing
8 changed files
with
80 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,17 @@ pragma solidity 0.8.24; | |
|
||
import {ZKChainStorage} from "../ZKChainStorage.sol"; | ||
import {ReentrancyGuard} from "../../../common/ReentrancyGuard.sol"; | ||
|
||
import {PriorityQueue} from "../../libraries/PriorityQueue.sol"; | ||
import {PriorityTree} from "../../libraries/PriorityTree.sol"; | ||
import {Unauthorized} from "../../../common/L1ContractErrors.sol"; | ||
|
||
/// @title Base contract containing functions accessible to the other facets. | ||
/// @author Matter Labs | ||
/// @custom:security-contact [email protected] | ||
contract ZKChainBase is ReentrancyGuard { | ||
using PriorityQueue for PriorityQueue.Queue; | ||
using PriorityTree for PriorityTree.Tree; | ||
|
||
// slither-disable-next-line uninitialized-state | ||
ZKChainStorage internal s; | ||
|
||
|
@@ -64,4 +68,12 @@ contract ZKChainBase is ReentrancyGuard { | |
} | ||
_; | ||
} | ||
|
||
function _getTotalPriorityTxs() internal view returns (uint256) { | ||
if (s.priorityQueue.getFirstUnprocessedPriorityTx() >= s.priorityTree.startIndex) { | ||
return s.priorityTree.getTotalPriorityTxs(); | ||
} else { | ||
return s.priorityQueue.getTotalPriorityTxs(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.