Skip to content

Commit

Permalink
Merge #3899 #3902
Browse files Browse the repository at this point in the history
3899: fix: aligned tables left r=delta1 a=NovaT82

Description
---
Aligned tables to left on RFC docs

Motivation and Context
---
Smaller tables look better when not centered

How Has This Been Tested?
---
Tested locally


3902: fix(core): correctly filter pruned sync peers for block sync r=delta1 a=sdbondi

Description
---
Corrects filter predicate for full block sync peers

Motivation and Context
---
Rpc error: `Service returned an error: BadRequest: Requested full block body at height 6804, however this node has an effective pruned height of 15941` caused by peer incorrectly selecting pruned nodes. 

How Has This Been Tested?
---
Manually


Co-authored-by: NovaT82 <nova@tari.com>
Co-authored-by: Byron Hambly <bizzle@tari.com>
Co-authored-by: Stanimal <sdbondi@users.noreply.github.com>
  • Loading branch information
4 people authored Mar 8, 2022
3 parents f2b353e + dff389d + a89da1b commit c70698a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions RFC/src/theme/css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ h4, h5 { margin-top: 2em; }

.header + .header h3,
.header + .header h4,
.header + .header h5 {
.header + .header h5 {
margin-top: 1em;
}

Expand Down Expand Up @@ -84,12 +84,12 @@ a.header:target h4:before {
}

table {
margin: 0 auto;
border-collapse: collapse;
}
table td {
padding: 3px 20px;
border: 1px var(--table-border-color) solid;
padding: 5px 10px;
}
table thead {
background: var(--table-header-bg);
Expand All @@ -98,6 +98,9 @@ table thead td {
font-weight: 700;
border: none;
}
table thead th {
padding: 5px 10px;
}
table thead tr {
border: 1px var(--table-header-bg) solid;
}
Expand Down Expand Up @@ -147,4 +150,3 @@ blockquote {
.tooltipped .tooltiptext {
visibility: visible;
}

2 changes: 1 addition & 1 deletion base_layer/common_types/src/chain_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct ChainMetadata {
/// (exclusive). If `pruned_height` is equal to the `height_of_longest_chain` no blocks can be
/// provided. Archival nodes wil always have an `pruned_height` of zero.
pruned_height: u64,
/// The total accumuated proof of work of the longest chain
/// The total accumulated proof of work of the longest chain
accumulated_difficulty: u128,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl DecideNextSync {
.sync_peers
.drain(..)
.filter(|sync_peer| {
sync_peer.claimed_chain_metadata().pruning_horizon() <= local_metadata.height_of_longest_chain()
sync_peer.claimed_chain_metadata().pruned_height() <= local_metadata.height_of_longest_chain()
})
.collect::<Vec<_>>();

Expand Down

0 comments on commit c70698a

Please sign in to comment.