Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dunitrust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nodes
rust
Dunitrust
Commits
b110e079
Commit
b110e079
authored
6 years ago
by
Jonas SPRENGER
Browse files
Options
Downloads
Patches
Plain Diff
[feat] ws2p: replace panic! by fatal_error!
parent
52d5bd0f
No related branches found
No related tags found
1 merge request
!141
Jonas/127 replace all panics by fatal error
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Cargo.lock
+1
-0
1 addition, 0 deletions
Cargo.lock
lib/modules/ws2p/ws2p/Cargo.toml
+1
-0
1 addition, 0 deletions
lib/modules/ws2p/ws2p/Cargo.toml
lib/modules/ws2p/ws2p/src/generate_peer.rs
+3
-2
3 additions, 2 deletions
lib/modules/ws2p/ws2p/src/generate_peer.rs
with
5 additions
and
2 deletions
Cargo.lock
+
1
−
0
View file @
b110e079
...
...
@@ -525,6 +525,7 @@ dependencies = [
"dubp-documents 0.12.0",
"duniter-network 0.1.0-a0.1",
"dup-crypto 0.6.0",
"durs-common-tools 0.1.0",
"durs-conf 0.1.0-a0.1",
"durs-message 0.1.0-a0.1",
"durs-module 0.1.0-a0.1",
...
...
This diff is collapsed.
Click to expand it.
lib/modules/ws2p/ws2p/Cargo.toml
+
1
−
0
View file @
b110e079
...
...
@@ -15,6 +15,7 @@ durs-conf= { path = "../../../core/conf" }
dup-crypto
=
{
path
=
"../../../tools/crypto"
}
dubp-documents
=
{
path
=
"../../../tools/documents"
}
durs-network-documents
=
{
path
=
"../../../tools/network-documents"
}
durs-common-tools
=
{
path
=
"../../../tools/common-tools"
}
durs-ws2p-messages
=
{
path
=
"../ws2p-messages"
}
durs-message
=
{
path
=
"../../../core/message"
}
durs-module
=
{
path
=
"../../../core/module"
}
...
...
This diff is collapsed.
Click to expand it.
lib/modules/ws2p/ws2p/src/generate_peer.rs
+
3
−
2
View file @
b110e079
...
...
@@ -18,6 +18,7 @@
use
bincode
;
use
dubp_documents
::{
Blockstamp
,
CurrencyName
};
use
dup_crypto
::
keys
::
PubKey
;
use
durs_common_tools
::
fatal_error
;
use
durs_network_documents
::
network_endpoint
::
*
;
use
durs_network_documents
::
network_peer
::
*
;
use
durs_network_documents
::
*
;
...
...
@@ -57,7 +58,7 @@ pub fn _self_peer_update_endpoints(
if
let
EndpointEnum
::
V2
(
ep_v2
)
=
ep
{
let
bin_len
=
bincode
::
serialize
(
&
ep_v2
)
.unwrap_or_else
(|
_
|
{
panic
!
(
fatal_error
!
(
"Fail to update self peer : invalid endpoint : {:?} !"
,
ep_v2
)
...
...
@@ -97,7 +98,7 @@ pub fn _generate_self_peer(
if
let
EndpointEnum
::
V2
(
ep_v2
)
=
ep
{
let
bin_len
=
bincode
::
serialize
(
&
ep_v2
)
.unwrap_or_else
(|
_
|
{
panic
!
(
fatal_error
!
(
"Fail to generate self peer : invalid endpoint : {:?} !"
,
ep_v2
)
...
...
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