Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
  • Loading branch information
matthew1001 committed Jun 25, 2024
1 parent f0606ef commit 6275204
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,20 @@ public void setUp() {
permissionedCluster.start(bootnode, forbiddenNode, allowedNode, permissionedNode);

// updating permissioning smart contract with allowed nodes

permissionedNode.verify(nodeIsForbidden(bootnode));
permissionedNode.execute(allowNode(bootnode));
permissionedNode.verify(nodeIsAllowed(bootnode));

// No need to add peer as Besu treats bootnodes as maintained nodes
// just like static nodes. Just check that it has been added
permissionedNode.verify(admin.hasPeer(bootnode));

permissionedNode.execute(allowNode(allowedNode));
permissionedNode.verify(nodeIsAllowed(allowedNode));

permissionedNode.execute(allowNode(permissionedNode));
permissionedNode.verify(nodeIsAllowed(permissionedNode));

permissionedNode.verify(admin.addPeer(bootnode));
permissionedNode.verify(admin.addPeer(allowedNode));

allowedNode.verify(eth.syncingStatus(false));
Expand Down
3 changes: 2 additions & 1 deletion besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,8 @@ public Runner build() {
LOG.debug("added ethash observer: {}", stratumServer.get());
}

// Make sure Besu maintains connections to static nodes and bootnodes, including retries periodically
// Make sure Besu maintains connections to static nodes and bootnodes, including retries
// periodically
Stream.concat(sanitizePeers(network, staticNodes), sanitizePeers(network, bootnodes))
.map(DefaultPeer::fromEnodeURL)
.forEach(peerNetwork::addMaintainedConnectionPeer);
Expand Down

0 comments on commit 6275204

Please sign in to comment.