|
|
|
@ -46,14 +46,18 @@ public class NodeSmartContractPermissioningOutOfSyncAcceptanceTest |
|
|
|
|
final long blockchainHeight = 25L; |
|
|
|
|
waitForBlockHeight(permissionedNodeA, blockchainHeight); |
|
|
|
|
|
|
|
|
|
// Add Node B
|
|
|
|
|
// verify Node A is in sync with bootnode
|
|
|
|
|
final var minerChainHead = bootnode.execute(ethTransactions.block()); |
|
|
|
|
permissionedNodeA.verify(blockchain.minimumHeight(minerChainHead.getNumber().longValue())); |
|
|
|
|
|
|
|
|
|
// check that connection is forbidden (before node b is permitted)
|
|
|
|
|
permissionedCluster.addNode(permissionedNodeB); |
|
|
|
|
permissionedNodeB.verify(connectionIsForbidden(permissionedNodeA, permissionedNodeB)); |
|
|
|
|
|
|
|
|
|
// Permit Node B
|
|
|
|
|
permissionedNodeA.execute(allowNode(permissionedNodeB)); |
|
|
|
|
permissionedNodeA.verify(admin.addPeer(permissionedNodeB)); |
|
|
|
|
|
|
|
|
|
// check that connection is forbidden (while node b is syncing)
|
|
|
|
|
permissionedNodeB.verify(connectionIsForbidden(permissionedNodeA, permissionedNodeB)); |
|
|
|
|
|
|
|
|
|
// connection should be allowed after node B syncs
|
|
|
|
|
waitForBlockHeight(permissionedNodeB, blockchainHeight); |
|
|
|
|
permissionedNodeB.verify(connectionIsAllowed(permissionedNodeA, permissionedNodeB)); |
|
|
|
|