Simplify block marker metadata (#985)
* wip BlockMarker struct, get rid of PMMRMetadata * use rewind to init the txhashet correctly on startup, we do not need to track pos via metadata (we have block markers), we do not need to open the txhashset with specific pos (we have rewind) * better logging on init * keep rewinding and validating on init, to find a good block * use validate_roots on chain init
This commit is contained in:
committed by
Ignotus Peverell
parent
55f6e3e63f
commit
e22d025dc8
@@ -205,8 +205,10 @@ fn body_sync(peers: Arc<Peers>, chain: Arc<chain::Chain>) {
|
||||
);
|
||||
|
||||
for hash in hashes_to_get.clone() {
|
||||
// TODO - Is there a threshold where we sync from most_work_peer (not
|
||||
// more_work_peer)?
|
||||
// TODO - Is there a threshold where we sync from most_work_peer
|
||||
// (not more_work_peer)?
|
||||
// TODO - right now we *only* sync blocks from a full archival node
|
||||
// even if we are requesting recent blocks (i.e. during a fast sync)
|
||||
let peer = peers.more_work_archival_peer();
|
||||
if let Some(peer) = peer {
|
||||
if let Ok(peer) = peer.try_read() {
|
||||
|
||||
Reference in New Issue
Block a user