Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FUCoin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DistributedSystems4Students
FUCoin
Commits
cab5c42c
Commit
cab5c42c
authored
8 years ago
by
Luca Keidel
Browse files
Options
Downloads
Patches
Plain Diff
Fixed config loading and introduced remote addresses instead of local addresses
parent
4cb34ef9
No related branches found
No related tags found
1 merge request
!3
Preliminary result of the software
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/fucoin/AbstractNode.java
+4
-8
4 additions, 8 deletions
src/main/java/fucoin/AbstractNode.java
src/main/java/fucoin/Main.java
+1
-1
1 addition, 1 deletion
src/main/java/fucoin/Main.java
with
5 additions
and
9 deletions
src/main/java/fucoin/AbstractNode.java
+
4
−
8
View file @
cab5c42c
package
fucoin
;
import
akka.actor.ActorRef
;
import
akka.actor.Address
;
import
akka.actor.UntypedActor
;
import
fucoin.wallet.AbstractWallet
;
...
...
@@ -20,7 +21,8 @@ public abstract class AbstractNode extends UntypedActor implements Serializable
}
public
String
getAddress
(
ActorRef
self
)
{
return
self
.
path
().
toSerializationFormatWithAddress
(
self
.
path
().
address
());
Address
remoteAddr
=
getContext
().
system
().
provider
().
getDefaultAddress
();
return
self
.
path
().
toStringWithAddress
(
remoteAddr
);
}
/**
...
...
@@ -66,13 +68,7 @@ public abstract class AbstractNode extends UntypedActor implements Serializable
}
public
void
log
(
String
string
)
{
if
(
this
instanceof
AbstractWallet
){
System
.
out
.
println
(
"Yes: "
+
string
);
((
AbstractWallet
)
this
).
log
(
string
);
}
else
{
System
.
out
.
println
(
"No: "
+
this
.
getClass
());
System
.
out
.
println
(
getSelf
().
path
().
name
()
+
": "
+
string
);
}
System
.
out
.
println
(
getSelf
().
path
().
name
()
+
": "
+
string
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/fucoin/Main.java
+
1
−
1
View file @
cab5c42c
...
...
@@ -30,7 +30,7 @@ public class Main {
Config
config
=
ConfigFactory
.
parseFile
(
file
);
if
(!
file
.
exists
())
{
System
.
out
.
println
(
"Load default application.conf"
);
config
=
ConfigFactory
.
parseResources
(
"application.conf
ig
"
);
config
=
ConfigFactory
.
parseResources
(
"application.conf"
);
}
else
{
System
.
out
.
println
(
"Load local application.conf"
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment