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
Commits
8b72d5b0
Commit
8b72d5b0
authored
5 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[ref] dubp-block-doc: sign method not need ownership to signator
parent
119e8d0a
No related branches found
No related tags found
2 merge requests
!232
Elois/local validation
,
!221
WIP: Resolve "Fail to revert block with transactions"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/dubp/block-doc/src/block.rs
+2
-2
2 additions, 2 deletions
lib/dubp/block-doc/src/block.rs
lib/dubp/block-doc/src/block/v10.rs
+1
-1
1 addition, 1 deletion
lib/dubp/block-doc/src/block/v10.rs
with
3 additions
and
3 deletions
lib/dubp/block-doc/src/block.rs
+
2
−
2
View file @
8b72d5b0
...
...
@@ -90,7 +90,7 @@ pub trait BlockDocumentTrait {
/// Verify block hash
fn
verify_hash
(
&
self
)
->
Result
<
(),
VerifyBlockHashError
>
;
/// Sign block
fn
sign
(
&
mut
self
,
signator
:
SignatorEnum
);
fn
sign
(
&
mut
self
,
signator
:
&
SignatorEnum
);
}
impl
BlockDocumentTrait
for
BlockDocument
{
...
...
@@ -209,7 +209,7 @@ impl BlockDocumentTrait for BlockDocument {
}
}
#[inline]
fn
sign
(
&
mut
self
,
signator
:
SignatorEnum
)
{
fn
sign
(
&
mut
self
,
signator
:
&
SignatorEnum
)
{
match
self
{
BlockDocument
::
V10
(
block
)
=>
block
.sign
(
signator
),
}
...
...
This diff is collapsed.
Click to expand it.
lib/dubp/block-doc/src/block/v10.rs
+
1
−
1
View file @
8b72d5b0
...
...
@@ -311,7 +311,7 @@ Transactions:{transactions}
i
.reduce
();
}
}
fn
sign
(
&
mut
self
,
signator
:
SignatorEnum
)
{
fn
sign
(
&
mut
self
,
signator
:
&
SignatorEnum
)
{
self
.signatures
=
vec!
[
signator
.sign
(
self
.compute_will_signed_string
()
.as_bytes
())];
}
fn
verify_inner_hash
(
&
self
)
->
Result
<
(),
VerifyBlockHashError
>
{
...
...
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