Custom attribute for binary serialization (#3922)

* derive(Binary) -> binary

* ethcore types refact

* fixup ethcore

* make binary optional

* fix common types

* fix updater

* remove condition
This commit is contained in:
Nikolay Volf
2016-12-21 18:09:35 +04:00
committed by Gav Wood
parent b369939f20
commit af501e6467
39 changed files with 268 additions and 160 deletions

View File

@@ -304,7 +304,7 @@ impl ChainNotify for EthSync {
Some(lp) => lp,
None => return,
};
let chain_info = self.eth_handler.chain.chain_info();
light_proto.make_announcement(context, Announcement {
head_hash: chain_info.best_block_hash,
@@ -431,7 +431,7 @@ impl ManageNetwork for EthSync {
/// IP fiter
#[derive(Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "ipc", derive(Binary))]
#[cfg_attr(feature = "ipc", binary)]
pub enum AllowIP {
/// Connect to any address
All,
@@ -454,7 +454,7 @@ impl AllowIP {
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "ipc", derive(Binary))]
#[cfg_attr(feature = "ipc", binary)]
/// Network service configuration
pub struct NetworkConfiguration {
/// Directory path to store general network configuration. None means nothing will be saved
@@ -558,7 +558,7 @@ impl From<BasicNetworkConfiguration> for NetworkConfiguration {
/// Configuration for IPC service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "ipc", derive(Binary))]
#[cfg_attr(feature = "ipc", binary)]
pub struct ServiceConfiguration {
/// Sync config.
pub sync: SyncConfig,