Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parity-bitcoin
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
parity
parity-bitcoin
Commits
76f0ef28
Commit
76f0ef28
authored
5 years ago
by
Svyatoslav Nikolsky
Browse files
Options
Downloads
Patches
Plain Diff
truncate long lines
parent
66f1eacd
Branches
zcash_backports
Branches containing commit
No related merge requests found
Pipeline
#36658
passed with stage
in 17 minutes and 33 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
p2p/src/protocol/sync.rs
+4
-2
4 additions, 2 deletions
p2p/src/protocol/sync.rs
pbtc/commands/rollback.rs
+3
-1
3 additions, 1 deletion
pbtc/commands/rollback.rs
with
7 additions
and
3 deletions
p2p/src/protocol/sync.rs
+
4
−
2
View file @
76f0ef28
...
...
@@ -212,8 +212,10 @@ impl Protocol for SyncProtocol {
fn
on_message
(
&
mut
self
,
command
:
&
Command
,
payload
:
&
Bytes
)
->
Result
<
(),
Error
>
{
let
version
=
self
.context
.info
()
.version
;
if
command
==
&
types
::
Inv
::
command
()
{
// we are synchronizing => we ask only for blocks with known headers => there are no useful blocks hashes for us
// we are synchronizing => we ignore all transactions until it is completed => there are no useful transactions hashes for us
// we are synchronizing => we ask only for blocks with known headers
// => there are no useful blocks hashes for us
// we are synchronizing
// => we ignore all transactions until it is completed => there are no useful transactions hashes for us
if
self
.state
.synchronizing
()
{
return
Ok
(());
}
...
...
This diff is collapsed.
Click to expand it.
pbtc/commands/rollback.rs
+
3
−
1
View file @
76f0ef28
...
...
@@ -17,7 +17,9 @@ pub fn rollback(cfg: Config, matches: &ArgMatches) -> Result<(), String> {
BlockRef
::
Number
(
block_ref
.parse
()
.map_err
(|
e
|
format!
(
"Invalid block hash: {}"
,
e
))
?
)
};
let
required_block_hash
=
cfg
.db
.block_header
(
block_ref
.clone
())
.ok_or
(
format!
(
"Block {:?} is unknown"
,
block_ref
))
?
.hash
;
let
required_block_hash
=
cfg
.db
.block_header
(
block_ref
.clone
())
.ok_or
(
format!
(
"Block {:?} is unknown"
,
block_ref
),)
?
.hash
;
let
genesis_hash
=
*
cfg
.network
.genesis_block
()
.hash
();
let
mut
best_block_hash
=
cfg
.db
.best_block
()
.hash
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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