Skip to content

Commit 1aecba6

Browse files
committed
Fixing errors from v2 test suite.
1 parent 9ff3ff5 commit 1aecba6

File tree

9 files changed

+611
-419
lines changed

9 files changed

+611
-419
lines changed

script/Deploy.s.sol

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,26 @@ import {SmartnodesDAO} from "../src/SmartnodesDAO.sol";
99

1010
contract Deploy is Script {
1111
address[] genesis;
12+
address[] initialActiveNodes;
1213

1314
function run() external {
15+
initialActiveNodes.push(msg.sender);
1416
genesis.push(msg.sender);
17+
genesis.push(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266);
1518

1619
vm.startBroadcast();
1720

1821
SmartnodesToken token = new SmartnodesToken(genesis);
1922
SmartnodesCore core = new SmartnodesCore(address(token));
23+
24+
bytes32 publicKeyHash = vm.envBytes32("PUBLIC_KEY_HASH");
25+
core.createValidator(publicKeyHash);
26+
2027
SmartnodesCoordinator coordinator = new SmartnodesCoordinator(
2128
3600,
2229
66,
2330
address(core),
24-
genesis
31+
initialActiveNodes
2532
);
2633
SmartnodesDAO dao = new SmartnodesDAO(address(token), address(core));
2734

src/SmartnodesCoordinator.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ contract SmartnodesCoordinator is ReentrancyGuard {
126126
// Initialize validators from genesis nodes
127127
for (uint256 i = 0; i < _genesisNodes.length; i++) {
128128
if (_genesisNodes[i] != address(0)) {
129-
// _addValidator(_genesisNodes[i]);
129+
_addValidator(_genesisNodes[i]);
130130
}
131131
}
132132

0 commit comments

Comments
 (0)