fixed master (#6465)

* fixed master

* Revert "Merge pull request #6370 from paritytech/light-poa"

This reverts commit 3c60f99def, reversing
changes made to b731ccea18.
This commit is contained in:
Marek Kotewicz
2017-09-05 14:53:09 +02:00
committed by Arkadiy Paronyan
parent e5bbabb2ba
commit 899538ae25
41 changed files with 265 additions and 1269 deletions

View File

@@ -104,8 +104,9 @@ mod packet {
// relay transactions to peers.
pub const SEND_TRANSACTIONS: u8 = 0x06;
// two packets were previously meant to be reserved for epoch proofs.
// these have since been moved to requests.
// request and respond with epoch transition proof
pub const REQUEST_EPOCH_PROOF: u8 = 0x07;
pub const EPOCH_PROOF: u8 = 0x08;
}
// timeouts for different kinds of requests. all values are in milliseconds.
@@ -123,7 +124,6 @@ mod timeout {
pub const CONTRACT_CODE: i64 = 100;
pub const HEADER_PROOF: i64 = 100;
pub const TRANSACTION_PROOF: i64 = 1000; // per gas?
pub const EPOCH_SIGNAL: i64 = 200;
}
/// A request id.
@@ -584,6 +584,12 @@ impl LightProtocol {
packet::SEND_TRANSACTIONS => self.relay_transactions(peer, io, rlp),
packet::REQUEST_EPOCH_PROOF | packet::EPOCH_PROOF => {
// ignore these for now, but leave them specified.
debug!(target: "pip", "Ignoring request/response for epoch proof");
Ok(())
}
other => {
Err(Error::UnrecognizedPacket(other))
}
@@ -946,7 +952,6 @@ impl LightProtocol {
CompleteRequest::Storage(req) => self.provider.storage_proof(req).map(Response::Storage),
CompleteRequest::Code(req) => self.provider.contract_code(req).map(Response::Code),
CompleteRequest::Execution(req) => self.provider.transaction_proof(req).map(Response::Execution),
CompleteRequest::Signal(req) => self.provider.epoch_signal(req).map(Response::Signal),
}
});