Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Merge requests
!1369
[feat] bca: add current ud
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
[feat] bca: add current ud
bca-current-ud
into
dev
Overview
0
Commits
1
Pipelines
0
Changes
3
Merged
Éloïs
requested to merge
bca-current-ud
into
dev
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
3
0
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
fd4a3f83
1 commit,
4 years ago
3 files
+
34
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
rust-libs/modules/gva/bca/src/exec_req_type/current_ud.rs
0 → 100644
+
30
−
0
View file @ fd4a3f83
Edit in single-file editor
Open in Web IDE
// Copyright (C) 2020 Éloïs SANCHEZ.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use
crate
::
*
;
pub
(
super
)
async
fn
exec_req_current_ud
(
bca_executor
:
&
BcaExecutor
,
)
->
Result
<
BcaRespTypeV0
,
ExecReqTypeError
>
{
if
let
Some
(
current_ud
)
=
bca_executor
.cm_accessor
.get_current_meta
(|
cm
|
cm
.current_ud
)
.await
{
Ok
(
BcaRespTypeV0
::
CurrentUd
(
current_ud
))
}
else
{
Err
(
"no blockchain"
.into
())
}
}
Loading