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
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
Merge requests
!234
Elois/bc
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Elois/bc
elois/bc
into
dev
Overview
0
Commits
4
Pipelines
0
Changes
52
Merged
Éloïs
requested to merge
elois/bc
into
dev
5 years ago
Overview
0
Commits
4
Pipelines
0
Changes
52
Expand
0
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
7d363c83
4 commits,
5 years ago
52 files
+
989
−
825
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
52
Search (e.g. *.vue) (Ctrl+P)
lib/core/core/src/lib.rs
+
16
−
6
Options
@@ -319,24 +319,34 @@ impl DursCore<DuRsConf> {
@@ -319,24 +319,34 @@ impl DursCore<DuRsConf> {
// Get profile path
// Get profile path
let
profile_path
=
self
.soft_meta_datas.profile_path
;
let
profile_path
=
self
.soft_meta_datas.profile_path
;
// Define sync_opts
let
sync_opts_opt
=
if
let
Some
(
ServerMode
::
Sync
(
sync_opts
))
=
self
.server_command
{
Some
(
sync_opts
)
}
else
{
None
};
// Define cautious mode
let
cautious_mode
=
if
let
Some
(
ref
sync_opts
)
=
sync_opts_opt
{
sync_opts
.cautious_mode
}
else
{
true
};
// Instantiate blockchain module and load is conf
// Instantiate blockchain module and load is conf
let
mut
blockchain_module
=
BlockchainModule
::
load_blockchain_conf
(
let
mut
blockchain_module
=
BlockchainModule
::
load_blockchain_conf
(
bc_db
,
bc_db
,
router_sender
.clone
(),
router_sender
.clone
(),
profile_path
,
profile_path
,
RequiredKeysContent
::
MemberKeyPair
(
None
),
RequiredKeysContent
::
MemberKeyPair
(
None
),
cautious_mode
,
);
);
info!
(
"Success to load Blockchain module."
);
info!
(
"Success to load Blockchain module."
);
// Start blockchain module in thread
// Start blockchain module in thread
let
thread_builder
=
thread
::
Builder
::
new
()
.name
(
BlockchainModule
::
name
()
.0
.into
());
let
thread_builder
=
thread
::
Builder
::
new
()
.name
(
BlockchainModule
::
name
()
.0
.into
());
let
sync_opts
=
if
let
Some
(
ServerMode
::
Sync
(
opts
))
=
self
.server_command
{
Some
(
opts
)
}
else
{
None
};
let
blockchain_thread_handler
=
thread_builder
let
blockchain_thread_handler
=
thread_builder
.spawn
(
move
||
blockchain_module
.start_blockchain
(
&
blockchain_receiver
,
sync_opts
))
.spawn
(
move
||
blockchain_module
.start_blockchain
(
&
blockchain_receiver
,
sync_opts
_opt
))
.expect
(
"Fatal error: fail to spawn module main thread !"
);
.expect
(
"Fatal error: fail to spawn module main thread !"
);
// Wait until all modules threads are finished
// Wait until all modules threads are finished
Loading