sync tx blobs

This commit is contained in:
realbigsean
2022-02-19 15:00:45 -07:00
parent 4cdf1b546d
commit 4008da6c60
13 changed files with 157 additions and 15 deletions

View File

@@ -16,10 +16,8 @@ use std::sync::Arc;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use store::SyncCommitteeMessage;
use tokio::sync::mpsc;
use types::{
Attestation, AttesterSlashing, EthSpec, ProposerSlashing, SignedAggregateAndProof,
SignedBeaconBlock, SignedContributionAndProof, SignedVoluntaryExit, SubnetId, SyncSubnetId,
};
use lighthouse_network::rpc::methods::TxBlobsByRangeRequest;
use types::{Attestation, AttesterSlashing, BlobWrapper, EthSpec, ProposerSlashing, SignedAggregateAndProof, SignedBeaconBlock, SignedContributionAndProof, SignedVoluntaryExit, SubnetId, SyncSubnetId};
/// Processes validated messages from the network. It relays necessary data to the syncing thread
/// and processes blocks from the pubsub network.
@@ -204,6 +202,25 @@ impl<T: BeaconChainTypes> Processor<T> {
});
}
/// Handle a `BlocksByRange` request from the peer.
pub fn on_tx_blobs_by_range_request(
&mut self,
peer_id: PeerId,
request_id: PeerRequestId,
req: TxBlobsByRangeRequest,
) {
//FIXME(sean)
}
pub fn on_tx_blobs_by_range_response(
&mut self,
peer_id: PeerId,
request_id: RequestId,
blob_wrapper: Option<Box<BlobWrapper<T::EthSpec>>>,
) {
//FIXME(sean)
}
/// Handle a `BlocksByRoot` response from the peer.
pub fn on_blocks_by_root_response(
&mut self,