mirror of
https://github.com/vacp2p/staking-reward-streamer.git
synced 2026-01-09 21:18:01 -05:00
refactor(RewardsStreamerMP): move totalMpStaked to avoid collision
This field was added in between existing fields, causing a storage collision and corruption of existing data.
This commit is contained in:
@@ -44,7 +44,6 @@ contract RewardsStreamerMP is
|
||||
uint256 public constant SCALE_FACTOR = 1e18;
|
||||
|
||||
uint256 public totalStaked;
|
||||
uint256 public totalMPStaked;
|
||||
uint256 public totalMPAccrued;
|
||||
uint256 public totalMaxMP;
|
||||
uint256 public rewardIndex;
|
||||
@@ -72,6 +71,8 @@ contract RewardsStreamerMP is
|
||||
mapping(address owner => address[] vault) public vaults;
|
||||
mapping(address vault => address owner) public vaultOwners;
|
||||
|
||||
uint256 public totalMPStaked;
|
||||
|
||||
modifier onlyRegisteredVault() {
|
||||
if (vaultOwners[msg.sender] == address(0)) {
|
||||
revert StakingManager__VaultNotRegistered();
|
||||
|
||||
Reference in New Issue
Block a user