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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
3eca7670
Commit
3eca7670
authored
2 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
fix clippy warnings
parent
8098931a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
neon/native/src/crypto.rs
+1
-1
1 addition, 1 deletion
neon/native/src/crypto.rs
neon/native/src/transaction.rs
+4
-7
4 additions, 7 deletions
neon/native/src/transaction.rs
rust-bins/duniter-dbex/src/print_found_data.rs
+2
-2
2 additions, 2 deletions
rust-bins/duniter-dbex/src/print_found_data.rs
with
7 additions
and
10 deletions
neon/native/src/crypto.rs
+
1
−
1
View file @
3eca7670
...
@@ -64,7 +64,7 @@ pub fn seed_to_expanded_base58_secret_key(mut cx: FunctionContext) -> JsResult<J
...
@@ -64,7 +64,7 @@ pub fn seed_to_expanded_base58_secret_key(mut cx: FunctionContext) -> JsResult<J
pub
fn
sha256
(
mut
cx
:
FunctionContext
)
->
JsResult
<
JsString
>
{
pub
fn
sha256
(
mut
cx
:
FunctionContext
)
->
JsResult
<
JsString
>
{
let
str_datas
=
cx
.argument
::
<
JsString
>
(
0
)
?
.value
();
let
str_datas
=
cx
.argument
::
<
JsString
>
(
0
)
?
.value
();
Ok
(
cx
.string
(
Hash
::
compute
(
&
str_datas
.as_bytes
())
.to_hex
()
.to_uppercase
()))
Ok
(
cx
.string
(
Hash
::
compute
(
str_datas
.as_bytes
())
.to_hex
()
.to_uppercase
()))
}
}
pub
fn
verify
(
mut
cx
:
FunctionContext
)
->
JsResult
<
JsBoolean
>
{
pub
fn
verify
(
mut
cx
:
FunctionContext
)
->
JsResult
<
JsBoolean
>
{
...
...
This diff is collapsed.
Click to expand it.
neon/native/src/transaction.rs
+
4
−
7
View file @
3eca7670
...
@@ -139,13 +139,10 @@ fn source_is_unlockable_inner(
...
@@ -139,13 +139,10 @@ fn source_is_unlockable_inner(
tx_issuers
:
&
[
ed25519
::
PublicKey
],
tx_issuers
:
&
[
ed25519
::
PublicKey
],
utxo_script
:
&
str
,
utxo_script
:
&
str
,
)
->
bool
{
)
->
bool
{
if
let
Ok
(
utxo_script
)
=
duniter_core
::
documents_parser
::
wallet_script_from_str
(
&
utxo_script
)
{
if
let
Ok
(
utxo_script
)
=
duniter_core
::
documents_parser
::
wallet_script_from_str
(
utxo_script
)
{
if
let
Ok
(
unlockable_on
)
=
SourceV10
::
unlockable_on
(
if
let
Ok
(
unlockable_on
)
=
&
tx_issuers
,
SourceV10
::
unlockable_on
(
tx_issuers
,
&
proofs
.unlocks
,
source_written_on
,
&
utxo_script
)
&
proofs
.unlocks
,
{
source_written_on
,
&
utxo_script
,
)
{
// All proofs are valid and **seem** useful
// All proofs are valid and **seem** useful
// (it is too costly to determine the minimum set of proof that is strictly necessary and sufficient).
// (it is too costly to determine the minimum set of proof that is strictly necessary and sufficient).
unlockable_on
<=
current_bc_time
unlockable_on
<=
current_bc_time
...
...
This diff is collapsed.
Click to expand it.
rust-bins/duniter-dbex/src/print_found_data.rs
+
2
−
2
View file @
3eca7670
...
@@ -288,14 +288,14 @@ fn entry_to_rows(
...
@@ -288,14 +288,14 @@ fn entry_to_rows(
}
=
entry
;
}
=
entry
;
match
value
{
match
value
{
Value
::
Object
(
value_json_map
)
=>
{
Value
::
Object
(
value_json_map
)
=>
{
let
row_map
=
map_entry_by_properties
(
&
only_properties_set
,
key
,
value_json_map
);
let
row_map
=
map_entry_by_properties
(
only_properties_set
,
key
,
value_json_map
);
caps_to_rows_maps
(
row_map
,
captures_names
,
captures_opt
)
caps_to_rows_maps
(
row_map
,
captures_names
,
captures_opt
)
}
}
Value
::
Array
(
json_array
)
=>
json_array
Value
::
Array
(
json_array
)
=>
json_array
.into_iter
()
.into_iter
()
.map
(|
sub_value
|
{
.map
(|
sub_value
|
{
if
let
Value
::
Object
(
sub_value_json_map
)
=
sub_value
{
if
let
Value
::
Object
(
sub_value_json_map
)
=
sub_value
{
map_entry_by_properties
(
&
only_properties_set
,
key
.clone
(),
sub_value_json_map
)
map_entry_by_properties
(
only_properties_set
,
key
.clone
(),
sub_value_json_map
)
}
else
{
}
else
{
unreachable!
()
unreachable!
()
}
}
...
...
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