Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
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
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Dunitrust
Commits
b602946c
This project is archived. Its data is
read-only
.
Commit
b602946c
authored
Nov 26, 2019
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[fix] bc: if stackable block is invalid, write tx must return err
parent
af20ab6d
Branches
Branches containing commit
No related tags found
1 merge request
!235
Elois/engine
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/modules/blockchain/blockchain/src/fork/stackable_blocks.rs
+19
-9
19 additions, 9 deletions
...odules/blockchain/blockchain/src/fork/stackable_blocks.rs
with
19 additions
and
9 deletions
lib/modules/blockchain/blockchain/src/fork/stackable_blocks.rs
+
19
−
9
View file @
b602946c
...
@@ -82,17 +82,27 @@ pub fn apply_stackable_blocks(bc: &mut BlockchainModule) {
...
@@ -82,17 +82,27 @@ pub fn apply_stackable_blocks(bc: &mut BlockchainModule) {
bc
,
bc
,
&
BlockchainEvent
::
StackUpValidBlock
(
Box
::
new
(
new_current_block
)),
&
BlockchainEvent
::
StackUpValidBlock
(
Box
::
new
(
new_current_block
)),
);
);
Ok
(
w
)
}
}
Ok
(
re
)
=>
warn!
(
Ok
(
re
)
=>
{
warn!
(
"fail to stackable_block({}) : {:?}"
,
"fail to stackable_block({}) : {:?}"
,
stackable_block_number
,
re
stackable_block_number
,
re
),
);
Err
(
e
)
=>
warn!
(
Err
(
DbError
::
WriteAbort
{
reason
:
format!
(
"{:?}"
,
re
),
})
}
Err
(
e
)
=>
{
warn!
(
"fail to stackable_block({}) : {:?}"
,
"fail to stackable_block({}) : {:?}"
,
stackable_block_number
,
e
stackable_block_number
,
e
),
);
Err
(
DbError
::
WriteAbort
{
reason
:
format!
(
"{:?}"
,
e
),
})
}
}
}
Ok
(
w
)
});
});
bc
.db
=
Some
(
db
);
bc
.db
=
Some
(
db
);
match
db_write_result
{
match
db_write_result
{
...
...
...
...
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
sign in
to comment