Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
blockchain-workshop
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Wei
blockchain-workshop
Commits
77becfe2
Commit
77becfe2
authored
Apr 09, 2018
by
Michel Schudel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made peers code more symmetrical
parent
2a9f3254
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/main/java/nl/craftsmen/blockchain/craftscoinnode/network/Network.java
.../craftsmen/blockchain/craftscoinnode/network/Network.java
+7
-1
No files found.
src/main/java/nl/craftsmen/blockchain/craftscoinnode/network/Network.java
View file @
77becfe2
...
@@ -55,7 +55,13 @@ public class Network {
...
@@ -55,7 +55,13 @@ public class Network {
}
}
public
void
init
()
{
public
void
init
()
{
this
.
peers
=
genericRepository
.
load
(
Peers
.
class
).
orElse
(
new
Peers
());
Optional
<
Peers
>
peers
=
genericRepository
.
load
(
Peers
.
class
);
if
(!
peers
.
isPresent
())
{
this
.
peers
=
new
Peers
();
genericRepository
.
save
(
this
.
peers
);
}
else
{
this
.
peers
=
peers
.
get
();
}
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment