From b38d95328d739828310eb9ed0d7dbc80821792e1 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Wed, 7 Dec 2016 10:50:18 +0100 Subject: [PATCH 001/131] light: conditional compilation --- Cargo.lock | 1 - Cargo.toml | 1 + ethcore/Cargo.toml | 1 + ethcore/src/client/client.rs | 5 +++-- ethcore/src/client/mod.rs | 5 ++++- ethcore/src/client/traits.rs | 1 + ethcore/src/state/mod.rs | 3 +++ 7 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cca8b014d..7dc6f7bcb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -298,7 +298,6 @@ dependencies = [ "ethcore-ipc 1.4.0", "ethcore-ipc-codegen 1.4.0", "ethcore-ipc-nano 1.4.0", - "ethcore-network 1.5.0", "ethcore-util 1.5.0", "ethjson 0.1.0", "ethkey 0.2.0", diff --git a/Cargo.toml b/Cargo.toml index 078d2916c..9d6848b6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,6 +80,7 @@ ethstore-cli = ["ethcore/ethstore-cli"] evm-debug = ["ethcore/evm-debug"] evm-debug-tests = ["ethcore/evm-debug-tests"] slow-blocks = ["ethcore/slow-blocks"] +light = ["ethcore/light"] [[bin]] path = "parity/main.rs" diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index bd87c422f..2c3d946f4 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -58,5 +58,6 @@ dev = ["clippy"] default = [] benches = [] ipc = [] +light = [] ethkey-cli = ["ethkey/cli"] ethstore-cli = ["ethstore/cli"] diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 21c5a2366..ee72ea8b8 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -52,7 +52,7 @@ use blockchain::{BlockChain, BlockProvider, TreeRoute, ImportRoute}; use client::{ BlockID, TransactionID, UncleID, TraceId, ClientConfig, BlockChainClient, MiningBlockChainClient, TraceFilter, CallAnalytics, BlockImportError, Mode, - ChainNotify, PruningInfo, ProvingBlockChainClient, + ChainNotify, PruningInfo, }; use client::Error as ClientError; use env_info::EnvInfo; @@ -1377,7 +1377,8 @@ impl MayPanic for Client { } } -impl ProvingBlockChainClient for Client { +#[cfg(feature = "light")] +impl ::client::ProvingBlockChainClient for Client { fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockID) -> Vec { self.state_at(id) .and_then(move |state| state.prove_storage(key1, key2, from_level).ok()) diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index af4daece6..beab88e8a 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -27,7 +27,10 @@ pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChain pub use self::error::Error; pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::ChainNotify; -pub use self::traits::{BlockChainClient, MiningBlockChainClient, ProvingBlockChainClient}; +pub use self::traits::{BlockChainClient, MiningBlockChainClient}; + +#[cfg(feature = "light")] +pub use self::traits::ProvingBlockChainClient; pub use types::ids::*; pub use types::trace_filter::Filter as TraceFilter; diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 7bf17279c..3eed9aa5d 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -278,6 +278,7 @@ pub trait MiningBlockChainClient: BlockChainClient { } /// Extended client interface for providing proofs of the state. +#[cfg(feature = "light")] pub trait ProvingBlockChainClient: BlockChainClient { /// Prove account storage at a specific block id. /// diff --git a/ethcore/src/state/mod.rs b/ethcore/src/state/mod.rs index b3d63d0ae..d39481048 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -31,6 +31,8 @@ use transaction::SignedTransaction; use state_db::StateDB; use util::*; + +#[cfg(feature = "light")] use util::trie::recorder::{Recorder, BasicRecorder as TrieRecorder}; mod account; @@ -762,6 +764,7 @@ impl State { } // LES state proof implementations. +#[cfg(feature = "light")] impl State { /// Prove an account's existence or nonexistence in the state trie. /// Returns a merkle proof of the account's trie node with all nodes before `from_level` From cdc758368a74c00d7d281a0cc7cd5d2888004c47 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Wed, 7 Dec 2016 13:52:45 +0100 Subject: [PATCH 002/131] les: flesh out event handler --- Cargo.lock | 16 ++++ Cargo.toml | 4 +- ethcore/light/Cargo.toml | 2 +- ethcore/light/src/net/mod.rs | 145 +++++++++++++++++++++++++---------- sync/Cargo.toml | 2 + sync/src/lib.rs | 4 + 6 files changed, 129 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7dc6f7bcb..b00701f32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -456,6 +456,21 @@ dependencies = [ "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ethcore-light" +version = "1.5.0" +dependencies = [ + "ethcore 1.5.0", + "ethcore-io 1.5.0", + "ethcore-ipc 1.4.0", + "ethcore-ipc-codegen 1.4.0", + "ethcore-network 1.5.0", + "ethcore-util 1.5.0", + "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rlp 0.1.0", + "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ethcore-logger" version = "1.5.0" @@ -664,6 +679,7 @@ dependencies = [ "ethcore-ipc 1.4.0", "ethcore-ipc-codegen 1.4.0", "ethcore-ipc-nano 1.4.0", + "ethcore-light 1.5.0", "ethcore-network 1.5.0", "ethcore-util 1.5.0", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 9d6848b6a..4730cef0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ winapi = "0.2" daemonize = "0.2" [features] -default = ["ui-precompiled"] +default = ["ui-precompiled", "light"] ui = [ "dapps", @@ -80,7 +80,7 @@ ethstore-cli = ["ethcore/ethstore-cli"] evm-debug = ["ethcore/evm-debug"] evm-debug-tests = ["ethcore/evm-debug-tests"] slow-blocks = ["ethcore/slow-blocks"] -light = ["ethcore/light"] +light = ["ethcore/light", "ethsync/light"] [[bin]] path = "parity/main.rs" diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index 74400d7ab..9440bbf88 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -12,7 +12,7 @@ build = "build.rs" [dependencies] log = "0.3" -ethcore = { path = ".." } +ethcore = { path = "..", features = ["light"] } ethcore-util = { path = "../../util" } ethcore-network = { path = "../../util/network" } ethcore-io = { path = "../../util/io" } diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index a1b3b30b0..e729b4361 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -20,11 +20,13 @@ //! See https://github.com/ethcore/parity/wiki/Light-Ethereum-Subprotocol-(LES) use ethcore::transaction::SignedTransaction; +use ethcore::receipt::Receipt; + use io::TimerToken; use network::{NetworkProtocolHandler, NetworkContext, NetworkError, PeerId}; use rlp::{RlpStream, Stream, UntrustedRlp, View}; use util::hash::H256; -use util::{Mutex, RwLock, U256}; +use util::{Bytes, Mutex, RwLock, U256}; use time::SteadyTime; use std::collections::{HashMap, HashSet}; @@ -134,16 +136,50 @@ impl Peer { } } +/// Context for a network event. +pub struct EventContext<'a> { + /// Protocol implementation. + pub proto: &'a LightProtocol, + /// Network context to enable immediate response to + /// events. + pub io: &'a NetworkContext<'a>, + /// Relevant peer for event. + pub peer: PeerId, +} + /// An LES event handler. +/// +/// Each handler function takes a context which describes the relevant peer +/// and gives references to the IO layer and protocol structure so new messages +/// can be dispatched immediately. +/// +/// Request responses are not guaranteed to be complete or valid, but passed IDs will be correct. +/// Response handlers are not given a copy of the original request; it is assumed +/// that relevant data will be stored by interested handlers. pub trait Handler: Send + Sync { /// Called when a peer connects. - fn on_connect(&self, _id: PeerId, _status: &Status, _capabilities: &Capabilities) { } - /// Called when a peer disconnects - fn on_disconnect(&self, _id: PeerId) { } + fn on_connect(&self, _ctx: EventContext, _status: &Status, _capabilities: &Capabilities) { } + /// Called when a peer disconnects, with a list of unfulfilled request IDs as + /// of yet. + fn on_disconnect(&self, _ctx: EventContext, _unfulfilled: &[ReqId]) { } /// Called when a peer makes an announcement. - fn on_announcement(&self, _id: PeerId, _announcement: &Announcement) { } + fn on_announcement(&self, _ctx: EventContext, _announcement: &Announcement) { } /// Called when a peer requests relay of some transactions. - fn on_transactions(&self, _id: PeerId, _relay: &[SignedTransaction]) { } + fn on_transactions(&self, _ctx: EventContext, _relay: &[SignedTransaction]) { } + /// Called when a peer responds with block bodies. + fn on_block_bodies(&self, _ctx: EventContext, _req_id: ReqId, _bodies: &[Bytes]) { } + /// Called when a peer responds with block headers. + fn on_block_headers(&self, _ctx: EventContext, _req_id: ReqId, _headers: &[Bytes]) { } + /// Called when a peer responds with block receipts. + fn on_receipts(&self, _ctx: EventContext, _req_id: ReqId, _receipts: &[Vec]) { } + /// Called when a peer responds with state proofs. Each proof is a series of trie + /// nodes in ascending order by distance from the root. + fn on_state_proofs(&self, _ctx: EventContext, _req_id: ReqId, _proofs: &[Vec]) { } + /// Called when a peer responds with contract code. + fn on_code(&self, _ctx: EventContext, _req_id: ReqId, _codes: &[Bytes]) { } + /// Called when a peer responds with header proofs. Each proof is a series of trie + /// nodes is ascending order by distance from the root. + fn on_header_proofs(&self, _ctx: EventContext, _req_id: ReqId, _proofs: &[Vec]) { } } // a request and the time it was made. @@ -290,7 +326,8 @@ impl LightProtocol { /// Add an event handler. /// Ownership will be transferred to the protocol structure, /// and the handler will be kept alive as long as it is. - /// These are intended to be added at the beginning of the + /// These are intended to be added when the protocol structure + /// is initialized as a means of customizing its behavior. pub fn add_handler(&mut self, handler: Box) { self.handlers.push(handler); } @@ -313,12 +350,23 @@ impl LightProtocol { } // called when a peer disconnects. - fn on_disconnect(&self, peer: PeerId) { - // TODO: reassign all requests assigned to this peer. + fn on_disconnect(&self, peer: PeerId, io: &NetworkContext) { self.pending_peers.write().remove(&peer); - if self.peers.write().remove(&peer).is_some() { + if let Some(peer_info) = self.peers.write().remove(&peer) { + let unfulfilled: Vec<_> = peer_info.into_inner().current_asking.into_iter().map(ReqId).collect(); + { + let mut pending = self.pending_requests.write(); + for &ReqId(ref inner) in &unfulfilled { + pending.remove(inner); + } + } + for handler in &self.handlers { - handler.on_disconnect(peer) + handler.on_disconnect(EventContext { + peer: peer, + io: io, + proto: self, + }, &unfulfilled) } } } @@ -350,7 +398,7 @@ impl LightProtocol { } // Handle status message from peer. - fn status(&self, peer: &PeerId, data: UntrustedRlp) -> Result<(), Error> { + fn status(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { let pending = match self.pending_peers.write().remove(peer) { Some(pending) => pending, None => { @@ -377,45 +425,56 @@ impl LightProtocol { })); for handler in &self.handlers { - handler.on_connect(*peer, &status, &capabilities) + handler.on_connect(EventContext { + peer: *peer, + io: io, + proto: self, + }, &status, &capabilities) } Ok(()) } // Handle an announcement. - fn announcement(&self, peer: &PeerId, data: UntrustedRlp) -> Result<(), Error> { + fn announcement(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { if !self.peers.read().contains_key(peer) { debug!(target: "les", "Ignoring announcement from unknown peer"); return Ok(()) } let announcement = try!(status::parse_announcement(data)); - let peers = self.peers.read(); - let peer_info = match peers.get(peer) { - Some(info) => info, - None => return Ok(()), - }; - - let mut peer_info = peer_info.lock(); - - // update status. + // scope to ensure locks are dropped before moving into handler-space. { - // TODO: punish peer if they've moved backwards. - let status = &mut peer_info.status; - let last_head = status.head_hash; - status.head_hash = announcement.head_hash; - status.head_td = announcement.head_td; - status.head_num = announcement.head_num; - status.last_head = Some((last_head, announcement.reorg_depth)); + let peers = self.peers.read(); + let peer_info = match peers.get(peer) { + Some(info) => info, + None => return Ok(()), + }; + + let mut peer_info = peer_info.lock(); + + // update status. + { + // TODO: punish peer if they've moved backwards. + let status = &mut peer_info.status; + let last_head = status.head_hash; + status.head_hash = announcement.head_hash; + status.head_td = announcement.head_td; + status.head_num = announcement.head_num; + status.last_head = Some((last_head, announcement.reorg_depth)); + } + + // update capabilities. + peer_info.capabilities.update_from(&announcement); } - // update capabilities. - peer_info.capabilities.update_from(&announcement); - for handler in &self.handlers { - handler.on_announcement(*peer, &announcement); + handler.on_announcement(EventContext { + peer: *peer, + io: io, + proto: self, + }, &announcement); } Ok(()) @@ -736,7 +795,7 @@ impl LightProtocol { } // Receive a set of transactions to relay. - fn relay_transactions(&self, peer: &PeerId, data: UntrustedRlp) -> Result<(), Error> { + fn relay_transactions(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { const MAX_TRANSACTIONS: usize = 256; let txs: Vec<_> = try!(data.iter().take(MAX_TRANSACTIONS).map(|x| x.as_val::()).collect()); @@ -744,7 +803,11 @@ impl LightProtocol { debug!(target: "les", "Received {} transactions to relay from peer {}", txs.len(), peer); for handler in &self.handlers { - handler.on_transactions(*peer, &txs); + handler.on_transactions(EventContext { + peer: *peer, + io: io, + proto: self, + }, &txs); } Ok(()) @@ -761,8 +824,8 @@ impl NetworkProtocolHandler for LightProtocol { // handle the packet let res = match packet_id { - packet::STATUS => self.status(peer, rlp), - packet::ANNOUNCE => self.announcement(peer, rlp), + packet::STATUS => self.status(peer, io, rlp), + packet::ANNOUNCE => self.announcement(peer, io, rlp), packet::GET_BLOCK_HEADERS => self.get_block_headers(peer, io, rlp), packet::BLOCK_HEADERS => self.block_headers(peer, io, rlp), @@ -782,7 +845,7 @@ impl NetworkProtocolHandler for LightProtocol { packet::GET_HEADER_PROOFS => self.get_header_proofs(peer, io, rlp), packet::HEADER_PROOFS => self.header_proofs(peer, io, rlp), - packet::SEND_TRANSACTIONS => self.relay_transactions(peer, rlp), + packet::SEND_TRANSACTIONS => self.relay_transactions(peer, io, rlp), other => { Err(Error::UnrecognizedPacket(other)) @@ -809,8 +872,8 @@ impl NetworkProtocolHandler for LightProtocol { self.on_connect(peer, io); } - fn disconnected(&self, _io: &NetworkContext, peer: &PeerId) { - self.on_disconnect(*peer); + fn disconnected(&self, io: &NetworkContext, peer: &PeerId) { + self.on_disconnect(*peer, io); } fn timeout(&self, _io: &NetworkContext, timer: TimerToken) { diff --git a/sync/Cargo.toml b/sync/Cargo.toml index 738f5f55c..df0f4840d 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -15,6 +15,7 @@ ethcore-ipc-codegen = { path = "../ipc/codegen" } ethcore-util = { path = "../util" } ethcore-network = { path = "../util/network" } ethcore-io = { path = "../util/io" } +ethcore-light = { path = "../ethcore/light", optional = true } ethcore = { path = "../ethcore" } rlp = { path = "../util/rlp" } clippy = { version = "0.0.103", optional = true} @@ -31,4 +32,5 @@ parking_lot = "0.3" [features] default = ["ipc"] dev = ["clippy", "ethcore/dev", "ethcore-util/dev"] +light = ["ethcore-light"] ipc = [] diff --git a/sync/src/lib.rs b/sync/src/lib.rs index 2061e4e3a..7a4f22fd7 100644 --- a/sync/src/lib.rs +++ b/sync/src/lib.rs @@ -37,6 +37,10 @@ extern crate semver; extern crate parking_lot; extern crate rlp; +#[cfg(feature = "light")] +extern crate ethcore_light as light; + + #[macro_use] extern crate log; #[macro_use] From 10d75b6de04599880a264c07af77fa5d63fa1556 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Wed, 7 Dec 2016 15:27:04 +0100 Subject: [PATCH 003/131] light: implement all response handlers --- ethcore/light/src/net/error.rs | 6 +- ethcore/light/src/net/mod.rs | 164 ++++++++++++++++++++++++++++----- ethcore/light/src/provider.rs | 5 +- 3 files changed, 151 insertions(+), 24 deletions(-) diff --git a/ethcore/light/src/net/error.rs b/ethcore/light/src/net/error.rs index 0855cdeb8..86dbd54ba 100644 --- a/ethcore/light/src/net/error.rs +++ b/ethcore/light/src/net/error.rs @@ -54,6 +54,8 @@ pub enum Error { WrongNetwork, /// Unknown peer. UnknownPeer, + /// Unsolicited response. + UnsolicitedResponse, } impl Error { @@ -67,6 +69,7 @@ impl Error { Error::UnexpectedHandshake => Punishment::Disconnect, Error::WrongNetwork => Punishment::Disable, Error::UnknownPeer => Punishment::Disconnect, + Error::UnsolicitedResponse => Punishment::Disable, } } } @@ -92,7 +95,8 @@ impl fmt::Display for Error { Error::UnrecognizedPacket(code) => write!(f, "Unrecognized packet: 0x{:x}", code), Error::UnexpectedHandshake => write!(f, "Unexpected handshake"), Error::WrongNetwork => write!(f, "Wrong network"), - Error::UnknownPeer => write!(f, "unknown peer"), + Error::UnknownPeer => write!(f, "Unknown peer"), + Error::UnsolicitedResponse => write!(f, "Peer provided unsolicited data"), } } } \ No newline at end of file diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index e729b4361..9f08c4ca6 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -29,7 +29,7 @@ use util::hash::H256; use util::{Bytes, Mutex, RwLock, U256}; use time::SteadyTime; -use std::collections::{HashMap, HashSet}; +use std::collections::HashMap; use std::sync::atomic::{AtomicUsize, Ordering}; use provider::Provider; @@ -103,7 +103,6 @@ struct PendingPeer { struct Peer { local_buffer: Buffer, // their buffer relative to us remote_buffer: Buffer, // our buffer relative to them - current_asking: HashSet, // pending request ids. status: Status, capabilities: Capabilities, remote_flow: FlowParams, @@ -137,6 +136,7 @@ impl Peer { } /// Context for a network event. +#[derive(Clone)] pub struct EventContext<'a> { /// Protocol implementation. pub proto: &'a LightProtocol, @@ -177,15 +177,16 @@ pub trait Handler: Send + Sync { fn on_state_proofs(&self, _ctx: EventContext, _req_id: ReqId, _proofs: &[Vec]) { } /// Called when a peer responds with contract code. fn on_code(&self, _ctx: EventContext, _req_id: ReqId, _codes: &[Bytes]) { } - /// Called when a peer responds with header proofs. Each proof is a series of trie - /// nodes is ascending order by distance from the root. - fn on_header_proofs(&self, _ctx: EventContext, _req_id: ReqId, _proofs: &[Vec]) { } + /// Called when a peer responds with header proofs. Each proof is a block header coupled + /// with a series of trie nodes is ascending order by distance from the root. + fn on_header_proofs(&self, _ctx: EventContext, _req_id: ReqId, _proofs: &[(Bytes, Vec)]) { } } -// a request and the time it was made. +// a request, the peer who it was made to, and the time it was made. struct Requested { request: Request, timestamp: SteadyTime, + peer_id: PeerId, } /// Protocol parameters. @@ -280,10 +281,10 @@ impl LightProtocol { try!(io.send(*peer_id, packet_id, packet_data)); - peer.current_asking.insert(req_id); self.pending_requests.write().insert(req_id, Requested { request: request, timestamp: SteadyTime::now(), + peer_id: *peer_id, }); Ok(ReqId(req_id)) @@ -331,6 +332,38 @@ impl LightProtocol { pub fn add_handler(&mut self, handler: Box) { self.handlers.push(handler); } + + // Does the common pre-verification of responses before the response itself + // is actually decoded: + // - check whether peer exists + // - check whether request was made + // - check whether request kinds match + fn pre_verify_response(&self, peer: &PeerId, kind: request::Kind, raw: &UntrustedRlp) -> Result { + let req_id: usize = try!(raw.val_at(0)); + let cur_buffer: U256 = try!(raw.val_at(1)); + + trace!(target: "les", "pre-verifying response from peer {}, kind={:?}", peer, kind); + + match self.pending_requests.write().remove(&req_id) { + None => return Err(Error::UnsolicitedResponse), + Some(requested) => { + if requested.peer_id != *peer || requested.request.kind() != kind { + return Err(Error::UnsolicitedResponse) + } + } + } + + let peers = self.peers.read(); + match peers.get(peer) { + Some(peer_info) => { + let mut peer_info = peer_info.lock(); + let actual_buffer = ::std::cmp::min(cur_buffer, *peer_info.remote_flow.limit()); + peer_info.remote_buffer.update_to(actual_buffer); + Ok(ReqId(req_id)) + } + None => Err(Error::UnknownPeer), // probably only occurs in a race of some kind. + } + } } impl LightProtocol { @@ -352,8 +385,13 @@ impl LightProtocol { // called when a peer disconnects. fn on_disconnect(&self, peer: PeerId, io: &NetworkContext) { self.pending_peers.write().remove(&peer); - if let Some(peer_info) = self.peers.write().remove(&peer) { - let unfulfilled: Vec<_> = peer_info.into_inner().current_asking.into_iter().map(ReqId).collect(); + if self.peers.write().remove(&peer).is_some() { + let unfulfilled: Vec<_> = self.pending_requests.read() + .iter() + .filter(|&(_, r)| r.peer_id == peer) + .map(|(&id, _)| ReqId(id)) + .collect(); + { let mut pending = self.pending_requests.write(); for &ReqId(ref inner) in &unfulfilled { @@ -417,7 +455,6 @@ impl LightProtocol { self.peers.write().insert(*peer, Mutex::new(Peer { local_buffer: self.flow_params.create_buffer(), remote_buffer: flow_params.create_buffer(), - current_asking: HashSet::new(), status: status.clone(), capabilities: capabilities.clone(), remote_flow: flow_params, @@ -530,8 +567,19 @@ impl LightProtocol { } // Receive a response for block headers. - fn block_headers(&self, _: &PeerId, _: &NetworkContext, _: UntrustedRlp) -> Result<(), Error> { - unimplemented!() + fn block_headers(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + let req_id = try!(self.pre_verify_response(peer, request::Kind::Headers, &raw)); + let raw_headers: Vec<_> = raw.iter().skip(2).map(|x| x.as_raw().to_owned()).collect(); + + for handler in &self.handlers { + handler.on_block_headers(EventContext { + peer: *peer, + io: io, + proto: self, + }, req_id, &raw_headers); + } + + Ok(()) } // Handle a request for block bodies. @@ -576,8 +624,19 @@ impl LightProtocol { } // Receive a response for block bodies. - fn block_bodies(&self, _: &PeerId, _: &NetworkContext, _: UntrustedRlp) -> Result<(), Error> { - unimplemented!() + fn block_bodies(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + let req_id = try!(self.pre_verify_response(peer, request::Kind::Bodies, &raw)); + let raw_bodies: Vec = raw.iter().skip(2).map(|x| x.as_raw().to_owned()).collect(); + + for handler in &self.handlers { + handler.on_block_bodies(EventContext { + peer: *peer, + io: io, + proto: self, + }, req_id, &raw_bodies); + } + + Ok(()) } // Handle a request for receipts. @@ -622,8 +681,23 @@ impl LightProtocol { } // Receive a response for receipts. - fn receipts(&self, _: &PeerId, _: &NetworkContext, _: UntrustedRlp) -> Result<(), Error> { - unimplemented!() + fn receipts(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + let req_id = try!(self.pre_verify_response(peer, request::Kind::Receipts, &raw)); + let raw_receipts: Vec> = try!(raw + .iter() + .skip(2) + .map(|x| x.as_val()) + .collect()); + + for handler in &self.handlers { + handler.on_receipts(EventContext { + peer: *peer, + io: io, + proto: self, + }, req_id, &raw_receipts); + } + + Ok(()) } // Handle a request for proofs. @@ -679,8 +753,23 @@ impl LightProtocol { } // Receive a response for proofs. - fn proofs(&self, _: &PeerId, _: &NetworkContext, _: UntrustedRlp) -> Result<(), Error> { - unimplemented!() + fn proofs(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + let req_id = try!(self.pre_verify_response(peer, request::Kind::StateProofs, &raw)); + + let raw_proofs: Vec> = raw.iter() + .skip(2) + .map(|x| x.iter().map(|node| node.as_raw().to_owned()).collect()) + .collect(); + + for handler in &self.handlers { + handler.on_state_proofs(EventContext { + peer: *peer, + io: io, + proto: self, + }, req_id, &raw_proofs); + } + + Ok(()) } // Handle a request for contract code. @@ -734,8 +823,20 @@ impl LightProtocol { } // Receive a response for contract code. - fn contract_code(&self, _: &PeerId, _: &NetworkContext, _: UntrustedRlp) -> Result<(), Error> { - unimplemented!() + fn contract_code(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + let req_id = try!(self.pre_verify_response(peer, request::Kind::Codes, &raw)); + + let raw_code: Vec = try!(raw.iter().skip(2).map(|x| x.as_val()).collect()); + + for handler in &self.handlers { + handler.on_code(EventContext { + peer: *peer, + io: io, + proto: self, + }, req_id, &raw_code); + } + + Ok(()) } // Handle a request for header proofs @@ -790,8 +891,27 @@ impl LightProtocol { } // Receive a response for header proofs - fn header_proofs(&self, _: &PeerId, _: &NetworkContext, _: UntrustedRlp) -> Result<(), Error> { - unimplemented!() + fn header_proofs(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + fn decode_res(raw: UntrustedRlp) -> Result<(Bytes, Vec), ::rlp::DecoderError> { + Ok(( + try!(raw.val_at(0)), + try!(raw.at(1)).iter().map(|x| x.as_raw().to_owned()).collect(), + )) + } + + + let req_id = try!(self.pre_verify_response(peer, request::Kind::HeaderProofs, &raw)); + let raw_proofs: Vec<_> = try!(raw.iter().skip(2).map(decode_res).collect()); + + for handler in &self.handlers { + handler.on_header_proofs(EventContext { + peer: *peer, + io: io, + proto: self, + }, req_id, &raw_proofs); + } + + Ok(()) } // Receive a set of transactions to relay. diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index 264df0397..fe7156b58 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -71,7 +71,10 @@ pub trait Provider: Send + Sync { /// Each item in the resulting vector is either the raw bytecode or empty. fn contract_code(&self, req: request::ContractCodes) -> Vec; - /// Provide header proofs from the Canonical Hash Tries. + /// Provide header proofs from the Canonical Hash Tries as well as the headers + /// they correspond to -- each element in the returned vector is a 2-tuple. + /// The first element is a block header and the second a merkle proof of + /// the header in a requested CHT. fn header_proofs(&self, req: request::HeaderProofs) -> Vec; /// Provide pending transactions. From 2d1a3ff09154674fa918c48444d7dea7261b17b5 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Wed, 7 Dec 2016 17:52:10 +0100 Subject: [PATCH 004/131] les: generalize network and event contexts with traits --- ethcore/light/src/net/mod.rs | 223 ++++++++++++++++++----------------- 1 file changed, 114 insertions(+), 109 deletions(-) diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 9f08c4ca6..965e46db6 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -36,9 +36,11 @@ use provider::Provider; use request::{self, Request}; use self::buffer_flow::{Buffer, FlowParams}; +use self::context::{IoContext, EventContext, Ctx}; use self::error::{Error, Punishment}; mod buffer_flow; +mod context; mod error; mod status; @@ -135,18 +137,6 @@ impl Peer { } } -/// Context for a network event. -#[derive(Clone)] -pub struct EventContext<'a> { - /// Protocol implementation. - pub proto: &'a LightProtocol, - /// Network context to enable immediate response to - /// events. - pub io: &'a NetworkContext<'a>, - /// Relevant peer for event. - pub peer: PeerId, -} - /// An LES event handler. /// /// Each handler function takes a context which describes the relevant peer @@ -158,28 +148,28 @@ pub struct EventContext<'a> { /// that relevant data will be stored by interested handlers. pub trait Handler: Send + Sync { /// Called when a peer connects. - fn on_connect(&self, _ctx: EventContext, _status: &Status, _capabilities: &Capabilities) { } + fn on_connect(&self, _ctx: &EventContext, _status: &Status, _capabilities: &Capabilities) { } /// Called when a peer disconnects, with a list of unfulfilled request IDs as /// of yet. - fn on_disconnect(&self, _ctx: EventContext, _unfulfilled: &[ReqId]) { } + fn on_disconnect(&self, _ctx: &EventContext, _unfulfilled: &[ReqId]) { } /// Called when a peer makes an announcement. - fn on_announcement(&self, _ctx: EventContext, _announcement: &Announcement) { } + fn on_announcement(&self, _ctx: &EventContext, _announcement: &Announcement) { } /// Called when a peer requests relay of some transactions. - fn on_transactions(&self, _ctx: EventContext, _relay: &[SignedTransaction]) { } + fn on_transactions(&self, _ctx: &EventContext, _relay: &[SignedTransaction]) { } /// Called when a peer responds with block bodies. - fn on_block_bodies(&self, _ctx: EventContext, _req_id: ReqId, _bodies: &[Bytes]) { } + fn on_block_bodies(&self, _ctx: &EventContext, _req_id: ReqId, _bodies: &[Bytes]) { } /// Called when a peer responds with block headers. - fn on_block_headers(&self, _ctx: EventContext, _req_id: ReqId, _headers: &[Bytes]) { } + fn on_block_headers(&self, _ctx: &EventContext, _req_id: ReqId, _headers: &[Bytes]) { } /// Called when a peer responds with block receipts. - fn on_receipts(&self, _ctx: EventContext, _req_id: ReqId, _receipts: &[Vec]) { } + fn on_receipts(&self, _ctx: &EventContext, _req_id: ReqId, _receipts: &[Vec]) { } /// Called when a peer responds with state proofs. Each proof is a series of trie /// nodes in ascending order by distance from the root. - fn on_state_proofs(&self, _ctx: EventContext, _req_id: ReqId, _proofs: &[Vec]) { } + fn on_state_proofs(&self, _ctx: &EventContext, _req_id: ReqId, _proofs: &[Vec]) { } /// Called when a peer responds with contract code. - fn on_code(&self, _ctx: EventContext, _req_id: ReqId, _codes: &[Bytes]) { } + fn on_code(&self, _ctx: &EventContext, _req_id: ReqId, _codes: &[Bytes]) { } /// Called when a peer responds with header proofs. Each proof is a block header coupled /// with a series of trie nodes is ascending order by distance from the root. - fn on_header_proofs(&self, _ctx: EventContext, _req_id: ReqId, _proofs: &[(Bytes, Vec)]) { } + fn on_header_proofs(&self, _ctx: &EventContext, _req_id: ReqId, _proofs: &[(Bytes, Vec)]) { } } // a request, the peer who it was made to, and the time it was made. @@ -257,7 +247,7 @@ impl LightProtocol { /// insufficient buffer. Does not check capabilities before sending. /// On success, returns a request id which can later be coordinated /// with an event. - pub fn request_from(&self, io: &NetworkContext, peer_id: &PeerId, request: Request) -> Result { + pub fn request_from(&self, io: &IoContext, peer_id: &PeerId, request: Request) -> Result { let peers = self.peers.read(); let peer = try!(peers.get(peer_id).ok_or_else(|| Error::UnknownPeer)); let mut peer = peer.lock(); @@ -279,7 +269,7 @@ impl LightProtocol { request::Kind::HeaderProofs => packet::GET_HEADER_PROOFS, }; - try!(io.send(*peer_id, packet_id, packet_data)); + io.send(*peer_id, packet_id, packet_data); self.pending_requests.write().insert(req_id, Requested { request: request, @@ -292,7 +282,7 @@ impl LightProtocol { /// Make an announcement of new chain head and capabilities to all peers. /// The announcement is expected to be valid. - pub fn make_announcement(&self, io: &NetworkContext, mut announcement: Announcement) { + pub fn make_announcement(&self, io: &IoContext, mut announcement: Announcement) { let mut reorgs_map = HashMap::new(); // update stored capabilities @@ -318,9 +308,7 @@ impl LightProtocol { peer_info.sent_head = announcement.head_hash; announcement.reorg_depth = *reorg_depth; - if let Err(e) = io.send(*peer_id, packet::ANNOUNCE, status::write_announcement(&announcement)) { - debug!(target: "les", "Error sending to peer {}: {}", peer_id, e); - } + io.send(*peer_id, packet::ANNOUNCE, status::write_announcement(&announcement)); } } @@ -364,11 +352,61 @@ impl LightProtocol { None => Err(Error::UnknownPeer), // probably only occurs in a race of some kind. } } + + // handle a packet using the given io context. + fn handle_packet(&self, io: &IoContext, peer: &PeerId, packet_id: u8, data: &[u8]) { + let rlp = UntrustedRlp::new(data); + + // handle the packet + let res = match packet_id { + packet::STATUS => self.status(peer, io, rlp), + packet::ANNOUNCE => self.announcement(peer, io, rlp), + + packet::GET_BLOCK_HEADERS => self.get_block_headers(peer, io, rlp), + packet::BLOCK_HEADERS => self.block_headers(peer, io, rlp), + + packet::GET_BLOCK_BODIES => self.get_block_bodies(peer, io, rlp), + packet::BLOCK_BODIES => self.block_bodies(peer, io, rlp), + + packet::GET_RECEIPTS => self.get_receipts(peer, io, rlp), + packet::RECEIPTS => self.receipts(peer, io, rlp), + + packet::GET_PROOFS => self.get_proofs(peer, io, rlp), + packet::PROOFS => self.proofs(peer, io, rlp), + + packet::GET_CONTRACT_CODES => self.get_contract_code(peer, io, rlp), + packet::CONTRACT_CODES => self.contract_code(peer, io, rlp), + + packet::GET_HEADER_PROOFS => self.get_header_proofs(peer, io, rlp), + packet::HEADER_PROOFS => self.header_proofs(peer, io, rlp), + + packet::SEND_TRANSACTIONS => self.relay_transactions(peer, io, rlp), + + other => { + Err(Error::UnrecognizedPacket(other)) + } + }; + + // if something went wrong, figure out how much to punish the peer. + if let Err(e) = res { + match e.punishment() { + Punishment::None => {} + Punishment::Disconnect => { + debug!(target: "les", "Disconnecting peer {}: {}", peer, e); + io.disconnect_peer(*peer) + } + Punishment::Disable => { + debug!(target: "les", "Disabling peer {}: {}", peer, e); + io.disable_peer(*peer) + } + } + } + } } impl LightProtocol { // called when a peer connects. - fn on_connect(&self, peer: &PeerId, io: &NetworkContext) { + fn on_connect(&self, peer: &PeerId, io: &IoContext) { let peer = *peer; match self.send_status(peer, io) { @@ -383,7 +421,7 @@ impl LightProtocol { } // called when a peer disconnects. - fn on_disconnect(&self, peer: PeerId, io: &NetworkContext) { + fn on_disconnect(&self, peer: PeerId, io: &IoContext) { self.pending_peers.write().remove(&peer); if self.peers.write().remove(&peer).is_some() { let unfulfilled: Vec<_> = self.pending_requests.read() @@ -400,7 +438,7 @@ impl LightProtocol { } for handler in &self.handlers { - handler.on_disconnect(EventContext { + handler.on_disconnect(&Ctx { peer: peer, io: io, proto: self, @@ -410,7 +448,7 @@ impl LightProtocol { } // send status to a peer. - fn send_status(&self, peer: PeerId, io: &NetworkContext) -> Result { + fn send_status(&self, peer: PeerId, io: &IoContext) -> Result { let chain_info = self.provider.chain_info(); // TODO: could update capabilities here. @@ -428,7 +466,7 @@ impl LightProtocol { let capabilities = self.capabilities.read().clone(); let status_packet = status::write_handshake(&status, &capabilities, &self.flow_params); - try!(io.send(peer, packet::STATUS, status_packet)); + io.send(peer, packet::STATUS, status_packet); Ok(PendingPeer { sent_head: chain_info.best_block_hash, @@ -436,7 +474,7 @@ impl LightProtocol { } // Handle status message from peer. - fn status(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { + fn status(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { let pending = match self.pending_peers.write().remove(peer) { Some(pending) => pending, None => { @@ -462,7 +500,7 @@ impl LightProtocol { })); for handler in &self.handlers { - handler.on_connect(EventContext { + handler.on_connect(&Ctx { peer: *peer, io: io, proto: self, @@ -473,7 +511,7 @@ impl LightProtocol { } // Handle an announcement. - fn announcement(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { + fn announcement(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { if !self.peers.read().contains_key(peer) { debug!(target: "les", "Ignoring announcement from unknown peer"); return Ok(()) @@ -507,7 +545,7 @@ impl LightProtocol { } for handler in &self.handlers { - handler.on_announcement(EventContext { + handler.on_announcement(&Ctx { peer: *peer, io: io, proto: self, @@ -518,7 +556,7 @@ impl LightProtocol { } // Handle a request for block headers. - fn get_block_headers(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { + fn get_block_headers(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { const MAX_HEADERS: usize = 512; let peers = self.peers.read(); @@ -563,16 +601,18 @@ impl LightProtocol { } stream.out() - }).map_err(Into::into) + }); + + Ok(()) } // Receive a response for block headers. - fn block_headers(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + fn block_headers(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::Headers, &raw)); let raw_headers: Vec<_> = raw.iter().skip(2).map(|x| x.as_raw().to_owned()).collect(); for handler in &self.handlers { - handler.on_block_headers(EventContext { + handler.on_block_headers(&Ctx { peer: *peer, io: io, proto: self, @@ -583,7 +623,7 @@ impl LightProtocol { } // Handle a request for block bodies. - fn get_block_bodies(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { + fn get_block_bodies(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { const MAX_BODIES: usize = 256; let peers = self.peers.read(); @@ -620,16 +660,18 @@ impl LightProtocol { } stream.out() - }).map_err(Into::into) + }); + + Ok(()) } // Receive a response for block bodies. - fn block_bodies(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + fn block_bodies(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::Bodies, &raw)); let raw_bodies: Vec = raw.iter().skip(2).map(|x| x.as_raw().to_owned()).collect(); for handler in &self.handlers { - handler.on_block_bodies(EventContext { + handler.on_block_bodies(&Ctx { peer: *peer, io: io, proto: self, @@ -640,7 +682,7 @@ impl LightProtocol { } // Handle a request for receipts. - fn get_receipts(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { + fn get_receipts(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { const MAX_RECEIPTS: usize = 256; let peers = self.peers.read(); @@ -677,11 +719,13 @@ impl LightProtocol { } stream.out() - }).map_err(Into::into) + }); + + Ok(()) } // Receive a response for receipts. - fn receipts(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + fn receipts(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::Receipts, &raw)); let raw_receipts: Vec> = try!(raw .iter() @@ -690,7 +734,7 @@ impl LightProtocol { .collect()); for handler in &self.handlers { - handler.on_receipts(EventContext { + handler.on_receipts(&Ctx { peer: *peer, io: io, proto: self, @@ -701,7 +745,7 @@ impl LightProtocol { } // Handle a request for proofs. - fn get_proofs(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { + fn get_proofs(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { const MAX_PROOFS: usize = 128; let peers = self.peers.read(); @@ -749,11 +793,13 @@ impl LightProtocol { } stream.out() - }).map_err(Into::into) + }); + + Ok(()) } // Receive a response for proofs. - fn proofs(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + fn proofs(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::StateProofs, &raw)); let raw_proofs: Vec> = raw.iter() @@ -762,7 +808,7 @@ impl LightProtocol { .collect(); for handler in &self.handlers { - handler.on_state_proofs(EventContext { + handler.on_state_proofs(&Ctx { peer: *peer, io: io, proto: self, @@ -773,7 +819,7 @@ impl LightProtocol { } // Handle a request for contract code. - fn get_contract_code(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { + fn get_contract_code(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { const MAX_CODES: usize = 256; let peers = self.peers.read(); @@ -819,17 +865,19 @@ impl LightProtocol { } stream.out() - }).map_err(Into::into) + }); + + Ok(()) } // Receive a response for contract code. - fn contract_code(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + fn contract_code(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::Codes, &raw)); let raw_code: Vec = try!(raw.iter().skip(2).map(|x| x.as_val()).collect()); for handler in &self.handlers { - handler.on_code(EventContext { + handler.on_code(&Ctx { peer: *peer, io: io, proto: self, @@ -840,7 +888,7 @@ impl LightProtocol { } // Handle a request for header proofs - fn get_header_proofs(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { + fn get_header_proofs(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { const MAX_PROOFS: usize = 256; let peers = self.peers.read(); @@ -887,11 +935,13 @@ impl LightProtocol { } stream.out() - }).map_err(Into::into) + }); + + Ok(()) } // Receive a response for header proofs - fn header_proofs(&self, peer: &PeerId, io: &NetworkContext, raw: UntrustedRlp) -> Result<(), Error> { + fn header_proofs(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { fn decode_res(raw: UntrustedRlp) -> Result<(Bytes, Vec), ::rlp::DecoderError> { Ok(( try!(raw.val_at(0)), @@ -904,7 +954,7 @@ impl LightProtocol { let raw_proofs: Vec<_> = try!(raw.iter().skip(2).map(decode_res).collect()); for handler in &self.handlers { - handler.on_header_proofs(EventContext { + handler.on_header_proofs(&Ctx { peer: *peer, io: io, proto: self, @@ -915,7 +965,7 @@ impl LightProtocol { } // Receive a set of transactions to relay. - fn relay_transactions(&self, peer: &PeerId, io: &NetworkContext, data: UntrustedRlp) -> Result<(), Error> { + fn relay_transactions(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { const MAX_TRANSACTIONS: usize = 256; let txs: Vec<_> = try!(data.iter().take(MAX_TRANSACTIONS).map(|x| x.as_val::()).collect()); @@ -923,7 +973,7 @@ impl LightProtocol { debug!(target: "les", "Received {} transactions to relay from peer {}", txs.len(), peer); for handler in &self.handlers { - handler.on_transactions(EventContext { + handler.on_transactions(&Ctx { peer: *peer, io: io, proto: self, @@ -940,52 +990,7 @@ impl NetworkProtocolHandler for LightProtocol { } fn read(&self, io: &NetworkContext, peer: &PeerId, packet_id: u8, data: &[u8]) { - let rlp = UntrustedRlp::new(data); - - // handle the packet - let res = match packet_id { - packet::STATUS => self.status(peer, io, rlp), - packet::ANNOUNCE => self.announcement(peer, io, rlp), - - packet::GET_BLOCK_HEADERS => self.get_block_headers(peer, io, rlp), - packet::BLOCK_HEADERS => self.block_headers(peer, io, rlp), - - packet::GET_BLOCK_BODIES => self.get_block_bodies(peer, io, rlp), - packet::BLOCK_BODIES => self.block_bodies(peer, io, rlp), - - packet::GET_RECEIPTS => self.get_receipts(peer, io, rlp), - packet::RECEIPTS => self.receipts(peer, io, rlp), - - packet::GET_PROOFS => self.get_proofs(peer, io, rlp), - packet::PROOFS => self.proofs(peer, io, rlp), - - packet::GET_CONTRACT_CODES => self.get_contract_code(peer, io, rlp), - packet::CONTRACT_CODES => self.contract_code(peer, io, rlp), - - packet::GET_HEADER_PROOFS => self.get_header_proofs(peer, io, rlp), - packet::HEADER_PROOFS => self.header_proofs(peer, io, rlp), - - packet::SEND_TRANSACTIONS => self.relay_transactions(peer, io, rlp), - - other => { - Err(Error::UnrecognizedPacket(other)) - } - }; - - // if something went wrong, figure out how much to punish the peer. - if let Err(e) = res { - match e.punishment() { - Punishment::None => {} - Punishment::Disconnect => { - debug!(target: "les", "Disconnecting peer {}: {}", peer, e); - io.disconnect_peer(*peer) - } - Punishment::Disable => { - debug!(target: "les", "Disabling peer {}: {}", peer, e); - io.disable_peer(*peer) - } - } - } + self.handle_packet(io, peer, packet_id, data); } fn connected(&self, io: &NetworkContext, peer: &PeerId) { From 88e5ed9ea5eb51e2e64bf4ec90c7ac2a57117f79 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 8 Dec 2016 12:18:43 +0100 Subject: [PATCH 005/131] Allow mocha to use webpack aliasses via babel --- js/.babelrc | 9 +++++++++ js/package.json | 3 ++- js/webpack/test.js | 26 ++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 js/webpack/test.js diff --git a/js/.babelrc b/js/.babelrc index 2298d98c0..33ac89e23 100644 --- a/js/.babelrc +++ b/js/.babelrc @@ -16,6 +16,15 @@ }, "development": { "plugins": ["react-hot-loader/babel"] + }, + "test": { + "plugins": [ + [ + "babel-plugin-webpack-alias", { + "config": "webpack/test.js" + } + ] + ] } } } diff --git a/js/package.json b/js/package.json index dd4ff1046..f46619a3a 100644 --- a/js/package.json +++ b/js/package.json @@ -40,7 +40,7 @@ "coveralls": "npm run testCoverage && coveralls < coverage/lcov.info", "lint": "eslint --ignore-path .gitignore ./src/", "lint:cached": "eslint --cache --ignore-path .gitignore ./src/", - "test": "mocha 'src/**/*.spec.js'", + "test": "NODE_ENV=test mocha 'src/**/*.spec.js'", "test:coverage": "istanbul cover _mocha -- 'src/**/*.spec.js'", "test:e2e": "mocha 'src/**/*.e2e.js'", "test:npm": "(cd .npmjs && npm i) && node test/npmLibrary && (rm -rf .npmjs/node_modules)", @@ -56,6 +56,7 @@ "babel-plugin-transform-decorators-legacy": "1.3.4", "babel-plugin-transform-react-remove-prop-types": "0.2.11", "babel-plugin-transform-runtime": "6.15.0", + "babel-plugin-webpack-alias": "2.1.2", "babel-polyfill": "6.16.0", "babel-preset-es2015": "6.18.0", "babel-preset-es2015-rollup": "1.2.0", diff --git a/js/webpack/test.js b/js/webpack/test.js new file mode 100644 index 000000000..a0340b46b --- /dev/null +++ b/js/webpack/test.js @@ -0,0 +1,26 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +const path = require('path'); + +module.exports = { + context: path.join(__dirname, '../src'), + resolve: { + alias: { + '~': path.resolve(__dirname, '../src') + } + } +}; From ad8a191e95a88187d03c3ce5a5709358b2d6657e Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 8 Dec 2016 12:19:03 +0100 Subject: [PATCH 006/131] Adjust specs to show location --- js/src/dapps/localtx/Application/application.spec.js | 2 +- js/src/dapps/localtx/Transaction/transaction.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/dapps/localtx/Application/application.spec.js b/js/src/dapps/localtx/Application/application.spec.js index 2044b4e14..3ffee343d 100644 --- a/js/src/dapps/localtx/Application/application.spec.js +++ b/js/src/dapps/localtx/Application/application.spec.js @@ -21,7 +21,7 @@ import '../../../environment/tests'; import Application from './application'; -describe('localtx/Application', () => { +describe('dapps/localtx/Application', () => { describe('rendering', () => { it('renders without crashing', () => { const rendered = shallow(); diff --git a/js/src/dapps/localtx/Transaction/transaction.spec.js b/js/src/dapps/localtx/Transaction/transaction.spec.js index 5e9c39147..04f2f8de8 100644 --- a/js/src/dapps/localtx/Transaction/transaction.spec.js +++ b/js/src/dapps/localtx/Transaction/transaction.spec.js @@ -29,7 +29,7 @@ Api.api = { import BigNumber from 'bignumber.js'; import { Transaction, LocalTransaction } from './transaction'; -describe('localtx/Transaction', () => { +describe('dapps/localtx/Transaction', () => { describe('rendering', () => { it('renders without crashing', () => { const transaction = { @@ -51,7 +51,7 @@ describe('localtx/Transaction', () => { }); }); -describe('localtx/LocalTransaction', () => { +describe('dapps/localtx/LocalTransaction', () => { describe('rendering', () => { it('renders without crashing', () => { const rendered = shallow( From 8d16f737952eb4998cd35092749d78c7d870744f Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Thu, 8 Dec 2016 12:20:18 +0100 Subject: [PATCH 007/131] first few LES tests, fix get_header logic bug --- ethcore/light/src/net/context.rs | 113 +++++++++++ ethcore/light/src/net/mod.rs | 8 +- ethcore/light/src/net/tests/mod.rs | 291 +++++++++++++++++++++++++++++ ethcore/light/src/provider.rs | 4 +- ethcore/src/client/test_client.rs | 2 +- 5 files changed, 412 insertions(+), 6 deletions(-) create mode 100644 ethcore/light/src/net/context.rs create mode 100644 ethcore/light/src/net/tests/mod.rs diff --git a/ethcore/light/src/net/context.rs b/ethcore/light/src/net/context.rs new file mode 100644 index 000000000..f2d5ab907 --- /dev/null +++ b/ethcore/light/src/net/context.rs @@ -0,0 +1,113 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! I/O and event context generalizations. + +use network::{NetworkContext, PeerId}; + +use super::{Announcement, LightProtocol, ReqId}; +use super::error::Error; +use request::Request; + +/// An I/O context which allows sending and receiving packets as well as +/// disconnecting peers. This is used as a generalization of the portions +/// of a p2p network which the light protocol structure makes use of. +pub trait IoContext { + /// Send a packet to a specific peer. + fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec); + + /// Respond to a peer's message. Only works if this context is a byproduct + /// of a packet handler. + fn respond(&self, packet_id: u8, packet_body: Vec); + + /// Disconnect a peer. + fn disconnect_peer(&self, peer: PeerId); + + /// Disable a peer -- this is a disconnect + a time-out. + fn disable_peer(&self, peer: PeerId); +} + +impl<'a> IoContext for NetworkContext<'a> { + fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec) { + if let Err(e) = self.send(peer, packet_id, packet_body) { + debug!(target: "les", "Error sending packet to peer {}: {}", peer, e); + } + } + + fn respond(&self, packet_id: u8, packet_body: Vec) { + if let Err(e) = self.respond(packet_id, packet_body) { + debug!(target: "les", "Error responding to peer message: {}", e); + } + } + + fn disconnect_peer(&self, peer: PeerId) { + NetworkContext::disconnect_peer(self, peer); + } + + fn disable_peer(&self, peer: PeerId) { + NetworkContext::disable_peer(self, peer); + } +} + +/// Context for a protocol event. +pub trait EventContext { + /// Get the peer relevant to the event e.g. message sender, + /// disconnected/connected peer. + fn peer(&self) -> PeerId; + + /// Make a request from a peer. + fn request_from(&self, peer: PeerId, request: Request) -> Result; + + /// Make an announcement of new capabilities to the rest of the peers. + // TODO: maybe just put this on a timer in LightProtocol? + fn make_announcement(&self, announcement: Announcement); + + /// Disconnect a peer. + fn disconnect_peer(&self, peer: PeerId); + + /// Disable a peer. + fn disable_peer(&self, peer: PeerId); +} + +/// Concrete implementation of `EventContext` over the light protocol struct and +/// an io context. +pub struct Ctx<'a> { + /// Io context to enable immediate response to events. + pub io: &'a IoContext, + /// Protocol implementation. + pub proto: &'a LightProtocol, + /// Relevant peer for event. + pub peer: PeerId, +} + +impl<'a> EventContext for Ctx<'a> { + fn peer(&self) -> PeerId { self.peer } + fn request_from(&self, peer: PeerId, request: Request) -> Result { + self.proto.request_from(self.io, &peer, request) + } + + fn make_announcement(&self, announcement: Announcement) { + self.proto.make_announcement(self.io, announcement); + } + + fn disconnect_peer(&self, peer: PeerId) { + self.io.disconnect_peer(peer); + } + + fn disable_peer(&self, peer: PeerId) { + self.io.disable_peer(peer); + } +} \ No newline at end of file diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 965e46db6..57d091f75 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -44,6 +44,9 @@ mod context; mod error; mod status; +#[cfg(test)] +mod tests; + pub use self::status::{Status, Capabilities, Announcement, NetworkId}; const TIMEOUT: TimerToken = 0; @@ -181,8 +184,6 @@ struct Requested { /// Protocol parameters. pub struct Params { - /// Genesis hash. - pub genesis_hash: H256, /// Network id. pub network_id: NetworkId, /// Buffer flow parameters. @@ -217,9 +218,10 @@ pub struct LightProtocol { impl LightProtocol { /// Create a new instance of the protocol manager. pub fn new(provider: Box, params: Params) -> Self { + let genesis_hash = provider.chain_info().genesis_hash; LightProtocol { provider: provider, - genesis_hash: params.genesis_hash, + genesis_hash: genesis_hash, network_id: params.network_id, pending_peers: RwLock::new(HashMap::new()), peers: RwLock::new(HashMap::new()), diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs new file mode 100644 index 000000000..7db05542e --- /dev/null +++ b/ethcore/light/src/net/tests/mod.rs @@ -0,0 +1,291 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Tests for the `LightProtocol` implementation. +//! These don't test of the higher level logic on top of + +use ethcore::blockchain_info::BlockChainInfo; +use ethcore::client::{BlockChainClient, EachBlockWith, TestBlockChainClient}; +use ethcore::ids::BlockID; +use ethcore::transaction::SignedTransaction; +use network::PeerId; + +use net::buffer_flow::FlowParams; +use net::context::IoContext; +use net::status::{Capabilities, Status, NetworkId, write_handshake}; +use net::{encode_request, LightProtocol, Params, packet}; +use provider::Provider; +use request::{self, Request, Headers}; + +use rlp::*; +use util::{Bytes, H256}; + +use std::sync::Arc; + +// expected result from a call. +#[derive(Debug, PartialEq, Eq)] +enum Expect { + /// Expect to have message sent to peer. + Send(PeerId, u8, Vec), + /// Expect this response. + Respond(u8, Vec), + /// Expect a punishment (disconnect/disable) + Punish(PeerId), + /// Expect nothing. + Nothing, +} + +impl IoContext for Expect { + fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec) { + assert_eq!(self, &Expect::Send(peer, packet_id, packet_body)); + } + + fn respond(&self, packet_id: u8, packet_body: Vec) { + assert_eq!(self, &Expect::Respond(packet_id, packet_body)); + } + + fn disconnect_peer(&self, peer: PeerId) { + assert_eq!(self, &Expect::Punish(peer)); + } + + fn disable_peer(&self, peer: PeerId) { + assert_eq!(self, &Expect::Punish(peer)); + } +} + +// can't implement directly for Arc due to cross-crate orphan rules. +struct TestProvider(Arc); + +struct TestProviderInner { + client: TestBlockChainClient, +} + +impl Provider for TestProvider { + fn chain_info(&self) -> BlockChainInfo { + self.0.client.chain_info() + } + + fn reorg_depth(&self, a: &H256, b: &H256) -> Option { + self.0.client.tree_route(a, b).map(|route| route.index as u64) + } + + fn earliest_state(&self) -> Option { + None + } + + fn block_headers(&self, req: request::Headers) -> Vec { + let best_num = self.0.client.chain_info().best_block_number; + let start_num = req.block_num; + + match self.0.client.block_hash(BlockID::Number(req.block_num)) { + Some(hash) if hash == req.block_hash => {} + _=> { + trace!(target: "les_provider", "unknown/non-canonical start block in header request: {:?}", (req.block_num, req.block_hash)); + return vec![] + } + } + + (0u64..req.max as u64) + .map(|x: u64| x.saturating_mul(req.skip + 1)) + .take_while(|x| if req.reverse { x < &start_num } else { best_num - start_num >= *x }) + .map(|x| if req.reverse { start_num - x } else { start_num + x }) + .map(|x| self.0.client.block_header(BlockID::Number(x))) + .take_while(|x| x.is_some()) + .flat_map(|x| x) + .collect() + } + + fn block_bodies(&self, req: request::Bodies) -> Vec { + req.block_hashes.into_iter() + .map(|hash| self.0.client.block_body(BlockID::Hash(hash))) + .map(|body| body.unwrap_or_else(|| ::rlp::EMPTY_LIST_RLP.to_vec())) + .collect() + } + + fn receipts(&self, req: request::Receipts) -> Vec { + req.block_hashes.into_iter() + .map(|hash| self.0.client.block_receipts(&hash)) + .map(|receipts| receipts.unwrap_or_else(|| ::rlp::EMPTY_LIST_RLP.to_vec())) + .collect() + } + + fn proofs(&self, req: request::StateProofs) -> Vec { + req.requests.into_iter().map(|_| ::rlp::EMPTY_LIST_RLP.to_vec()).collect() + } + + fn contract_code(&self, req: request::ContractCodes) -> Vec { + req.code_requests.into_iter().map(|_| Vec::new()).collect() + } + + fn header_proofs(&self, req: request::HeaderProofs) -> Vec { + req.requests.into_iter().map(|_| ::rlp::EMPTY_LIST_RLP.to_vec()).collect() + } + + fn pending_transactions(&self) -> Vec { + self.0.client.pending_transactions() + } +} + +fn make_flow_params() -> FlowParams { + FlowParams::new(5_000_000.into(), Default::default(), 100_000.into()) +} + +fn capabilities() -> Capabilities { + Capabilities { + serve_headers: true, + serve_chain_since: Some(1), + serve_state_since: Some(1), + tx_relay: true, + } +} + +// helper for setting up the protocol handler and provider. +fn setup(flow_params: FlowParams, capabilities: Capabilities) -> (Arc, LightProtocol) { + let provider = Arc::new(TestProviderInner { + client: TestBlockChainClient::new(), + }); + + let proto = LightProtocol::new(Box::new(TestProvider(provider.clone())), Params { + network_id: NetworkId::Testnet, + flow_params: flow_params, + capabilities: capabilities, + }); + + (provider, proto) +} + +fn status(chain_info: BlockChainInfo) -> Status { + Status { + protocol_version: ::net::PROTOCOL_VERSION, + network_id: NetworkId::Testnet, + head_td: chain_info.total_difficulty, + head_hash: chain_info.best_block_hash, + head_num: chain_info.best_block_number, + genesis_hash: chain_info.genesis_hash, + last_head: None, + } +} + +#[test] +fn handshake_expected() { + let flow_params = make_flow_params(); + let capabilities = capabilities(); + + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + + let status = status(provider.client.chain_info()); + + let packet_body = write_handshake(&status, &capabilities, &flow_params); + + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); +} + +#[test] +#[should_panic] +fn genesis_mismatch() { + let flow_params = make_flow_params(); + let capabilities = capabilities(); + + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + + let mut status = status(provider.client.chain_info()); + status.genesis_hash = H256::default(); + + let packet_body = write_handshake(&status, &capabilities, &flow_params); + + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); +} + +#[test] +fn buffer_overflow() { + let flow_params = make_flow_params(); + let capabilities = capabilities(); + + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + + let status = status(provider.client.chain_info()); + + { + let packet_body = write_handshake(&status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + } + + { + let my_status = write_handshake(&status, &capabilities, &flow_params); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); + } + + // 1000 requests is far too many for the default flow params. + let request = encode_request(&Request::Headers(Headers { + block_num: 1, + block_hash: provider.client.chain_info().genesis_hash, + max: 1000, + skip: 0, + reverse: false, + }), 111); + + proto.handle_packet(&Expect::Punish(1), &1, packet::GET_BLOCK_HEADERS, &request); +} + +#[test] +fn get_block_headers() { + let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); + let capabilities = capabilities(); + + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + + let cur_status = status(provider.client.chain_info()); + let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + + provider.client.add_blocks(100, EachBlockWith::Nothing); + + let cur_status = status(provider.client.chain_info()); + + { + let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); + } + + let request = Headers { + block_num: 1, + block_hash: provider.client.block_hash(BlockID::Number(1)).unwrap(), + max: 10, + skip: 0, + reverse: false, + }; + let req_id = 111; + + let request_body = encode_request(&Request::Headers(request.clone()), req_id); + let response = { + let headers: Vec<_> = (0..10).map(|i| provider.client.block_header(BlockID::Number(i + 1)).unwrap()).collect(); + assert_eq!(headers.len(), 10); + + let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Headers, 10); + + let mut response_stream = RlpStream::new_list(12); + + response_stream.append(&req_id).append(&new_buf); + for header in headers { + response_stream.append_raw(&header, 1); + } + + response_stream.out() + }; + + let expected = Expect::Respond(packet::BLOCK_HEADERS, response); + proto.handle_packet(&expected, &1, packet::GET_BLOCK_HEADERS, &request_body); +} \ No newline at end of file diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index fe7156b58..9446aa3f6 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -108,8 +108,8 @@ impl Provider for T { } (0u64..req.max as u64) - .map(|x: u64| x.saturating_mul(req.skip)) - .take_while(|x| if req.reverse { x < &start_num } else { best_num - start_num < *x }) + .map(|x: u64| x.saturating_mul(req.skip + 1)) + .take_while(|x| if req.reverse { x < &start_num } else { best_num - start_num >= *x }) .map(|x| if req.reverse { start_num - x } else { start_num + x }) .map(|x| self.block_header(BlockID::Number(x))) .take_while(|x| x.is_some()) diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index dd00db7ec..37674e29e 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -92,8 +92,8 @@ pub struct TestBlockChainClient { pub first_block: RwLock>, } -#[derive(Clone)] /// Used for generating test client blocks. +#[derive(Clone)] pub enum EachBlockWith { /// Plain block. Nothing, From b3f7c00780cd4ff9c475afb880a621424d9d62d4 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 8 Dec 2016 12:22:40 +0100 Subject: [PATCH 008/131] ui/Container tests as per #2289 --- js/src/ui/Container/Title/title.js | 4 -- js/src/ui/Container/Title/title.spec.js | 52 +++++++++++++++++++++++++ js/src/ui/Container/container.spec.js | 38 ++++++++++++++++++ 3 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 js/src/ui/Container/Title/title.spec.js create mode 100644 js/src/ui/Container/container.spec.js diff --git a/js/src/ui/Container/Title/title.js b/js/src/ui/Container/Title/title.js index 485340d2a..1506ecaf6 100644 --- a/js/src/ui/Container/Title/title.js +++ b/js/src/ui/Container/Title/title.js @@ -27,10 +27,6 @@ export default class Title extends Component { byline: nodeOrStringProptype() } - state = { - name: 'Unnamed' - } - render () { const { className, title, byline } = this.props; diff --git a/js/src/ui/Container/Title/title.spec.js b/js/src/ui/Container/Title/title.spec.js new file mode 100644 index 000000000..7c6dc05b6 --- /dev/null +++ b/js/src/ui/Container/Title/title.spec.js @@ -0,0 +1,52 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +import React from 'react'; +import { mount, shallow } from 'enzyme'; + +import Title from './title'; + +function renderShallow (props) { + return shallow( + + ); +} + +function renderMount (props) { + return mount( + <Title { ...props } /> + ); +} + +describe('ui/Container/Title', () => { + describe('rendering', () => { + it('renders without crashing', () => { + expect(renderShallow()).to.be.defined; + }); + + it('renders with the specified className', () => { + expect(renderShallow({ className: 'testClass' })).to.have.className('testClass'); + }); + + it('renders the specified title', () => { + expect(renderMount({ title: 'titleText' })).to.contain.text('titleText'); + }); + + it('renders the specified byline', () => { + expect(renderMount({ byline: 'bylineText' })).to.contain.text('bylineText'); + }); + }); +}); diff --git a/js/src/ui/Container/container.spec.js b/js/src/ui/Container/container.spec.js new file mode 100644 index 000000000..865522d7e --- /dev/null +++ b/js/src/ui/Container/container.spec.js @@ -0,0 +1,38 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React from 'react'; +import { shallow } from 'enzyme'; + +import Container from './title'; + +function renderShallow (props) { + return shallow( + <Container { ...props } /> + ); +} + +describe('ui/Container', () => { + describe('rendering', () => { + it('renders without crashing', () => { + expect(renderShallow()).to.be.defined; + }); + + it('renders with the specified className', () => { + expect(renderShallow({ className: 'testClass' })).to.have.className('testClass'); + }); + }); +}); From 543428fe5d3a8917cc08774111538328bdfa16e0 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Thu, 8 Dec 2016 12:59:59 +0100 Subject: [PATCH 009/131] NODE_ENV=test for all tests --- js/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/package.json b/js/package.json index f46619a3a..a5fab74d5 100644 --- a/js/package.json +++ b/js/package.json @@ -41,8 +41,8 @@ "lint": "eslint --ignore-path .gitignore ./src/", "lint:cached": "eslint --cache --ignore-path .gitignore ./src/", "test": "NODE_ENV=test mocha 'src/**/*.spec.js'", - "test:coverage": "istanbul cover _mocha -- 'src/**/*.spec.js'", - "test:e2e": "mocha 'src/**/*.e2e.js'", + "test:coverage": "NODE_ENV=test istanbul cover _mocha -- 'src/**/*.spec.js'", + "test:e2e": "NODE_ENV=test mocha 'src/**/*.e2e.js'", "test:npm": "(cd .npmjs && npm i) && node test/npmLibrary && (rm -rf .npmjs/node_modules)", "prepush": "npm run lint:cached" }, From a5b5277a88388dd7fda717eca85553e7eec919cd Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Thu, 8 Dec 2016 13:00:29 +0100 Subject: [PATCH 010/131] Expanded basic tests for #2289 --- js/src/ui/Actionbar/actionbar.spec.js | 38 +++++++++++++++++++++++++ js/src/ui/Badge/badge.spec.js | 38 +++++++++++++++++++++++++ js/src/ui/Button/button.spec.js | 38 +++++++++++++++++++++++++ js/src/ui/Container/Title/title.spec.js | 4 +-- js/src/ui/Container/container.spec.js | 6 ++-- 5 files changed, 119 insertions(+), 5 deletions(-) create mode 100644 js/src/ui/Actionbar/actionbar.spec.js create mode 100644 js/src/ui/Badge/badge.spec.js create mode 100644 js/src/ui/Button/button.spec.js diff --git a/js/src/ui/Actionbar/actionbar.spec.js b/js/src/ui/Actionbar/actionbar.spec.js new file mode 100644 index 000000000..818eb0f80 --- /dev/null +++ b/js/src/ui/Actionbar/actionbar.spec.js @@ -0,0 +1,38 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React from 'react'; +import { shallow } from 'enzyme'; + +import Actionbar from './actionbar'; + +function renderShallow (props) { + return shallow( + <Actionbar { ...props } /> + ); +} + +describe('ui/Actionbar', () => { + describe('rendering', () => { + it('renders defaults', () => { + expect(renderShallow()).to.be.ok; + }); + + it('renders with the specified className', () => { + expect(renderShallow({ className: 'testClass' })).to.have.className('testClass'); + }); + }); +}); diff --git a/js/src/ui/Badge/badge.spec.js b/js/src/ui/Badge/badge.spec.js new file mode 100644 index 000000000..8074a8688 --- /dev/null +++ b/js/src/ui/Badge/badge.spec.js @@ -0,0 +1,38 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React from 'react'; +import { shallow } from 'enzyme'; + +import Badge from './badge'; + +function renderShallow (props) { + return shallow( + <Badge { ...props } /> + ); +} + +describe('ui/Badge', () => { + describe('rendering', () => { + it('renders defaults', () => { + expect(renderShallow()).to.be.ok; + }); + + it('renders with the specified className', () => { + expect(renderShallow({ className: 'testClass' })).to.have.className('testClass'); + }); + }); +}); diff --git a/js/src/ui/Button/button.spec.js b/js/src/ui/Button/button.spec.js new file mode 100644 index 000000000..1d5f5beed --- /dev/null +++ b/js/src/ui/Button/button.spec.js @@ -0,0 +1,38 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React from 'react'; +import { shallow } from 'enzyme'; + +import Button from './button'; + +function renderShallow (props) { + return shallow( + <Button { ...props } /> + ); +} + +describe.only('ui/Button', () => { + describe('rendering', () => { + it('renders defaults', () => { + expect(renderShallow()).to.be.ok; + }); + + it('renders with the specified className', () => { + expect(renderShallow({ className: 'testClass' })).to.have.className('testClass'); + }); + }); +}); diff --git a/js/src/ui/Container/Title/title.spec.js b/js/src/ui/Container/Title/title.spec.js index 7c6dc05b6..a65e221a6 100644 --- a/js/src/ui/Container/Title/title.spec.js +++ b/js/src/ui/Container/Title/title.spec.js @@ -33,8 +33,8 @@ function renderMount (props) { describe('ui/Container/Title', () => { describe('rendering', () => { - it('renders without crashing', () => { - expect(renderShallow()).to.be.defined; + it('renders defaults', () => { + expect(renderShallow()).to.be.ok; }); it('renders with the specified className', () => { diff --git a/js/src/ui/Container/container.spec.js b/js/src/ui/Container/container.spec.js index 865522d7e..9bbc9d20f 100644 --- a/js/src/ui/Container/container.spec.js +++ b/js/src/ui/Container/container.spec.js @@ -17,7 +17,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import Container from './title'; +import Container from './container'; function renderShallow (props) { return shallow( @@ -27,8 +27,8 @@ function renderShallow (props) { describe('ui/Container', () => { describe('rendering', () => { - it('renders without crashing', () => { - expect(renderShallow()).to.be.defined; + it('renders defaults', () => { + expect(renderShallow()).to.be.ok; }); it('renders with the specified className', () => { From 3e8ee9d423e860430fb70f3b45851f2a018c34e2 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Thu, 8 Dec 2016 13:44:17 +0100 Subject: [PATCH 011/131] light IPC feature and mock state proofs --- Cargo.lock | 2 - ethcore/light/Cargo.toml | 9 +- ethcore/light/build.rs | 5 + ethcore/light/src/lib.rs | 6 +- ethcore/light/src/net/tests/mod.rs | 164 ++++++++++++++++++++++++- ethcore/light/src/types/les_request.rs | 33 +++-- ethcore/light/src/types/mod.rs | 7 +- 7 files changed, 206 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b00701f32..4a5534dbe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -462,8 +462,6 @@ version = "1.5.0" dependencies = [ "ethcore 1.5.0", "ethcore-io 1.5.0", - "ethcore-ipc 1.4.0", - "ethcore-ipc-codegen 1.4.0", "ethcore-network 1.5.0", "ethcore-util 1.5.0", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index 9440bbf88..e80eb3e2f 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Ethcore <admin@ethcore.io>"] build = "build.rs" [build-dependencies] -"ethcore-ipc-codegen" = { path = "../../ipc/codegen" } +"ethcore-ipc-codegen" = { path = "../../ipc/codegen", optional = true } [dependencies] log = "0.3" @@ -16,6 +16,9 @@ ethcore = { path = "..", features = ["light"] } ethcore-util = { path = "../../util" } ethcore-network = { path = "../../util/network" } ethcore-io = { path = "../../util/io" } -ethcore-ipc = { path = "../../ipc/rpc" } +ethcore-ipc = { path = "../../ipc/rpc", optional = true } rlp = { path = "../../util/rlp" } -time = "0.1" \ No newline at end of file +time = "0.1" + +[features] +ipc = ["ethcore/ipc", "ethcore-ipc", "ethcore-ipc-codegen"] \ No newline at end of file diff --git a/ethcore/light/build.rs b/ethcore/light/build.rs index cff92a011..43915c1cf 100644 --- a/ethcore/light/build.rs +++ b/ethcore/light/build.rs @@ -14,8 +14,13 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. +#[cfg(feature = "ipc")] extern crate ethcore_ipc_codegen; +#[cfg(feature = "ipc")] fn main() { ethcore_ipc_codegen::derive_binary("src/types/mod.rs.in").unwrap(); } + +#[cfg(not(feature = "ipc"))] +fn main() { } \ No newline at end of file diff --git a/ethcore/light/src/lib.rs b/ethcore/light/src/lib.rs index e150f4ee5..c00467c4c 100644 --- a/ethcore/light/src/lib.rs +++ b/ethcore/light/src/lib.rs @@ -47,6 +47,8 @@ extern crate ethcore; extern crate ethcore_util as util; extern crate ethcore_network as network; extern crate ethcore_io as io; -extern crate ethcore_ipc as ipc; extern crate rlp; -extern crate time; \ No newline at end of file +extern crate time; + +#[cfg(feature = "ipc")] +extern crate ethcore_ipc as ipc; \ No newline at end of file diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 7db05542e..555f6d19c 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -123,7 +123,19 @@ impl Provider for TestProvider { } fn proofs(&self, req: request::StateProofs) -> Vec<Bytes> { - req.requests.into_iter().map(|_| ::rlp::EMPTY_LIST_RLP.to_vec()).collect() + req.requests.into_iter() + .map(|req| { + match req.key2 { + Some(key2) => ::util::sha3::SHA3_NULL_RLP.to_owned(), + None => { + // sort of a leaf node + let mut stream = RlpStream::new_list(2); + stream.append(&req.key1).append_empty_data(); + stream.out() + } + } + }) + .collect() } fn contract_code(&self, req: request::ContractCodes) -> Vec<Bytes> { @@ -240,6 +252,9 @@ fn buffer_overflow() { proto.handle_packet(&Expect::Punish(1), &1, packet::GET_BLOCK_HEADERS, &request); } +// test the basic request types -- these just make sure that requests are parsed +// and sent to the provider correctly as well as testing response formatting. + #[test] fn get_block_headers() { let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); @@ -288,4 +303,151 @@ fn get_block_headers() { let expected = Expect::Respond(packet::BLOCK_HEADERS, response); proto.handle_packet(&expected, &1, packet::GET_BLOCK_HEADERS, &request_body); +} + +#[test] +fn get_block_bodies() { + let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); + let capabilities = capabilities(); + + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + + let cur_status = status(provider.client.chain_info()); + let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + + provider.client.add_blocks(100, EachBlockWith::Nothing); + + let cur_status = status(provider.client.chain_info()); + + { + let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); + } + + let request = request::Bodies { + block_hashes: (0..10).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()).collect(), + }; + + let req_id = 111; + + let request_body = encode_request(&Request::Bodies(request.clone()), req_id); + let response = { + let bodies: Vec<_> = (0..10).map(|i| provider.client.block_body(BlockID::Number(i + 1)).unwrap()).collect(); + assert_eq!(bodies.len(), 10); + + let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Bodies, 10); + + let mut response_stream = RlpStream::new_list(12); + + response_stream.append(&req_id).append(&new_buf); + for body in bodies { + response_stream.append_raw(&body, 1); + } + + response_stream.out() + }; + + let expected = Expect::Respond(packet::BLOCK_BODIES, response); + proto.handle_packet(&expected, &1, packet::GET_BLOCK_BODIES, &request_body); +} + +#[test] +fn get_block_receipts() { + let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); + let capabilities = capabilities(); + + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + + let cur_status = status(provider.client.chain_info()); + let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + + provider.client.add_blocks(1000, EachBlockWith::Nothing); + + let cur_status = status(provider.client.chain_info()); + + { + let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); + } + + // find the first 10 block hashes starting with `f` because receipts are only provided + // by the test client in that case. + let block_hashes: Vec<_> = (0..1000).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()) + .filter(|hash| format!("{}", hash).starts_with("f")).take(10).collect(); + + let request = request::Receipts { + block_hashes: block_hashes.clone(), + }; + + let req_id = 111; + + let request_body = encode_request(&Request::Receipts(request.clone()), req_id); + let response = { + let receipts: Vec<_> = block_hashes.iter() + .map(|hash| provider.client.block_receipts(hash).unwrap()) + .collect(); + + let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Receipts, receipts.len()); + + let mut response_stream = RlpStream::new_list(2 + receipts.len()); + + response_stream.append(&req_id).append(&new_buf); + for block_receipts in receipts { + response_stream.append_raw(&block_receipts, 1); + } + + response_stream.out() + }; + + let expected = Expect::Respond(packet::RECEIPTS, response); + proto.handle_packet(&expected, &1, packet::GET_RECEIPTS, &request_body); +} + +#[test] +fn get_block_bodies() { + let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); + let capabilities = capabilities(); + + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + + let cur_status = status(provider.client.chain_info()); + let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + + provider.client.add_blocks(100, EachBlockWith::Nothing); + + let cur_status = status(provider.client.chain_info()); + + { + let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); + } + + let request = request::Bodies { + block_hashes: (0..10).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()).collect(), + }; + + let req_id = 111; + + let request_body = encode_request(&Request::Bodies(request.clone()), req_id); + let response = { + let bodies: Vec<_> = (0..10).map(|i| provider.client.block_body(BlockID::Number(i + 1)).unwrap()).collect(); + assert_eq!(bodies.len(), 10); + + let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Bodies, 10); + + let mut response_stream = RlpStream::new_list(12); + + response_stream.append(&req_id).append(&new_buf); + for body in bodies { + response_stream.append_raw(&body, 1); + } + + response_stream.out() + }; + + let expected = Expect::Respond(packet::BLOCK_BODIES, response); + proto.handle_packet(&expected, &1, packet::GET_BLOCK_BODIES, &request_body); } \ No newline at end of file diff --git a/ethcore/light/src/types/les_request.rs b/ethcore/light/src/types/les_request.rs index d0de080ee..49bd2e9cc 100644 --- a/ethcore/light/src/types/les_request.rs +++ b/ethcore/light/src/types/les_request.rs @@ -19,7 +19,8 @@ use util::H256; /// A request for block headers. -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct Headers { /// Starting block number pub block_num: u64, @@ -35,7 +36,8 @@ pub struct Headers { } /// A request for specific block bodies. -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct Bodies { /// Hashes which bodies are being requested for. pub block_hashes: Vec<H256> @@ -45,14 +47,16 @@ pub struct Bodies { /// /// This request is answered with a list of transaction receipts for each block /// requested. -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct Receipts { /// Block hashes to return receipts for. pub block_hashes: Vec<H256>, } /// A request for a state proof -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct StateProof { /// Block hash to query state from. pub block: H256, @@ -66,14 +70,16 @@ pub struct StateProof { } /// A request for state proofs. -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct StateProofs { /// All the proof requests. pub requests: Vec<StateProof>, } /// A request for contract code. -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct ContractCode { /// Block hash pub block_hash: H256, @@ -82,14 +88,16 @@ pub struct ContractCode { } /// A request for contract code. -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct ContractCodes { /// Block hash and account key (== sha3(address)) pairs to fetch code for. pub code_requests: Vec<ContractCode>, } /// A request for a header proof from the Canonical Hash Trie. -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct HeaderProof { /// Number of the CHT. pub cht_number: u64, @@ -100,14 +108,16 @@ pub struct HeaderProof { } /// A request for header proofs from the CHT. -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct HeaderProofs { /// All the proof requests. pub requests: Vec<HeaderProof>, } /// Kinds of requests. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub enum Kind { /// Requesting headers. Headers, @@ -124,7 +134,8 @@ pub enum Kind { } /// Encompasses all possible types of requests in a single structure. -#[derive(Debug, Clone, PartialEq, Eq, Binary)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub enum Request { /// Requesting headers. Headers(Headers), diff --git a/ethcore/light/src/types/mod.rs b/ethcore/light/src/types/mod.rs index 2625358a3..d7f473553 100644 --- a/ethcore/light/src/types/mod.rs +++ b/ethcore/light/src/types/mod.rs @@ -15,6 +15,11 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. //! Types used in the public (IPC) api which require custom code generation. +#![cfg_attr(feature = "ipc", allow(dead_code, unused_assignments, unused_variables))] // codegen issues -#![allow(dead_code, unused_assignments, unused_variables)] // codegen issues + +#[cfg(feature = "ipc")] include!(concat!(env!("OUT_DIR"), "/mod.rs.in")); + +#[cfg(not(feature = "ipc"))] +include!("mod.rs.in"); \ No newline at end of file From 1ab4ee37817c61e8f039e8320c6a0f9e725b5b98 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Thu, 8 Dec 2016 14:53:57 +0100 Subject: [PATCH 012/131] Update Button with correct proptypes --- js/src/ui/Button/button.js | 7 +++---- js/src/ui/Button/button.spec.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/js/src/ui/Button/button.js b/js/src/ui/Button/button.js index 48dbc981d..6ae113fd4 100644 --- a/js/src/ui/Button/button.js +++ b/js/src/ui/Button/button.js @@ -17,16 +17,15 @@ import React, { Component, PropTypes } from 'react'; import { FlatButton } from 'material-ui'; +import { nodeOrStringProptype } from '~/util/proptypes'; + export default class Button extends Component { static propTypes = { backgroundColor: PropTypes.string, className: PropTypes.string, disabled: PropTypes.bool, icon: PropTypes.node, - label: PropTypes.oneOfType([ - React.PropTypes.string, - React.PropTypes.object - ]), + label: nodeOrStringProptype(), onClick: PropTypes.func, primary: PropTypes.bool } diff --git a/js/src/ui/Button/button.spec.js b/js/src/ui/Button/button.spec.js index 1d5f5beed..9ae4ecdfc 100644 --- a/js/src/ui/Button/button.spec.js +++ b/js/src/ui/Button/button.spec.js @@ -25,7 +25,7 @@ function renderShallow (props) { ); } -describe.only('ui/Button', () => { +describe('ui/Button', () => { describe('rendering', () => { it('renders defaults', () => { expect(renderShallow()).to.be.ok; From 64ebcd0f24bda255647daa31bcda07e6fa4dd3e2 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Thu, 8 Dec 2016 16:12:00 +0100 Subject: [PATCH 013/131] fix contract code response encoding; add test --- ethcore/light/src/net/mod.rs | 2 +- ethcore/light/src/net/tests/mod.rs | 531 ++++++++++++++++------------- 2 files changed, 294 insertions(+), 239 deletions(-) diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 57d091f75..57dc77a86 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -863,7 +863,7 @@ impl LightProtocol { stream.append(&req_id).append(&cur_buffer); for code in response { - stream.append_raw(&code, 1); + stream.append(&code); } stream.out() diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 555f6d19c..e659d0681 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -31,62 +31,62 @@ use provider::Provider; use request::{self, Request, Headers}; use rlp::*; -use util::{Bytes, H256}; +use util::{Bytes, H256, U256}; use std::sync::Arc; // expected result from a call. #[derive(Debug, PartialEq, Eq)] enum Expect { - /// Expect to have message sent to peer. - Send(PeerId, u8, Vec<u8>), - /// Expect this response. - Respond(u8, Vec<u8>), - /// Expect a punishment (disconnect/disable) - Punish(PeerId), - /// Expect nothing. - Nothing, + /// Expect to have message sent to peer. + Send(PeerId, u8, Vec<u8>), + /// Expect this response. + Respond(u8, Vec<u8>), + /// Expect a punishment (disconnect/disable) + Punish(PeerId), + /// Expect nothing. + Nothing, } impl IoContext for Expect { - fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec<u8>) { - assert_eq!(self, &Expect::Send(peer, packet_id, packet_body)); - } + fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec<u8>) { + assert_eq!(self, &Expect::Send(peer, packet_id, packet_body)); + } - fn respond(&self, packet_id: u8, packet_body: Vec<u8>) { - assert_eq!(self, &Expect::Respond(packet_id, packet_body)); - } + fn respond(&self, packet_id: u8, packet_body: Vec<u8>) { + assert_eq!(self, &Expect::Respond(packet_id, packet_body)); + } - fn disconnect_peer(&self, peer: PeerId) { - assert_eq!(self, &Expect::Punish(peer)); - } + fn disconnect_peer(&self, peer: PeerId) { + assert_eq!(self, &Expect::Punish(peer)); + } - fn disable_peer(&self, peer: PeerId) { - assert_eq!(self, &Expect::Punish(peer)); - } + fn disable_peer(&self, peer: PeerId) { + assert_eq!(self, &Expect::Punish(peer)); + } } // can't implement directly for Arc due to cross-crate orphan rules. struct TestProvider(Arc<TestProviderInner>); struct TestProviderInner { - client: TestBlockChainClient, + client: TestBlockChainClient, } impl Provider for TestProvider { - fn chain_info(&self) -> BlockChainInfo { - self.0.client.chain_info() - } + fn chain_info(&self) -> BlockChainInfo { + self.0.client.chain_info() + } - fn reorg_depth(&self, a: &H256, b: &H256) -> Option<u64> { - self.0.client.tree_route(a, b).map(|route| route.index as u64) - } + fn reorg_depth(&self, a: &H256, b: &H256) -> Option<u64> { + self.0.client.tree_route(a, b).map(|route| route.index as u64) + } - fn earliest_state(&self) -> Option<u64> { - None - } + fn earliest_state(&self) -> Option<u64> { + None + } - fn block_headers(&self, req: request::Headers) -> Vec<Bytes> { + fn block_headers(&self, req: request::Headers) -> Vec<Bytes> { let best_num = self.0.client.chain_info().best_block_number; let start_num = req.block_num; @@ -124,22 +124,26 @@ impl Provider for TestProvider { fn proofs(&self, req: request::StateProofs) -> Vec<Bytes> { req.requests.into_iter() - .map(|req| { - match req.key2 { - Some(key2) => ::util::sha3::SHA3_NULL_RLP.to_owned(), - None => { - // sort of a leaf node - let mut stream = RlpStream::new_list(2); - stream.append(&req.key1).append_empty_data(); - stream.out() - } - } - }) - .collect() + .map(|req| { + match req.key2 { + Some(_) => ::util::sha3::SHA3_NULL_RLP.to_vec(), + None => { + // sort of a leaf node + let mut stream = RlpStream::new_list(2); + stream.append(&req.key1).append_empty_data(); + stream.out() + } + } + }) + .collect() } fn contract_code(&self, req: request::ContractCodes) -> Vec<Bytes> { - req.code_requests.into_iter().map(|_| Vec::new()).collect() + req.code_requests.into_iter() + .map(|req| { + req.account_key.iter().chain(req.account_key.iter()).cloned().collect() + }) + .collect() } fn header_proofs(&self, req: request::HeaderProofs) -> Vec<Bytes> { @@ -152,104 +156,104 @@ impl Provider for TestProvider { } fn make_flow_params() -> FlowParams { - FlowParams::new(5_000_000.into(), Default::default(), 100_000.into()) + FlowParams::new(5_000_000.into(), Default::default(), 100_000.into()) } fn capabilities() -> Capabilities { - Capabilities { - serve_headers: true, - serve_chain_since: Some(1), - serve_state_since: Some(1), - tx_relay: true, - } + Capabilities { + serve_headers: true, + serve_chain_since: Some(1), + serve_state_since: Some(1), + tx_relay: true, + } } // helper for setting up the protocol handler and provider. fn setup(flow_params: FlowParams, capabilities: Capabilities) -> (Arc<TestProviderInner>, LightProtocol) { - let provider = Arc::new(TestProviderInner { - client: TestBlockChainClient::new(), - }); + let provider = Arc::new(TestProviderInner { + client: TestBlockChainClient::new(), + }); - let proto = LightProtocol::new(Box::new(TestProvider(provider.clone())), Params { - network_id: NetworkId::Testnet, - flow_params: flow_params, - capabilities: capabilities, - }); + let proto = LightProtocol::new(Box::new(TestProvider(provider.clone())), Params { + network_id: NetworkId::Testnet, + flow_params: flow_params, + capabilities: capabilities, + }); - (provider, proto) + (provider, proto) } fn status(chain_info: BlockChainInfo) -> Status { - Status { - protocol_version: ::net::PROTOCOL_VERSION, - network_id: NetworkId::Testnet, - head_td: chain_info.total_difficulty, - head_hash: chain_info.best_block_hash, - head_num: chain_info.best_block_number, - genesis_hash: chain_info.genesis_hash, - last_head: None, - } + Status { + protocol_version: ::net::PROTOCOL_VERSION, + network_id: NetworkId::Testnet, + head_td: chain_info.total_difficulty, + head_hash: chain_info.best_block_hash, + head_num: chain_info.best_block_number, + genesis_hash: chain_info.genesis_hash, + last_head: None, + } } #[test] fn handshake_expected() { - let flow_params = make_flow_params(); - let capabilities = capabilities(); + let flow_params = make_flow_params(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); - let status = status(provider.client.chain_info()); + let status = status(provider.client.chain_info()); - let packet_body = write_handshake(&status, &capabilities, &flow_params); + let packet_body = write_handshake(&status, &capabilities, &flow_params); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); } #[test] #[should_panic] fn genesis_mismatch() { - let flow_params = make_flow_params(); - let capabilities = capabilities(); + let flow_params = make_flow_params(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); - let mut status = status(provider.client.chain_info()); - status.genesis_hash = H256::default(); + let mut status = status(provider.client.chain_info()); + status.genesis_hash = H256::default(); - let packet_body = write_handshake(&status, &capabilities, &flow_params); + let packet_body = write_handshake(&status, &capabilities, &flow_params); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); } #[test] fn buffer_overflow() { - let flow_params = make_flow_params(); - let capabilities = capabilities(); + let flow_params = make_flow_params(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); - let status = status(provider.client.chain_info()); + let status = status(provider.client.chain_info()); - { - let packet_body = write_handshake(&status, &capabilities, &flow_params); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); - } + { + let packet_body = write_handshake(&status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + } - { - let my_status = write_handshake(&status, &capabilities, &flow_params); - proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); - } + { + let my_status = write_handshake(&status, &capabilities, &flow_params); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); + } - // 1000 requests is far too many for the default flow params. - let request = encode_request(&Request::Headers(Headers { - block_num: 1, - block_hash: provider.client.chain_info().genesis_hash, - max: 1000, - skip: 0, - reverse: false, - }), 111); + // 1000 requests is far too many for the default flow params. + let request = encode_request(&Request::Headers(Headers { + block_num: 1, + block_hash: provider.client.chain_info().genesis_hash, + max: 1000, + skip: 0, + reverse: false, + }), 111); - proto.handle_packet(&Expect::Punish(1), &1, packet::GET_BLOCK_HEADERS, &request); + proto.handle_packet(&Expect::Punish(1), &1, packet::GET_BLOCK_HEADERS, &request); } // test the basic request types -- these just make sure that requests are parsed @@ -257,197 +261,248 @@ fn buffer_overflow() { #[test] fn get_block_headers() { - let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); - let capabilities = capabilities(); + let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); - let cur_status = status(provider.client.chain_info()); - let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + let cur_status = status(provider.client.chain_info()); + let my_status = write_handshake(&cur_status, &capabilities, &flow_params); - provider.client.add_blocks(100, EachBlockWith::Nothing); + provider.client.add_blocks(100, EachBlockWith::Nothing); - let cur_status = status(provider.client.chain_info()); + let cur_status = status(provider.client.chain_info()); - { - let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); - proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); - } + { + let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); + } - let request = Headers { - block_num: 1, - block_hash: provider.client.block_hash(BlockID::Number(1)).unwrap(), - max: 10, - skip: 0, - reverse: false, - }; - let req_id = 111; + let request = Headers { + block_num: 1, + block_hash: provider.client.block_hash(BlockID::Number(1)).unwrap(), + max: 10, + skip: 0, + reverse: false, + }; + let req_id = 111; - let request_body = encode_request(&Request::Headers(request.clone()), req_id); - let response = { - let headers: Vec<_> = (0..10).map(|i| provider.client.block_header(BlockID::Number(i + 1)).unwrap()).collect(); - assert_eq!(headers.len(), 10); + let request_body = encode_request(&Request::Headers(request.clone()), req_id); + let response = { + let headers: Vec<_> = (0..10).map(|i| provider.client.block_header(BlockID::Number(i + 1)).unwrap()).collect(); + assert_eq!(headers.len(), 10); - let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Headers, 10); + let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Headers, 10); - let mut response_stream = RlpStream::new_list(12); - - response_stream.append(&req_id).append(&new_buf); - for header in headers { - response_stream.append_raw(&header, 1); - } + let mut response_stream = RlpStream::new_list(12); + + response_stream.append(&req_id).append(&new_buf); + for header in headers { + response_stream.append_raw(&header, 1); + } - response_stream.out() - }; + response_stream.out() + }; - let expected = Expect::Respond(packet::BLOCK_HEADERS, response); - proto.handle_packet(&expected, &1, packet::GET_BLOCK_HEADERS, &request_body); + let expected = Expect::Respond(packet::BLOCK_HEADERS, response); + proto.handle_packet(&expected, &1, packet::GET_BLOCK_HEADERS, &request_body); } #[test] fn get_block_bodies() { - let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); - let capabilities = capabilities(); + let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); - let cur_status = status(provider.client.chain_info()); - let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + let cur_status = status(provider.client.chain_info()); + let my_status = write_handshake(&cur_status, &capabilities, &flow_params); - provider.client.add_blocks(100, EachBlockWith::Nothing); + provider.client.add_blocks(100, EachBlockWith::Nothing); - let cur_status = status(provider.client.chain_info()); + let cur_status = status(provider.client.chain_info()); - { - let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); - proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); - } + { + let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); + } - let request = request::Bodies { - block_hashes: (0..10).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()).collect(), - }; + let request = request::Bodies { + block_hashes: (0..10).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()).collect(), + }; - let req_id = 111; + let req_id = 111; - let request_body = encode_request(&Request::Bodies(request.clone()), req_id); - let response = { - let bodies: Vec<_> = (0..10).map(|i| provider.client.block_body(BlockID::Number(i + 1)).unwrap()).collect(); - assert_eq!(bodies.len(), 10); + let request_body = encode_request(&Request::Bodies(request.clone()), req_id); + let response = { + let bodies: Vec<_> = (0..10).map(|i| provider.client.block_body(BlockID::Number(i + 1)).unwrap()).collect(); + assert_eq!(bodies.len(), 10); - let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Bodies, 10); + let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Bodies, 10); - let mut response_stream = RlpStream::new_list(12); - - response_stream.append(&req_id).append(&new_buf); - for body in bodies { - response_stream.append_raw(&body, 1); - } + let mut response_stream = RlpStream::new_list(12); + + response_stream.append(&req_id).append(&new_buf); + for body in bodies { + response_stream.append_raw(&body, 1); + } - response_stream.out() - }; + response_stream.out() + }; - let expected = Expect::Respond(packet::BLOCK_BODIES, response); - proto.handle_packet(&expected, &1, packet::GET_BLOCK_BODIES, &request_body); + let expected = Expect::Respond(packet::BLOCK_BODIES, response); + proto.handle_packet(&expected, &1, packet::GET_BLOCK_BODIES, &request_body); } #[test] fn get_block_receipts() { - let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); - let capabilities = capabilities(); + let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); - let cur_status = status(provider.client.chain_info()); - let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + let cur_status = status(provider.client.chain_info()); + let my_status = write_handshake(&cur_status, &capabilities, &flow_params); - provider.client.add_blocks(1000, EachBlockWith::Nothing); + provider.client.add_blocks(1000, EachBlockWith::Nothing); - let cur_status = status(provider.client.chain_info()); + let cur_status = status(provider.client.chain_info()); - { - let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); - proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); - } + { + let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); + } - // find the first 10 block hashes starting with `f` because receipts are only provided - // by the test client in that case. - let block_hashes: Vec<_> = (0..1000).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()) - .filter(|hash| format!("{}", hash).starts_with("f")).take(10).collect(); + // find the first 10 block hashes starting with `f` because receipts are only provided + // by the test client in that case. + let block_hashes: Vec<_> = (0..1000).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()) + .filter(|hash| format!("{}", hash).starts_with("f")).take(10).collect(); - let request = request::Receipts { - block_hashes: block_hashes.clone(), - }; + let request = request::Receipts { + block_hashes: block_hashes.clone(), + }; - let req_id = 111; + let req_id = 111; - let request_body = encode_request(&Request::Receipts(request.clone()), req_id); - let response = { - let receipts: Vec<_> = block_hashes.iter() - .map(|hash| provider.client.block_receipts(hash).unwrap()) - .collect(); + let request_body = encode_request(&Request::Receipts(request.clone()), req_id); + let response = { + let receipts: Vec<_> = block_hashes.iter() + .map(|hash| provider.client.block_receipts(hash).unwrap()) + .collect(); - let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Receipts, receipts.len()); + let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Receipts, receipts.len()); - let mut response_stream = RlpStream::new_list(2 + receipts.len()); - - response_stream.append(&req_id).append(&new_buf); - for block_receipts in receipts { - response_stream.append_raw(&block_receipts, 1); - } + let mut response_stream = RlpStream::new_list(2 + receipts.len()); + + response_stream.append(&req_id).append(&new_buf); + for block_receipts in receipts { + response_stream.append_raw(&block_receipts, 1); + } - response_stream.out() - }; + response_stream.out() + }; - let expected = Expect::Respond(packet::RECEIPTS, response); - proto.handle_packet(&expected, &1, packet::GET_RECEIPTS, &request_body); + let expected = Expect::Respond(packet::RECEIPTS, response); + proto.handle_packet(&expected, &1, packet::GET_RECEIPTS, &request_body); } #[test] -fn get_block_bodies() { - let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); - let capabilities = capabilities(); +fn get_state_proofs() { + let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); - let cur_status = status(provider.client.chain_info()); - let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + let cur_status = status(provider.client.chain_info()); - provider.client.add_blocks(100, EachBlockWith::Nothing); + { + let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body.clone())); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &packet_body); + } - let cur_status = status(provider.client.chain_info()); + let req_id = 112; + let key1 = U256::from(11223344).into(); + let key2 = U256::from(99988887).into(); - { - let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); - proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); - } + let request = Request::StateProofs (request::StateProofs { + requests: vec![ + request::StateProof { block: H256::default(), key1: key1, key2: None, from_level: 0 }, + request::StateProof { block: H256::default(), key1: key1, key2: Some(key2), from_level: 0}, + ] + }); - let request = request::Bodies { - block_hashes: (0..10).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()).collect(), - }; + let request_body = encode_request(&request, req_id); + let response = { + let proofs = vec![ + { let mut stream = RlpStream::new_list(2); stream.append(&key1).append_empty_data(); stream.out() }, + ::util::sha3::SHA3_NULL_RLP.to_vec(), + ]; - let req_id = 111; + let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::StateProofs, 2); - let request_body = encode_request(&Request::Bodies(request.clone()), req_id); - let response = { - let bodies: Vec<_> = (0..10).map(|i| provider.client.block_body(BlockID::Number(i + 1)).unwrap()).collect(); - assert_eq!(bodies.len(), 10); + let mut response_stream = RlpStream::new_list(4); + + response_stream.append(&req_id).append(&new_buf); + for proof in proofs { + response_stream.append_raw(&proof, 1); + } - let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Bodies, 10); + response_stream.out() + }; - let mut response_stream = RlpStream::new_list(12); - - response_stream.append(&req_id).append(&new_buf); - for body in bodies { - response_stream.append_raw(&body, 1); - } + let expected = Expect::Respond(packet::PROOFS, response); + proto.handle_packet(&expected, &1, packet::GET_PROOFS, &request_body); +} - response_stream.out() - }; +#[test] +fn get_contract_code() { + let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); + let capabilities = capabilities(); - let expected = Expect::Respond(packet::BLOCK_BODIES, response); - proto.handle_packet(&expected, &1, packet::GET_BLOCK_BODIES, &request_body); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + + let cur_status = status(provider.client.chain_info()); + + { + let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body.clone())); + proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &packet_body); + } + + let req_id = 112; + let key1 = U256::from(11223344).into(); + let key2 = U256::from(99988887).into(); + + let request = Request::Codes (request::ContractCodes { + code_requests: vec![ + request::ContractCode { block_hash: H256::default(), account_key: key1 }, + request::ContractCode { block_hash: H256::default(), account_key: key2 }, + ], + }); + + let request_body = encode_request(&request, req_id); + let response = { + let codes: Vec<Vec<_>> = vec![ + key1.iter().chain(key1.iter()).cloned().collect(), + key2.iter().chain(key2.iter()).cloned().collect(), + ]; + + let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Codes, 2); + + let mut response_stream = RlpStream::new_list(4); + + response_stream.append(&req_id).append(&new_buf); + for code in codes { + response_stream.append(&code); + } + + response_stream.out() + }; + + let expected = Expect::Respond(packet::CONTRACT_CODES, response); + proto.handle_packet(&expected, &1, packet::GET_CONTRACT_CODES, &request_body); } \ No newline at end of file From 2e87e31157260f650fdc9371e5525e1e676a7267 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Thu, 8 Dec 2016 16:46:58 +0100 Subject: [PATCH 014/131] light: no default features --- ethcore/light/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index e80eb3e2f..287044c98 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -21,4 +21,5 @@ rlp = { path = "../../util/rlp" } time = "0.1" [features] +default = [] ipc = ["ethcore/ipc", "ethcore-ipc", "ethcore-ipc-codegen"] \ No newline at end of file From 9e8fb616d37e7004f4600b631e8f67f08668dad9 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Thu, 8 Dec 2016 16:50:19 +0100 Subject: [PATCH 015/131] Add store tests, fix issue with pending sort to top --- js/package.json | 1 + js/src/ui/TxList/store.js | 2 + js/src/ui/TxList/store.spec.js | 90 ++++++++++++++++++++++++++++++++++ js/test/mocha.config.js | 2 + 4 files changed, 95 insertions(+) create mode 100644 js/src/ui/TxList/store.spec.js diff --git a/js/package.json b/js/package.json index a5fab74d5..50f512823 100644 --- a/js/package.json +++ b/js/package.json @@ -67,6 +67,7 @@ "babel-register": "6.18.0", "babel-runtime": "6.18.0", "chai": "3.5.0", + "chai-as-promised": "6.0.0", "chai-enzyme": "0.6.1", "copy-webpack-plugin": "4.0.1", "core-js": "2.4.1", diff --git a/js/src/ui/TxList/store.js b/js/src/ui/TxList/store.js index 3faac193e..09cdd2226 100644 --- a/js/src/ui/TxList/store.js +++ b/js/src/ui/TxList/store.js @@ -45,6 +45,8 @@ export default class Store { if (bnB.eq(0)) { return bnB.eq(bnA) ? 0 : 1; + } else if (bnA.eq(0)) { + return -1; } return bnB.comparedTo(bnA); diff --git a/js/src/ui/TxList/store.spec.js b/js/src/ui/TxList/store.spec.js new file mode 100644 index 000000000..9fb3a709e --- /dev/null +++ b/js/src/ui/TxList/store.spec.js @@ -0,0 +1,90 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import BigNumber from 'bignumber.js'; +import sinon from 'sinon'; + +import Store from './store'; + +const SUBID = 123; +const BLOCKS = { + 1: { blockhash: '0x1' }, + 2: { blockhash: '0x2' } +}; +const TRANSACTIONS = { + '0x123': { blockNumber: new BigNumber(1) }, + '0x234': { blockNumber: new BigNumber(0) }, + '0x345': { blockNumber: new BigNumber(2) }, + '0x456': { blockNumber: new BigNumber(0) } +}; + +describe.only('ui/TxList/store', () => { + let api; + let store; + + beforeEach(() => { + api = { + subscribe: sinon.stub().resolves(SUBID), + eth: { + getBlockByNumber: (blockNumber) => { + return Promise.resolve(BLOCKS[blockNumber]); + } + } + }; + store = new Store(api); + }); + + describe('create', () => { + it('has empty storage', () => { + expect(store.blocks).to.deep.equal({}); + expect(store.sortedHashes.peek()).to.deep.equal([]); + expect(store.transactions).to.deep.equal({}); + }); + + it('subscribes to eth_blockNumber', () => { + expect(api.subscribe).to.have.been.calledWith('eth_blockNumber'); + expect(store._subscriptionId).to.equal(SUBID); + }); + }); + + describe('addBlocks', () => { + beforeEach(() => { + store.addBlocks(BLOCKS); + }); + + it('adds the blocks to the list', () => { + expect(store.blocks).to.deep.equal(BLOCKS); + }); + }); + + describe('addTransactions', () => { + beforeEach(() => { + store.addTransactions(TRANSACTIONS); + }); + + it('adds all transactions to the list', () => { + expect(store.transactions).to.deep.equal(TRANSACTIONS); + }); + + it('sorts transactions based on blockNumber', () => { + expect(store.sortedHashes.peek()).to.deep.equal(['0x234', '0x456', '0x345', '0x123']); + }); + + it('adds pending transactions to the pending queue', () => { + expect(store._pendingHashes).to.deep.equal(['0x234', '0x456']); + }); + }); +}); diff --git a/js/test/mocha.config.js b/js/test/mocha.config.js index adc43530e..36c91c76e 100644 --- a/js/test/mocha.config.js +++ b/js/test/mocha.config.js @@ -22,11 +22,13 @@ es6Promise.polyfill(); import 'mock-local-storage'; import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; import chaiEnzyme from 'chai-enzyme'; import sinonChai from 'sinon-chai'; import { WebSocket } from 'mock-socket'; import jsdom from 'jsdom'; +chai.use(chaiAsPromised); chai.use(chaiEnzyme()); chai.use(sinonChai); From ae49251c81c2a510c92ea80bb130b45dca56050b Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jacogr@gmail.com> Date: Thu, 8 Dec 2016 17:04:21 +0100 Subject: [PATCH 016/131] Remove .only --- js/src/ui/TxList/store.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/ui/TxList/store.spec.js b/js/src/ui/TxList/store.spec.js index 9fb3a709e..8e4eb848e 100644 --- a/js/src/ui/TxList/store.spec.js +++ b/js/src/ui/TxList/store.spec.js @@ -31,7 +31,7 @@ const TRANSACTIONS = { '0x456': { blockNumber: new BigNumber(0) } }; -describe.only('ui/TxList/store', () => { +describe('ui/TxList/store', () => { let api; let store; From 96d4569cf3192650ab32517ef5beceb0f95e0948 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Thu, 8 Dec 2016 17:31:41 +0100 Subject: [PATCH 017/131] Update test describe paths --- js/src/views/Signer/components/util/transaction.spec.js | 2 +- .../views/Status/components/AutoComplete/AutoComplete.spec.js | 2 +- js/src/views/Status/components/Box/Box.spec.js | 2 +- js/src/views/Status/components/Call/Call.spec.js | 2 +- js/src/views/Status/components/Calls/Calls.spec.js | 2 +- .../views/Status/components/CallsToolbar/CallsToolbar.spec.js | 2 +- .../Status/components/MiningSettings/decodeExtraData.spec.js | 2 +- .../Status/components/MiningSettings/numberFromString.spec.js | 2 +- js/src/views/Status/components/Response/Response.spec.js | 2 +- js/src/views/Status/middleware/localstorage.spec.js | 2 +- js/src/views/Status/util/error.spec.js | 2 +- js/src/views/Status/util/index.spec.js | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/js/src/views/Signer/components/util/transaction.spec.js b/js/src/views/Signer/components/util/transaction.spec.js index af181a7f8..a2022fe2e 100644 --- a/js/src/views/Signer/components/util/transaction.spec.js +++ b/js/src/views/Signer/components/util/transaction.spec.js @@ -17,7 +17,7 @@ import BigNumber from 'bignumber.js'; import { getShortData, getFee, getTotalValue } from './transaction'; -describe('util/transaction', () => { +describe('views/Signer/components/util/transaction', () => { describe('getEstimatedMiningTime', () => { it('should return estimated mining time', () => { }); diff --git a/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js b/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js index 046fcfad6..6bc04574e 100644 --- a/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js +++ b/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js @@ -21,7 +21,7 @@ import getMuiTheme from 'material-ui/styles/getMuiTheme'; import WrappedAutoComplete from './AutoComplete'; -describe('components/AutoComplete', () => { +describe('views/Status/components/AutoComplete', () => { describe('rendering', () => { let rendered; diff --git a/js/src/views/Status/components/Box/Box.spec.js b/js/src/views/Status/components/Box/Box.spec.js index 0630dc99f..5b6301dc9 100644 --- a/js/src/views/Status/components/Box/Box.spec.js +++ b/js/src/views/Status/components/Box/Box.spec.js @@ -19,7 +19,7 @@ import { shallow } from 'enzyme'; import Box from './Box'; -describe('components/Box', () => { +describe('views/Status/components/Box', () => { describe('rendering', () => { const title = 'test title'; let rendered; diff --git a/js/src/views/Status/components/Call/Call.spec.js b/js/src/views/Status/components/Call/Call.spec.js index a4fcf7d01..70caca49f 100644 --- a/js/src/views/Status/components/Call/Call.spec.js +++ b/js/src/views/Status/components/Call/Call.spec.js @@ -22,7 +22,7 @@ import '../../../../environment/tests'; import Call from './Call'; -describe('components/Call', () => { +describe('views/Status/components/Call', () => { const call = { callIdx: 123, callNo: 456, name: 'eth_call', params: [{ name: '123' }], response: '' }; const element = 'dummyElement'; diff --git a/js/src/views/Status/components/Calls/Calls.spec.js b/js/src/views/Status/components/Calls/Calls.spec.js index 7a73fa528..e1e4ac8c9 100644 --- a/js/src/views/Status/components/Calls/Calls.spec.js +++ b/js/src/views/Status/components/Calls/Calls.spec.js @@ -21,7 +21,7 @@ import '../../../../environment/tests'; import Calls from './Calls'; -describe('components/Calls', () => { +describe('views/Status/components/Calls', () => { describe('rendering (no calls)', () => { let rendered; diff --git a/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js b/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js index 0ff9f568b..6f7a40dfe 100644 --- a/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js +++ b/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js @@ -22,7 +22,7 @@ import '../../../../environment/tests'; import CallsToolbar from './CallsToolbar'; -describe('components/CallsToolbar', () => { +describe('views/Status/components/CallsToolbar', () => { const callEl = { offsetTop: 0 }; const containerEl = { scrollTop: 0, clientHeight: 0, scrollHeight: 999 }; diff --git a/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js b/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js index 007e564b4..b2f93240c 100644 --- a/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js +++ b/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js @@ -16,7 +16,7 @@ import { decodeExtraData } from './decodeExtraData'; -describe('MINING SETTINGS', () => { +describe('views/Status/components/MiningSettings/decodeExtraData', () => { describe('EXTRA DATA', () => { const str = 'parity/1.0.0/1.0.0-beta2'; const encoded = '0xd783010000867061726974798b312e302e302d6265746132'; diff --git a/js/src/views/Status/components/MiningSettings/numberFromString.spec.js b/js/src/views/Status/components/MiningSettings/numberFromString.spec.js index c00273495..7efa514c3 100644 --- a/js/src/views/Status/components/MiningSettings/numberFromString.spec.js +++ b/js/src/views/Status/components/MiningSettings/numberFromString.spec.js @@ -16,7 +16,7 @@ import { numberFromString } from './numberFromString'; -describe('NUMBER FROM STRING', () => { +describe('views/Status/components/MiningSettings/numberFromString', () => { it('should convert string to number', () => { expect(numberFromString('12345'), 12345); }); diff --git a/js/src/views/Status/components/Response/Response.spec.js b/js/src/views/Status/components/Response/Response.spec.js index 1eb37a340..0617721c2 100644 --- a/js/src/views/Status/components/Response/Response.spec.js +++ b/js/src/views/Status/components/Response/Response.spec.js @@ -21,7 +21,7 @@ import '../../../../environment/tests'; import Response from './Response'; -describe('components/Response', () => { +describe('views/Status/components/Response', () => { describe('rendering', () => { it('renders non-arrays/non-objects exactly as received', () => { const TEST = '1234567890'; diff --git a/js/src/views/Status/middleware/localstorage.spec.js b/js/src/views/Status/middleware/localstorage.spec.js index c522196d9..e1d6ed7ee 100644 --- a/js/src/views/Status/middleware/localstorage.spec.js +++ b/js/src/views/Status/middleware/localstorage.spec.js @@ -21,7 +21,7 @@ import { syncRpcStateFromLocalStorage } from '../actions/localstorage'; import rpcData from '../data/rpc.json'; import LocalStorageMiddleware from './localstorage'; -describe('MIDDLEWARE: LOCAL STORAGE', () => { +describe('views/Status/middleware/localstorage', () => { let cut, state; beforeEach('mock cut', () => { diff --git a/js/src/views/Status/util/error.spec.js b/js/src/views/Status/util/error.spec.js index f3ba98cc8..7512a47bc 100644 --- a/js/src/views/Status/util/error.spec.js +++ b/js/src/views/Status/util/error.spec.js @@ -17,7 +17,7 @@ import sinon from 'sinon'; import * as ErrorUtil from './error'; -describe('util/error', () => { +describe('views/Status/util/error', () => { beforeEach('spy on isError', () => { sinon.spy(ErrorUtil, 'isError'); }); diff --git a/js/src/views/Status/util/index.spec.js b/js/src/views/Status/util/index.spec.js index e648646c1..39d17322a 100644 --- a/js/src/views/Status/util/index.spec.js +++ b/js/src/views/Status/util/index.spec.js @@ -16,7 +16,7 @@ import { toPromise, identity } from './'; -describe('util', () => { +describe('views/Status/util', () => { describe('toPromise', () => { it('rejects on error result', () => { const ERROR = new Error(); From efd66f566d072f5f4dd45814d459507b5c344668 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Thu, 8 Dec 2016 19:52:48 +0100 Subject: [PATCH 018/131] ethsync: optional ipc codegen --- Cargo.lock | 2 ++ Cargo.toml | 3 +-- ethcore/Cargo.toml | 1 - ethcore/light/Cargo.toml | 4 ++-- ethcore/src/client/client.rs | 1 - ethcore/src/client/mod.rs | 1 - ethcore/src/client/traits.rs | 1 - ethcore/src/state/mod.rs | 2 -- sync/Cargo.toml | 7 +++--- sync/src/api.rs | 42 ++++++++++++++++++------------------ sync/src/lib.rs | 8 ++++--- sync/src/tests/mod.rs | 2 ++ 12 files changed, 36 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a5534dbe..b00701f32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -462,6 +462,8 @@ version = "1.5.0" dependencies = [ "ethcore 1.5.0", "ethcore-io 1.5.0", + "ethcore-ipc 1.4.0", + "ethcore-ipc-codegen 1.4.0", "ethcore-network 1.5.0", "ethcore-util 1.5.0", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 4730cef0d..078d2916c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ winapi = "0.2" daemonize = "0.2" [features] -default = ["ui-precompiled", "light"] +default = ["ui-precompiled"] ui = [ "dapps", @@ -80,7 +80,6 @@ ethstore-cli = ["ethcore/ethstore-cli"] evm-debug = ["ethcore/evm-debug"] evm-debug-tests = ["ethcore/evm-debug-tests"] slow-blocks = ["ethcore/slow-blocks"] -light = ["ethcore/light", "ethsync/light"] [[bin]] path = "parity/main.rs" diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 2c3d946f4..bd87c422f 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -58,6 +58,5 @@ dev = ["clippy"] default = [] benches = [] ipc = [] -light = [] ethkey-cli = ["ethkey/cli"] ethstore-cli = ["ethstore/cli"] diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index 287044c98..c89bbc74f 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -12,7 +12,7 @@ build = "build.rs" [dependencies] log = "0.3" -ethcore = { path = "..", features = ["light"] } +ethcore = { path = ".."} ethcore-util = { path = "../../util" } ethcore-network = { path = "../../util/network" } ethcore-io = { path = "../../util/io" } @@ -22,4 +22,4 @@ time = "0.1" [features] default = [] -ipc = ["ethcore/ipc", "ethcore-ipc", "ethcore-ipc-codegen"] \ No newline at end of file +ipc = ["ethcore-ipc", "ethcore-ipc-codegen"] \ No newline at end of file diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index ee72ea8b8..9cfad4b96 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1377,7 +1377,6 @@ impl MayPanic for Client { } } -#[cfg(feature = "light")] impl ::client::ProvingBlockChainClient for Client { fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockID) -> Vec<Bytes> { self.state_at(id) diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index beab88e8a..4e5554b01 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -29,7 +29,6 @@ pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::ChainNotify; pub use self::traits::{BlockChainClient, MiningBlockChainClient}; -#[cfg(feature = "light")] pub use self::traits::ProvingBlockChainClient; pub use types::ids::*; diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 3eed9aa5d..7bf17279c 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -278,7 +278,6 @@ pub trait MiningBlockChainClient: BlockChainClient { } /// Extended client interface for providing proofs of the state. -#[cfg(feature = "light")] pub trait ProvingBlockChainClient: BlockChainClient { /// Prove account storage at a specific block id. /// diff --git a/ethcore/src/state/mod.rs b/ethcore/src/state/mod.rs index d39481048..8a52b62ff 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -32,7 +32,6 @@ use state_db::StateDB; use util::*; -#[cfg(feature = "light")] use util::trie::recorder::{Recorder, BasicRecorder as TrieRecorder}; mod account; @@ -764,7 +763,6 @@ impl State { } // LES state proof implementations. -#[cfg(feature = "light")] impl State { /// Prove an account's existence or nonexistence in the state trie. /// Returns a merkle proof of the account's trie node with all nodes before `from_level` diff --git a/sync/Cargo.toml b/sync/Cargo.toml index df0f4840d..f35852558 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -15,7 +15,7 @@ ethcore-ipc-codegen = { path = "../ipc/codegen" } ethcore-util = { path = "../util" } ethcore-network = { path = "../util/network" } ethcore-io = { path = "../util/io" } -ethcore-light = { path = "../ethcore/light", optional = true } +ethcore-light = { path = "../ethcore/light"} ethcore = { path = "../ethcore" } rlp = { path = "../util/rlp" } clippy = { version = "0.0.103", optional = true} @@ -30,7 +30,6 @@ ethcore-ipc-nano = { path = "../ipc/nano" } parking_lot = "0.3" [features] -default = ["ipc"] +default = [] dev = ["clippy", "ethcore/dev", "ethcore-util/dev"] -light = ["ethcore-light"] -ipc = [] +ipc = ["ethcore-light/ipc"] diff --git a/sync/src/api.rs b/sync/src/api.rs index 5613b77ff..d8df149c8 100644 --- a/sync/src/api.rs +++ b/sync/src/api.rs @@ -85,14 +85,18 @@ pub trait SyncProvider: Send + Sync { } /// Transaction stats -#[derive(Debug, Binary)] +#[derive(Debug)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct TransactionStats { + /// Block number where this TX was first seen. pub first_seen: u64, + /// Peers it was propagated to. pub propagated_to: BTreeMap<H512, usize>, } /// Peer connection information -#[derive(Debug, Binary)] +#[derive(Debug)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct PeerInfo { /// Public node id pub id: Option<String>, @@ -120,8 +124,6 @@ pub struct EthSync { handler: Arc<SyncProtocolHandler>, /// The main subprotocol name subprotocol_name: [u8; 3], - /// Configuration - config: NetworkConfiguration, } impl EthSync { @@ -138,14 +140,13 @@ impl EthSync { overlay: RwLock::new(HashMap::new()), }), subprotocol_name: config.subprotocol_name, - config: network_config, }); Ok(sync) } } -#[ipc(client_ident="SyncClient")] +#[cfg_attr(feature = "ipc", ipc(client_ident="SyncClient"))] impl SyncProvider for EthSync { /// Get sync status fn status(&self) -> SyncStatus { @@ -279,7 +280,7 @@ pub trait ManageNetwork : Send + Sync { } -#[ipc(client_ident="NetworkManagerClient")] +#[cfg_attr(feature = "ipc", ipc(client_ident="NetworkManagerClient"))] impl ManageNetwork for EthSync { fn accept_unreserved_peers(&self) { self.network.set_non_reserved_mode(NonReservedPeerMode::Accept); @@ -315,7 +316,8 @@ impl ManageNetwork for EthSync { } /// IP fiter -#[derive(Binary, Clone, Debug, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub enum AllowIP { /// Connect to any address All, @@ -337,7 +339,8 @@ impl AllowIP { } } -#[derive(Binary, Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] /// Network service configuration pub struct NetworkConfiguration { /// Directory path to store general network configuration. None means nothing will be saved @@ -375,26 +378,18 @@ pub struct NetworkConfiguration { } impl NetworkConfiguration { + /// Create a new default config. pub fn new() -> Self { From::from(BasicNetworkConfiguration::new()) } + /// Create a new local config. pub fn new_local() -> Self { From::from(BasicNetworkConfiguration::new_local()) } - fn validate(&self) -> Result<(), AddrParseError> { - if let Some(ref addr) = self.listen_address { - try!(SocketAddr::from_str(&addr)); - } - if let Some(ref addr) = self.public_address { - try!(SocketAddr::from_str(&addr)); - } - Ok(()) - } - + /// Attempt to convert this config into a BasicNetworkConfiguration. pub fn into_basic(self) -> Result<BasicNetworkConfiguration, AddrParseError> { - Ok(BasicNetworkConfiguration { config_path: self.config_path, net_config_path: self.net_config_path, @@ -447,9 +442,14 @@ impl From<BasicNetworkConfiguration> for NetworkConfiguration { } } -#[derive(Debug, Binary, Clone)] +/// Configuration for IPC service. +#[derive(Debug, Clone)] +#[cfg_attr(feature = "ipc", derive(Binary))] pub struct ServiceConfiguration { + /// Sync config. pub sync: SyncConfig, + /// Network configuration. pub net: NetworkConfiguration, + /// IPC path. pub io_path: String, } diff --git a/sync/src/lib.rs b/sync/src/lib.rs index 7a4f22fd7..801fcbbd5 100644 --- a/sync/src/lib.rs +++ b/sync/src/lib.rs @@ -37,10 +37,8 @@ extern crate semver; extern crate parking_lot; extern crate rlp; -#[cfg(feature = "light")] extern crate ethcore_light as light; - #[macro_use] extern crate log; #[macro_use] @@ -60,12 +58,16 @@ mod transactions_stats; #[cfg(test)] mod tests; +#[cfg(feature = "ipc")] mod api { #![allow(dead_code, unused_assignments, unused_variables, missing_docs)] // codegen issues include!(concat!(env!("OUT_DIR"), "/api.rs")); } -pub use api::{EthSync, SyncProvider, SyncClient, NetworkManagerClient, ManageNetwork, SyncConfig, +#[cfg(not(feature = "ipc"))] +mod api; + +pub use api::{EthSync, SyncProvider, ManageNetwork, SyncConfig, ServiceConfiguration, NetworkConfiguration, PeerInfo, AllowIP, TransactionStats}; pub use chain::{SyncStatus, SyncState}; pub use network::{is_valid_node_url, NonReservedPeerMode, NetworkError}; diff --git a/sync/src/tests/mod.rs b/sync/src/tests/mod.rs index bdb4ae4f9..62d110075 100644 --- a/sync/src/tests/mod.rs +++ b/sync/src/tests/mod.rs @@ -17,4 +17,6 @@ pub mod helpers; pub mod snapshot; mod chain; + +#[cfg(feature = "ipc")] mod rpc; From 6f5f1f5e26831575bee4d395989fb528f48a3272 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Thu, 8 Dec 2016 23:21:47 +0100 Subject: [PATCH 019/131] light: integrate with sync + serve_light CLI --- Cargo.lock | 1 + Cargo.toml | 1 + ethcore/light/build.rs | 1 + ethcore/light/src/lib.rs | 13 +++ ethcore/light/src/net/buffer_flow.rs | 13 +++ ethcore/light/src/net/mod.rs | 46 ++++++++--- ethcore/light/src/net/status.rs | 33 ++------ ethcore/light/src/net/tests/mod.rs | 10 +-- ethcore/light/src/provider.rs | 1 + parity/cli/config.full.toml | 1 + parity/cli/mod.rs | 5 ++ parity/cli/usage.txt | 1 + parity/configuration.rs | 2 + parity/main.rs | 1 + parity/modules.rs | 30 +++++-- parity/run.rs | 15 +++- parity/sync.rs | 10 ++- sync/build.rs | 6 +- sync/src/api.rs | 118 ++++++++++++++++++++++----- sync/src/lib.rs | 2 +- 20 files changed, 236 insertions(+), 74 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b00701f32..9184d50f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,6 +18,7 @@ dependencies = [ "ethcore-ipc-hypervisor 1.2.0", "ethcore-ipc-nano 1.4.0", "ethcore-ipc-tests 0.1.0", + "ethcore-light 1.5.0", "ethcore-logger 1.5.0", "ethcore-rpc 1.5.0", "ethcore-signer 1.5.0", diff --git a/Cargo.toml b/Cargo.toml index 078d2916c..7e989b173 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,7 @@ rlp = { path = "util/rlp" } ethcore-stratum = { path = "stratum" } ethcore-dapps = { path = "dapps", optional = true } clippy = { version = "0.0.103", optional = true} +ethcore-light = { path = "ethcore/light" } [target.'cfg(windows)'.dependencies] winapi = "0.2" diff --git a/ethcore/light/build.rs b/ethcore/light/build.rs index 43915c1cf..7d4e0064c 100644 --- a/ethcore/light/build.rs +++ b/ethcore/light/build.rs @@ -20,6 +20,7 @@ extern crate ethcore_ipc_codegen; #[cfg(feature = "ipc")] fn main() { ethcore_ipc_codegen::derive_binary("src/types/mod.rs.in").unwrap(); + ethcore_ipc_codegen::derive_ipc_cond("src/provider.rs", true).unwrap(); } #[cfg(not(feature = "ipc"))] diff --git a/ethcore/light/src/lib.rs b/ethcore/light/src/lib.rs index c00467c4c..7fa2f5911 100644 --- a/ethcore/light/src/lib.rs +++ b/ethcore/light/src/lib.rs @@ -33,8 +33,21 @@ pub mod client; pub mod net; + +#[cfg(not(feature = "ipc"))] pub mod provider; +#[cfg(feature = "ipc")] +pub mod provider { + #![allow(dead_code, unused_assignments, unused_variables, missing_docs)] // codegen issues + include!(concat!(env!("OUT_DIR"), "/provider.rs")); +} + +#[cfg(feature = "ipc")] +pub mod remote { + pub use provider::LightProviderClient; +} + mod types; pub use self::provider::Provider; diff --git a/ethcore/light/src/net/buffer_flow.rs b/ethcore/light/src/net/buffer_flow.rs index 6730c71a7..2371c6ea4 100644 --- a/ethcore/light/src/net/buffer_flow.rs +++ b/ethcore/light/src/net/buffer_flow.rs @@ -22,6 +22,9 @@ //! //! This module provides an interface for configuration of buffer //! flow costs and recharge rates. +//! +//! Current default costs are picked completely arbitrarily, not based +//! on any empirical timings or mathematical models. use request; use super::packet; @@ -273,6 +276,16 @@ impl FlowParams { } } +impl Default for FlowParams { + fn default() -> Self { + FlowParams { + limit: 50_000_000.into(), + costs: CostTable::default(), + recharge: 100_000.into(), + } + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 57dc77a86..fd64f4a4b 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -30,13 +30,14 @@ use util::{Bytes, Mutex, RwLock, U256}; use time::SteadyTime; use std::collections::HashMap; +use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering}; use provider::Provider; use request::{self, Request}; use self::buffer_flow::{Buffer, FlowParams}; -use self::context::{IoContext, EventContext, Ctx}; +use self::context::Ctx; use self::error::{Error, Punishment}; mod buffer_flow; @@ -47,16 +48,20 @@ mod status; #[cfg(test)] mod tests; -pub use self::status::{Status, Capabilities, Announcement, NetworkId}; +pub use self::context::{EventContext, IoContext}; +pub use self::status::{Status, Capabilities, Announcement}; const TIMEOUT: TimerToken = 0; const TIMEOUT_INTERVAL_MS: u64 = 1000; -// LPV1 -const PROTOCOL_VERSION: u32 = 1; +// Supported protocol versions. +pub const PROTOCOL_VERSIONS: &'static [u8] = &[1]; -// TODO [rob] make configurable. -const PROTOCOL_ID: [u8; 3] = *b"les"; +// Max protocol version. +pub const MAX_PROTOCOL_VERSION: u8 = 1; + +// Packet count for LES. +pub const PACKET_COUNT: u8 = 15; // packet ID definitions. mod packet { @@ -173,6 +178,8 @@ pub trait Handler: Send + Sync { /// Called when a peer responds with header proofs. Each proof is a block header coupled /// with a series of trie nodes is ascending order by distance from the root. fn on_header_proofs(&self, _ctx: &EventContext, _req_id: ReqId, _proofs: &[(Bytes, Vec<Bytes>)]) { } + /// Called on abort. + fn on_abort(&self) { } } // a request, the peer who it was made to, and the time it was made. @@ -185,7 +192,7 @@ struct Requested { /// Protocol parameters. pub struct Params { /// Network id. - pub network_id: NetworkId, + pub network_id: u64, /// Buffer flow parameters. pub flow_params: FlowParams, /// Initial capabilities. @@ -203,9 +210,9 @@ pub struct Params { // Locks must be acquired in the order declared, and when holding a read lock // on the peers, only one peer may be held at a time. pub struct LightProtocol { - provider: Box<Provider>, + provider: Arc<Provider>, genesis_hash: H256, - network_id: NetworkId, + network_id: u64, pending_peers: RwLock<HashMap<PeerId, PendingPeer>>, peers: RwLock<HashMap<PeerId, Mutex<Peer>>>, pending_requests: RwLock<HashMap<usize, Requested>>, @@ -217,7 +224,7 @@ pub struct LightProtocol { impl LightProtocol { /// Create a new instance of the protocol manager. - pub fn new(provider: Box<Provider>, params: Params) -> Self { + pub fn new(provider: Arc<Provider>, params: Params) -> Self { let genesis_hash = provider.chain_info().genesis_hash; LightProtocol { provider: provider, @@ -323,6 +330,23 @@ impl LightProtocol { self.handlers.push(handler); } + /// Signal to handlers that network activity is being aborted + /// and clear peer data. + pub fn abort(&self) { + for handler in &self.handlers { + handler.on_abort(); + } + + // acquire in order and hold. + let mut pending_peers = self.pending_peers.write(); + let mut peers = self.peers.write(); + let mut pending_requests = self.pending_requests.write(); + + pending_peers.clear(); + peers.clear(); + pending_requests.clear(); + } + // Does the common pre-verification of responses before the response itself // is actually decoded: // - check whether peer exists @@ -460,7 +484,7 @@ impl LightProtocol { head_hash: chain_info.best_block_hash, head_num: chain_info.best_block_number, genesis_hash: chain_info.genesis_hash, - protocol_version: PROTOCOL_VERSION, + protocol_version: MAX_PROTOCOL_VERSION as u32, network_id: self.network_id, last_head: None, }; diff --git a/ethcore/light/src/net/status.rs b/ethcore/light/src/net/status.rs index 2c0c5f79a..6d0a76823 100644 --- a/ethcore/light/src/net/status.rs +++ b/ethcore/light/src/net/status.rs @@ -82,26 +82,6 @@ impl Key { } } -/// Network ID structure. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -#[repr(u32)] -pub enum NetworkId { - /// ID for the mainnet - Mainnet = 1, - /// ID for the testnet - Testnet = 0, -} - -impl NetworkId { - fn from_raw(raw: u32) -> Option<Self> { - match raw { - 0 => Some(NetworkId::Testnet), - 1 => Some(NetworkId::Mainnet), - _ => None, - } - } -} - // helper for decoding key-value pairs in the handshake or an announcement. struct Parser<'a> { pos: usize, @@ -164,7 +144,7 @@ pub struct Status { /// Protocol version. pub protocol_version: u32, /// Network id of this peer. - pub network_id: NetworkId, + pub network_id: u64, /// Total difficulty of the head of the chain. pub head_td: U256, /// Hash of the best block. @@ -225,8 +205,7 @@ pub fn parse_handshake(rlp: UntrustedRlp) -> Result<(Status, Capabilities, FlowP let status = Status { protocol_version: try!(parser.expect(Key::ProtocolVersion)), - network_id: try!(parser.expect(Key::NetworkId) - .and_then(|id: u32| NetworkId::from_raw(id).ok_or(DecoderError::Custom("Invalid network ID")))), + network_id: try!(parser.expect(Key::NetworkId)), head_td: try!(parser.expect(Key::HeadTD)), head_hash: try!(parser.expect(Key::HeadHash)), head_num: try!(parser.expect(Key::HeadNum)), @@ -254,7 +233,7 @@ pub fn parse_handshake(rlp: UntrustedRlp) -> Result<(Status, Capabilities, FlowP pub fn write_handshake(status: &Status, capabilities: &Capabilities, flow_params: &FlowParams) -> Vec<u8> { let mut pairs = Vec::new(); pairs.push(encode_pair(Key::ProtocolVersion, &status.protocol_version)); - pairs.push(encode_pair(Key::NetworkId, &(status.network_id as u32))); + pairs.push(encode_pair(Key::NetworkId, &(status.network_id as u64))); pairs.push(encode_pair(Key::HeadTD, &status.head_td)); pairs.push(encode_pair(Key::HeadHash, &status.head_hash)); pairs.push(encode_pair(Key::HeadNum, &status.head_num)); @@ -385,7 +364,7 @@ mod tests { fn full_handshake() { let status = Status { protocol_version: 1, - network_id: NetworkId::Mainnet, + network_id: 1, head_td: U256::default(), head_hash: H256::default(), head_num: 10, @@ -420,7 +399,7 @@ mod tests { fn partial_handshake() { let status = Status { protocol_version: 1, - network_id: NetworkId::Mainnet, + network_id: 1, head_td: U256::default(), head_hash: H256::default(), head_num: 10, @@ -455,7 +434,7 @@ mod tests { fn skip_unknown_keys() { let status = Status { protocol_version: 1, - network_id: NetworkId::Mainnet, + network_id: 1, head_td: U256::default(), head_hash: H256::default(), head_num: 10, diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index e659d0681..30ab2bab2 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -25,7 +25,7 @@ use network::PeerId; use net::buffer_flow::FlowParams; use net::context::IoContext; -use net::status::{Capabilities, Status, NetworkId, write_handshake}; +use net::status::{Capabilities, Status, write_handshake}; use net::{encode_request, LightProtocol, Params, packet}; use provider::Provider; use request::{self, Request, Headers}; @@ -174,8 +174,8 @@ fn setup(flow_params: FlowParams, capabilities: Capabilities) -> (Arc<TestProvid client: TestBlockChainClient::new(), }); - let proto = LightProtocol::new(Box::new(TestProvider(provider.clone())), Params { - network_id: NetworkId::Testnet, + let proto = LightProtocol::new(Arc::new(TestProvider(provider.clone())), Params { + network_id: 2, flow_params: flow_params, capabilities: capabilities, }); @@ -185,8 +185,8 @@ fn setup(flow_params: FlowParams, capabilities: Capabilities) -> (Arc<TestProvid fn status(chain_info: BlockChainInfo) -> Status { Status { - protocol_version: ::net::PROTOCOL_VERSION, - network_id: NetworkId::Testnet, + protocol_version: 1, + network_id: 2, head_td: chain_info.total_difficulty, head_hash: chain_info.best_block_hash, head_num: chain_info.best_block_number, diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index 9446aa3f6..37a5cef4d 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -33,6 +33,7 @@ use request; /// or empty vector where appropriate. /// /// [1]: https://github.com/ethcore/parity/wiki/Light-Ethereum-Subprotocol-(LES) +#[cfg_attr(feature = "ipc", ipc(client_ident="LightProviderClient"))] pub trait Provider: Send + Sync { /// Provide current blockchain info. fn chain_info(&self) -> BlockChainInfo; diff --git a/parity/cli/config.full.toml b/parity/cli/config.full.toml index fcd9a9712..73b5e13be 100644 --- a/parity/cli/config.full.toml +++ b/parity/cli/config.full.toml @@ -32,6 +32,7 @@ warp = true allow_ips = "all" snapshot_peers = 0 max_pending_peers = 64 +serve_light = true reserved_only = false reserved_peers = "./path_to_file" diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 7fcdd2209..2335ccee8 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -135,6 +135,8 @@ usage! { flag_reserved_only: bool = false, or |c: &Config| otry!(c.network).reserved_only.clone(), flag_no_ancient_blocks: bool = false, or |_| None, + flag_serve_light: bool = false, + or |c: &Config| otry!(c.network).serve_light.clone(), // -- API and Console Options // RPC @@ -334,6 +336,7 @@ struct Network { node_key: Option<String>, reserved_peers: Option<String>, reserved_only: Option<bool>, + serve_light: Option<bool>, } #[derive(Default, Debug, PartialEq, RustcDecodable)] @@ -543,6 +546,7 @@ mod tests { flag_reserved_peers: Some("./path_to_file".into()), flag_reserved_only: false, flag_no_ancient_blocks: false, + flag_serve_light: true, // -- API and Console Options // RPC @@ -713,6 +717,7 @@ mod tests { node_key: None, reserved_peers: Some("./path/to/reserved_peers".into()), reserved_only: Some(true), + serve_light: None, }), rpc: Some(Rpc { disable: Some(true), diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index b67af6110..58b836aa4 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -97,6 +97,7 @@ Networking Options: --max-pending-peers NUM Allow up to NUM pending connections. (default: {flag_max_pending_peers}) --no-ancient-blocks Disable downloading old blocks after snapshot restoration or warp sync. (default: {flag_no_ancient_blocks}) + --serve-light Experimental: Serve light client peers. (default: {flag_serve_light}) API and Console Options: --no-jsonrpc Disable the JSON-RPC API server. (default: {flag_no_jsonrpc}) diff --git a/parity/configuration.rs b/parity/configuration.rs index 37c699521..94fa20e59 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -275,6 +275,7 @@ impl Configuration { no_periodic_snapshot: self.args.flag_no_periodic_snapshot, check_seal: !self.args.flag_no_seal_check, download_old_blocks: !self.args.flag_no_ancient_blocks, + serve_light: self.args.flag_serve_light, }; Cmd::Run(run_cmd) }; @@ -921,6 +922,7 @@ mod tests { no_periodic_snapshot: false, check_seal: true, download_old_blocks: true, + serve_light: false, })); } diff --git a/parity/main.rs b/parity/main.rs index c125e87f6..17f5ed74b 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -43,6 +43,7 @@ extern crate serde; extern crate serde_json; extern crate rlp; extern crate ethcore_hash_fetch as hash_fetch; +extern crate ethcore_light as light; extern crate ethcore_ipc_hypervisor as hypervisor; extern crate ethcore_rpc; diff --git a/parity/modules.rs b/parity/modules.rs index 39e05a293..5d1d66cd7 100644 --- a/parity/modules.rs +++ b/parity/modules.rs @@ -15,16 +15,22 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. use std::sync::Arc; +use std::path::Path; + use ethcore::client::BlockChainClient; use hypervisor::Hypervisor; -use ethsync::{SyncConfig, NetworkConfiguration, NetworkError}; +use ethsync::{SyncConfig, NetworkConfiguration, NetworkError, Params}; use ethcore::snapshot::SnapshotService; +use light::Provider; + #[cfg(not(feature="ipc"))] use self::no_ipc_deps::*; + +#[cfg(not(feature="ipc"))] +use ethcore_logger::Config as LogConfig; + #[cfg(feature="ipc")] use self::ipc_deps::*; -use ethcore_logger::Config as LogConfig; -use std::path::Path; #[cfg(feature="ipc")] pub mod service_urls { @@ -36,6 +42,8 @@ pub mod service_urls { pub const SYNC_NOTIFY: &'static str = "parity-sync-notify.ipc"; pub const NETWORK_MANAGER: &'static str = "parity-manage-net.ipc"; pub const SYNC_CONTROL: &'static str = "parity-sync-control.ipc"; + pub const LIGHT_PROVIDER: &'static str = "parity-light-provider.ipc"; + #[cfg(feature="stratum")] pub const STRATUM: &'static str = "parity-stratum.ipc"; #[cfg(feature="stratum")] @@ -75,6 +83,7 @@ mod ipc_deps { pub use nanoipc::{GuardedSocket, NanoSocket, generic_client, fast_client}; pub use ipc::IpcSocket; pub use ipc::binary::serialize; + pub use light::remote::LightProviderClient; } #[cfg(feature="ipc")] @@ -124,6 +133,7 @@ pub fn sync net_cfg: NetworkConfiguration, _client: Arc<BlockChainClient>, _snapshot_service: Arc<SnapshotService>, + _provider: Arc<Provider>, log_settings: &LogConfig, ) -> Result<SyncModules, NetworkError> @@ -141,7 +151,9 @@ pub fn sync &service_urls::with_base(&hypervisor.io_path, service_urls::SYNC_NOTIFY)).unwrap(); let manage_client = generic_client::<NetworkManagerClient<_>>( &service_urls::with_base(&hypervisor.io_path, service_urls::NETWORK_MANAGER)).unwrap(); - + let provider_client = generic_client::<LightProviderClient<_>>( + &service_urls::with_base(&hypervisor.io_path, service_urls::LIGHT_PROVIDER)).unwrap(); + *hypervisor_ref = Some(hypervisor); Ok((sync_client, manage_client, notify_client)) } @@ -154,10 +166,18 @@ pub fn sync net_cfg: NetworkConfiguration, client: Arc<BlockChainClient>, snapshot_service: Arc<SnapshotService>, + provider: Arc<Provider>, _log_settings: &LogConfig, ) -> Result<SyncModules, NetworkError> { - let eth_sync = try!(EthSync::new(sync_cfg, client, snapshot_service, net_cfg)); + let eth_sync = try!(EthSync::new(Params { + config: sync_cfg, + chain: client, + provider: provider, + snapshot_service: snapshot_service, + network_config: net_cfg, + })); + Ok((eth_sync.clone() as Arc<SyncProvider>, eth_sync.clone() as Arc<ManageNetwork>, eth_sync.clone() as Arc<ChainNotify>)) } diff --git a/parity/run.rs b/parity/run.rs index 42a972000..5c02e4021 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -92,6 +92,7 @@ pub struct RunCmd { pub no_periodic_snapshot: bool, pub check_seal: bool, pub download_old_blocks: bool, + pub serve_light: bool, } pub fn open_ui(dapps_conf: &dapps::Configuration, signer_conf: &signer::Configuration) -> Result<(), String> { @@ -185,6 +186,11 @@ pub fn execute(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<(), String> { ); info!("Operating mode: {}", Colour::White.bold().paint(format!("{}", mode))); + if cmd.serve_light { + info!("Configured to serve light client peers. Please note this feature is {}.", + Colour::White.bold().paint("experimental".to_string())); + } + // display warning about using experimental journaldb alorithm if !algorithm.is_stable() { warn!("Your chosen strategy is {}! You can re-run with --pruning to change.", Colour::Red.bold().paint("unstable")); @@ -204,6 +210,7 @@ pub fn execute(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<(), String> { sync_config.fork_block = spec.fork_block(); sync_config.warp_sync = cmd.warp_sync; sync_config.download_old_blocks = cmd.download_old_blocks; + sync_config.serve_light = cmd.serve_light; // prepare account provider let account_provider = Arc::new(try!(prepare_account_provider(&cmd.dirs, cmd.acc_conf))); @@ -268,7 +275,13 @@ pub fn execute(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<(), String> { // create sync object let (sync_provider, manage_network, chain_notify) = try!(modules::sync( - &mut hypervisor, sync_config, net_conf.into(), client.clone(), snapshot_service.clone(), &cmd.logger_config, + &mut hypervisor, + sync_config, + net_conf.into(), + client.clone(), + snapshot_service.clone(), + client.clone(), + &cmd.logger_config, ).map_err(|e| format!("Sync error: {}", e))); service.add_notify(chain_notify.clone()); diff --git a/parity/sync.rs b/parity/sync.rs index 25f900b78..17f183c80 100644 --- a/parity/sync.rs +++ b/parity/sync.rs @@ -22,6 +22,7 @@ use hypervisor::{SYNC_MODULE_ID, HYPERVISOR_IPC_URL, ControlService}; use ethcore::client::ChainNotify; use ethcore::client::remote::RemoteClient; use ethcore::snapshot::remote::RemoteSnapshotService; +use light::remote::LightProviderClient; use ethsync::{SyncProvider, EthSync, ManageNetwork, ServiceConfiguration}; use modules::service_urls; use boot; @@ -48,8 +49,15 @@ pub fn main() { let remote_client = dependency!(RemoteClient, &service_urls::with_base(&service_config.io_path, service_urls::CLIENT)); let remote_snapshot = dependency!(RemoteSnapshotService, &service_urls::with_base(&service_config.io_path, service_urls::SNAPSHOT)); + let remote_provider = dependency!(LightProviderClient, &service_urls::with_base(&service_config.io_path, service_urls::LIGHT_PROVIDER)); - let sync = EthSync::new(service_config.sync, remote_client.service().clone(), remote_snapshot.service().clone(), service_config.net).unwrap(); + let sync = EthSync::new(Params { + config: service_config.sync, + chain: remote_client.service().clone(), + snapshot_service: remote_snapshot.service().clone(), + provider: remote_provider.service().clone(), + network_config: service_config.net + }).unwrap(); let _ = boot::main_thread(); let service_stop = Arc::new(AtomicBool::new(false)); diff --git a/sync/build.rs b/sync/build.rs index c465d5e34..1e08ae652 100644 --- a/sync/build.rs +++ b/sync/build.rs @@ -16,6 +16,10 @@ extern crate ethcore_ipc_codegen; +#[cfg(feature = "ipc")] fn main() { - ethcore_ipc_codegen::derive_ipc_cond("src/api.rs", cfg!(feature="ipc")).unwrap(); + ethcore_ipc_codegen::derive_ipc_cond("src/api.rs", true).unwrap(); } + +#[cfg(not(feature = "ipc"))] +fn main() {} diff --git a/sync/src/api.rs b/sync/src/api.rs index d8df149c8..acc593fb1 100644 --- a/sync/src/api.rs +++ b/sync/src/api.rs @@ -33,6 +33,7 @@ use ipc::{BinaryConvertable, BinaryConvertError, IpcConfig}; use std::str::FromStr; use parking_lot::RwLock; use chain::{ETH_PACKET_COUNT, SNAPSHOT_SYNC_PACKET_COUNT}; +use light::net::{LightProtocol, Params as LightParams, Capabilities, Handler as LightHandler, EventContext}; pub const WARP_SYNC_PROTOCOL_ID: ProtocolId = *b"par"; @@ -47,10 +48,14 @@ pub struct SyncConfig { pub network_id: u64, /// Main "eth" subprotocol name. pub subprotocol_name: [u8; 3], + /// Light "les" subprotocol name. + pub light_subprotocol_name: [u8; 3], /// Fork block to check pub fork_block: Option<(BlockNumber, H256)>, /// Enable snapshot sync pub warp_sync: bool, + /// Enable light client server. + pub serve_light: bool, } impl Default for SyncConfig { @@ -60,8 +65,10 @@ impl Default for SyncConfig { download_old_blocks: true, network_id: 1, subprotocol_name: *b"eth", + light_subprotocol_name: *b"les", fork_block: None, warp_sync: false, + serve_light: false, } } } @@ -116,30 +123,74 @@ pub struct PeerInfo { pub eth_difficulty: Option<U256>, } +/// EthSync initialization parameters. +#[cfg_attr(feature = "ipc", derive(Binary))] +pub struct Params { + /// Configuration. + pub config: SyncConfig, + /// Blockchain client. + pub chain: Arc<BlockChainClient>, + /// Snapshot service. + pub snapshot_service: Arc<SnapshotService>, + /// Light data provider. + pub provider: Arc<::light::Provider>, + /// Network layer configuration. + pub network_config: NetworkConfiguration, +} + /// Ethereum network protocol handler pub struct EthSync { /// Network service network: NetworkService, - /// Protocol handler - handler: Arc<SyncProtocolHandler>, + /// Main (eth/par) protocol handler + sync_handler: Arc<SyncProtocolHandler>, + /// Light (les) protocol handler + light_proto: Option<Arc<LightProtocol>>, /// The main subprotocol name subprotocol_name: [u8; 3], + /// Light subprotocol name. + light_subprotocol_name: [u8; 3], } impl EthSync { /// Creates and register protocol with the network service - pub fn new(config: SyncConfig, chain: Arc<BlockChainClient>, snapshot_service: Arc<SnapshotService>, network_config: NetworkConfiguration) -> Result<Arc<EthSync>, NetworkError> { - let chain_sync = ChainSync::new(config, &*chain); - let service = try!(NetworkService::new(try!(network_config.clone().into_basic()))); - let sync = Arc::new(EthSync{ + pub fn new(params: Params) -> Result<Arc<EthSync>, NetworkError> { + let pruning_info = params.chain.pruning_info(); + let light_proto = match params.config.serve_light { + false => None, + true => Some({ + let light_params = LightParams { + network_id: params.config.network_id, + flow_params: Default::default(), + capabilities: Capabilities { + serve_headers: true, + serve_chain_since: Some(pruning_info.earliest_chain), + serve_state_since: Some(pruning_info.earliest_state), + tx_relay: true, + }, + }; + + let mut light_proto = LightProtocol::new(params.provider, light_params); + light_proto.add_handler(Box::new(TxRelay(params.chain.clone()))); + + Arc::new(light_proto) + }) + }; + + let chain_sync = ChainSync::new(params.config, &*params.chain); + let service = try!(NetworkService::new(try!(params.network_config.clone().into_basic()))); + + let sync = Arc::new(EthSync { network: service, - handler: Arc::new(SyncProtocolHandler { + sync_handler: Arc::new(SyncProtocolHandler { sync: RwLock::new(chain_sync), - chain: chain, - snapshot_service: snapshot_service, + chain: params.chain, + snapshot_service: params.snapshot_service, overlay: RwLock::new(HashMap::new()), }), - subprotocol_name: config.subprotocol_name, + light_proto: light_proto, + subprotocol_name: params.config.subprotocol_name, + light_subprotocol_name: params.config.light_subprotocol_name, }); Ok(sync) @@ -150,14 +201,15 @@ impl EthSync { impl SyncProvider for EthSync { /// Get sync status fn status(&self) -> SyncStatus { - self.handler.sync.write().status() + self.sync_handler.sync.write().status() } /// Get sync peers fn peers(&self) -> Vec<PeerInfo> { + // TODO: [rob] LES peers/peer info self.network.with_context_eval(self.subprotocol_name, |context| { - let sync_io = NetSyncIo::new(context, &*self.handler.chain, &*self.handler.snapshot_service, &self.handler.overlay); - self.handler.sync.write().peers(&sync_io) + let sync_io = NetSyncIo::new(context, &*self.sync_handler.chain, &*self.sync_handler.snapshot_service, &self.sync_handler.overlay); + self.sync_handler.sync.write().peers(&sync_io) }).unwrap_or(Vec::new()) } @@ -166,7 +218,7 @@ impl SyncProvider for EthSync { } fn transactions_stats(&self) -> BTreeMap<H256, TransactionStats> { - let sync = self.handler.sync.read(); + let sync = self.sync_handler.sync.read(); sync.transactions_stats() .iter() .map(|(hash, stats)| (*hash, stats.into())) @@ -228,8 +280,8 @@ impl ChainNotify for EthSync { _duration: u64) { self.network.with_context(self.subprotocol_name, |context| { - let mut sync_io = NetSyncIo::new(context, &*self.handler.chain, &*self.handler.snapshot_service, &self.handler.overlay); - self.handler.sync.write().chain_new_blocks( + let mut sync_io = NetSyncIo::new(context, &*self.sync_handler.chain, &*self.sync_handler.snapshot_service, &self.sync_handler.overlay); + self.sync_handler.sync.write().chain_new_blocks( &mut sync_io, &imported, &invalid, @@ -245,19 +297,36 @@ impl ChainNotify for EthSync { Err(err) => warn!("Error starting network: {}", err), _ => {}, } - self.network.register_protocol(self.handler.clone(), self.subprotocol_name, ETH_PACKET_COUNT, &[62u8, 63u8]) + self.network.register_protocol(self.sync_handler.clone(), self.subprotocol_name, ETH_PACKET_COUNT, &[62u8, 63u8]) .unwrap_or_else(|e| warn!("Error registering ethereum protocol: {:?}", e)); // register the warp sync subprotocol - self.network.register_protocol(self.handler.clone(), WARP_SYNC_PROTOCOL_ID, SNAPSHOT_SYNC_PACKET_COUNT, &[1u8]) + self.network.register_protocol(self.sync_handler.clone(), WARP_SYNC_PROTOCOL_ID, SNAPSHOT_SYNC_PACKET_COUNT, &[1u8]) .unwrap_or_else(|e| warn!("Error registering snapshot sync protocol: {:?}", e)); + + // register the light protocol. + if let Some(light_proto) = self.light_proto.as_ref().map(|x| x.clone()) { + self.network.register_protocol(light_proto, self.light_subprotocol_name, ::light::net::PACKET_COUNT, ::light::net::PROTOCOL_VERSIONS) + .unwrap_or_else(|e| warn!("Error registering light client protocol: {:?}", e)); + } } fn stop(&self) { - self.handler.snapshot_service.abort_restore(); + self.sync_handler.snapshot_service.abort_restore(); self.network.stop().unwrap_or_else(|e| warn!("Error stopping network: {:?}", e)); } } +/// LES event handler. +/// Simply queues transactions from light client peers. +struct TxRelay(Arc<BlockChainClient>); + +impl LightHandler for TxRelay { + fn on_transactions(&self, ctx: &EventContext, relay: &[::ethcore::transaction::SignedTransaction]) { + trace!(target: "les", "Relaying {} transactions from peer {}", relay.len(), ctx.peer()); + self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).to_vec()).collect()) + } +} + impl IpcConfig for ManageNetwork { } impl IpcConfig for SyncProvider { } @@ -304,9 +373,14 @@ impl ManageNetwork for EthSync { fn stop_network(&self) { self.network.with_context(self.subprotocol_name, |context| { - let mut sync_io = NetSyncIo::new(context, &*self.handler.chain, &*self.handler.snapshot_service, &self.handler.overlay); - self.handler.sync.write().abort(&mut sync_io); + let mut sync_io = NetSyncIo::new(context, &*self.sync_handler.chain, &*self.sync_handler.snapshot_service, &self.sync_handler.overlay); + self.sync_handler.sync.write().abort(&mut sync_io); }); + + if let Some(light_proto) = self.light_proto.as_ref() { + light_proto.abort(); + } + self.stop(); } @@ -452,4 +526,4 @@ pub struct ServiceConfiguration { pub net: NetworkConfiguration, /// IPC path. pub io_path: String, -} +} \ No newline at end of file diff --git a/sync/src/lib.rs b/sync/src/lib.rs index 801fcbbd5..09f79f16f 100644 --- a/sync/src/lib.rs +++ b/sync/src/lib.rs @@ -67,7 +67,7 @@ mod api { #[cfg(not(feature = "ipc"))] mod api; -pub use api::{EthSync, SyncProvider, ManageNetwork, SyncConfig, +pub use api::{EthSync, Params, SyncProvider, ManageNetwork, SyncConfig, ServiceConfiguration, NetworkConfiguration, PeerInfo, AllowIP, TransactionStats}; pub use chain::{SyncStatus, SyncState}; pub use network::{is_valid_node_url, NonReservedPeerMode, NetworkError}; From e7ce8c95588878f71ffeeb6509dbda0944e82ccd Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Thu, 8 Dec 2016 23:57:09 +0100 Subject: [PATCH 020/131] light: broadcast status updates to peers --- ethcore/light/src/net/mod.rs | 21 ++++++++++++++++++++- sync/src/api.rs | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index fd64f4a4b..7c186aa94 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -27,7 +27,7 @@ use network::{NetworkProtocolHandler, NetworkContext, NetworkError, PeerId}; use rlp::{RlpStream, Stream, UntrustedRlp, View}; use util::hash::H256; use util::{Bytes, Mutex, RwLock, U256}; -use time::SteadyTime; +use time::{Duration, SteadyTime}; use std::collections::HashMap; use std::sync::Arc; @@ -54,6 +54,9 @@ pub use self::status::{Status, Capabilities, Announcement}; const TIMEOUT: TimerToken = 0; const TIMEOUT_INTERVAL_MS: u64 = 1000; +// minimum interval between updates. +const UPDATE_INTERVAL_MS: i64 = 5000; + // Supported protocol versions. pub const PROTOCOL_VERSIONS: &'static [u8] = &[1]; @@ -107,6 +110,7 @@ pub struct ReqId(usize); // may not have received one for. struct PendingPeer { sent_head: H256, + last_update: SteadyTime, } // data about each peer. @@ -117,6 +121,7 @@ struct Peer { capabilities: Capabilities, remote_flow: FlowParams, sent_head: H256, // last head we've given them. + last_update: SteadyTime, } impl Peer { @@ -293,6 +298,7 @@ impl LightProtocol { /// The announcement is expected to be valid. pub fn make_announcement(&self, io: &IoContext, mut announcement: Announcement) { let mut reorgs_map = HashMap::new(); + let now = SteadyTime::now(); // update stored capabilities self.capabilities.write().update_from(&announcement); @@ -300,6 +306,17 @@ impl LightProtocol { // calculate reorg info and send packets for (peer_id, peer_info) in self.peers.read().iter() { let mut peer_info = peer_info.lock(); + + // TODO: "urgent" announcements like new blocks? + // the timer approach will skip 1 (possibly 2) in rare occasions. + if peer_info.sent_head == announcement.head_hash || + peer_info.status.head_num >= announcement.head_num || + now - peer_info.last_update < Duration::milliseconds(UPDATE_INTERVAL_MS) { + continue + } + + peer_info.last_update = now; + let reorg_depth = reorgs_map.entry(peer_info.sent_head) .or_insert_with(|| { match self.provider.reorg_depth(&announcement.head_hash, &peer_info.sent_head) { @@ -496,6 +513,7 @@ impl LightProtocol { Ok(PendingPeer { sent_head: chain_info.best_block_hash, + last_update: SteadyTime::now(), }) } @@ -523,6 +541,7 @@ impl LightProtocol { capabilities: capabilities.clone(), remote_flow: flow_params, sent_head: pending.sent_head, + last_update: pending.last_update, })); for handler in &self.handlers { diff --git a/sync/src/api.rs b/sync/src/api.rs index acc593fb1..7c531bf7c 100644 --- a/sync/src/api.rs +++ b/sync/src/api.rs @@ -279,6 +279,8 @@ impl ChainNotify for EthSync { sealed: Vec<H256>, _duration: u64) { + use light::net::Announcement; + self.network.with_context(self.subprotocol_name, |context| { let mut sync_io = NetSyncIo::new(context, &*self.sync_handler.chain, &*self.sync_handler.snapshot_service, &self.sync_handler.overlay); self.sync_handler.sync.write().chain_new_blocks( @@ -289,6 +291,25 @@ impl ChainNotify for EthSync { &retracted, &sealed); }); + + self.network.with_context(self.light_subprotocol_name, |context| { + let light_proto = match self.light_proto.as_ref() { + Some(lp) => lp, + None => return, + }; + + let chain_info = self.sync_handler.chain.chain_info(); + light_proto.make_announcement(context, Announcement { + head_hash: chain_info.best_block_hash, + head_num: chain_info.best_block_number, + head_td: chain_info.total_difficulty, + reorg_depth: 0, // recalculated on a per-peer basis. + serve_headers: false, // these fields consist of _changes_ in capability. + serve_state_since: None, + serve_chain_since: None, + tx_relay: false, + }) + }) } fn start(&self) { From ad971a444cb66e4ee3a97a86f11a6c677ab67951 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 00:00:56 +0100 Subject: [PATCH 021/131] Add autoRemove functionality for api.subscribe --- js/src/api/subscriptions/manager.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/js/src/api/subscriptions/manager.js b/js/src/api/subscriptions/manager.js index bc9632592..300ede5f8 100644 --- a/js/src/api/subscriptions/manager.js +++ b/js/src/api/subscriptions/manager.js @@ -59,7 +59,7 @@ export default class Manager { return subscription; } - subscribe (subscriptionName, callback) { + subscribe (subscriptionName, callback, autoRemove = false) { return new Promise((resolve, reject) => { const subscription = this._validateType(subscriptionName); @@ -75,6 +75,7 @@ export default class Manager { this.subscriptions[subscriptionId] = { name: subscriptionName, id: subscriptionId, + autoRemove, callback }; @@ -104,13 +105,16 @@ export default class Manager { const { callback } = this.subscriptions[subscriptionId]; try { - callback(error, data); + return callback(error, data); } catch (error) { console.error(`Unable to update callback for subscriptionId ${subscriptionId}`, error); } + + return true; } _updateSubscriptions = (subscriptionName, error, data) => { + const cleanup = []; const subscriptions = this.subscriptions .filter(subscription => subscription.name === subscriptionName); @@ -118,8 +122,16 @@ export default class Manager { subscriptions .forEach((subscription) => { - this._sendData(subscription.id, error, data); + const result = this._sendData(subscription.id, error, data); + + if (subscription.autoRemove && !result) { + cleanup.push(subscription.id); + } }); + + cleanup.forEach((subscriptionId) => { + delete this.subscriptions[subscriptionId]; + }); } } From 4ce3142c630c8ca236240aa7642536fb1d2aa777 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 00:15:27 +0100 Subject: [PATCH 022/131] Add autoRemove functionality to api.contract.subscribe --- js/src/api/contract/contract.js | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index ed922a02c..f34cd8575 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -240,8 +240,8 @@ export default class Contract { } _bindEvent = (event) => { - event.subscribe = (options = {}, callback) => { - return this._subscribe(event, options, callback); + event.subscribe = (options = {}, callback, autoRemove = false) => { + return this._subscribe(event, options, callback, autoRemove); }; event.unsubscribe = (subscriptionId) => { @@ -307,16 +307,16 @@ export default class Contract { return this._api.eth.newFilter(options); } - subscribe (eventName = null, options = {}, callback) { + subscribe (eventName = null, options = {}, callback, autoRemove = false) { try { const event = this._findEvent(eventName); - return this._subscribe(event, options, callback); + return this._subscribe(event, options, callback, autoRemove); } catch (e) { return Promise.reject(e); } } - _subscribe (event = null, _options, callback) { + _subscribe (event = null, _options, callback, autoRemove = false) { const subscriptionId = nextSubscriptionId++; const { skipInitFetch } = _options; delete _options['skipInitFetch']; @@ -326,6 +326,7 @@ export default class Contract { .then((filterId) => { this._subscriptions[subscriptionId] = { options: _options, + autoRemove, callback, filterId }; @@ -338,7 +339,11 @@ export default class Contract { return this._api.eth .getFilterLogs(filterId) .then((logs) => { - callback(null, this.parseEventLogs(logs)); + const result = callback(null, this.parseEventLogs(logs)); + + if (autoRemove && !result) { + this.unsubscribe(subscriptionId); + } this._subscribeToChanges(); return subscriptionId; @@ -438,16 +443,22 @@ export default class Contract { }) ) .then((logsArray) => { - logsArray.forEach((logs, idx) => { + logsArray.forEach((logs, subscriptionId) => { if (!logs || !logs.length) { return; } + let result = false; + try { - subscriptions[idx].callback(null, this.parseEventLogs(logs)); + result = subscriptions[subscriptionId].callback(null, this.parseEventLogs(logs)); } catch (error) { console.error('_sendSubscriptionChanges', error); } + + if (subscriptions[subscriptionId].autoRemove && !result) { + this.unsubscribe(subscriptionId); + } }); }) .catch((error) => { From 1ecda93de97b3974fc07812d9fcc4a530f65ff5e Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 00:15:39 +0100 Subject: [PATCH 023/131] Align api.subscribe with contract --- js/src/api/subscriptions/manager.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/js/src/api/subscriptions/manager.js b/js/src/api/subscriptions/manager.js index 300ede5f8..960961287 100644 --- a/js/src/api/subscriptions/manager.js +++ b/js/src/api/subscriptions/manager.js @@ -82,7 +82,11 @@ export default class Manager { if (!engine.isStarted) { engine.start(); } else { - this._sendData(subscriptionId, error, data); + const result = this._sendData(subscriptionId, error, data); + + if (autoRemove && !result) { + this.unsubscribe(subscriptionId); + } } resolve(subscriptionId); @@ -102,19 +106,18 @@ export default class Manager { } _sendData (subscriptionId, error, data) { - const { callback } = this.subscriptions[subscriptionId]; + let result = false; try { - return callback(error, data); + result = this.subscriptions[subscriptionId](error, data); } catch (error) { console.error(`Unable to update callback for subscriptionId ${subscriptionId}`, error); } - return true; + return result; } _updateSubscriptions = (subscriptionName, error, data) => { - const cleanup = []; const subscriptions = this.subscriptions .filter(subscription => subscription.name === subscriptionName); @@ -125,13 +128,9 @@ export default class Manager { const result = this._sendData(subscription.id, error, data); if (subscription.autoRemove && !result) { - cleanup.push(subscription.id); + this.unsubscribe(subscription.id); } }); - - cleanup.forEach((subscriptionId) => { - delete this.subscriptions[subscriptionId]; - }); } } From 3989e2642b9665b1b90a94b39eb2016a6bbb8550 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 00:25:50 +0100 Subject: [PATCH 024/131] Typo --- js/src/api/subscriptions/manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/api/subscriptions/manager.js b/js/src/api/subscriptions/manager.js index 960961287..685aa243c 100644 --- a/js/src/api/subscriptions/manager.js +++ b/js/src/api/subscriptions/manager.js @@ -109,7 +109,7 @@ export default class Manager { let result = false; try { - result = this.subscriptions[subscriptionId](error, data); + result = this.subscriptions[subscriptionId].callback(error, data); } catch (error) { console.error(`Unable to update callback for subscriptionId ${subscriptionId}`, error); } From d53c47aa69bc9717a55819391961b417fb079796 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Fri, 9 Dec 2016 00:35:34 +0100 Subject: [PATCH 025/131] more tracing --- ethcore/light/src/net/mod.rs | 9 +++++++++ ethcore/light/src/net/status.rs | 1 + 2 files changed, 10 insertions(+) diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 7c186aa94..0eda7b77c 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -230,6 +230,8 @@ pub struct LightProtocol { impl LightProtocol { /// Create a new instance of the protocol manager. pub fn new(provider: Arc<Provider>, params: Params) -> Self { + debug!(target: "les", "Initializing LES handler"); + let genesis_hash = provider.chain_info().genesis_hash; LightProtocol { provider: provider, @@ -400,6 +402,8 @@ impl LightProtocol { fn handle_packet(&self, io: &IoContext, peer: &PeerId, packet_id: u8, data: &[u8]) { let rlp = UntrustedRlp::new(data); + trace!(target: "les", "Incoming packet {} from peer {}", packet_id, peer); + // handle the packet let res = match packet_id { packet::STATUS => self.status(peer, io, rlp), @@ -452,6 +456,8 @@ impl LightProtocol { fn on_connect(&self, peer: &PeerId, io: &IoContext) { let peer = *peer; + trace!(target: "les", "Peer {} connecting", peer); + match self.send_status(peer, io) { Ok(pending_peer) => { self.pending_peers.write().insert(peer, pending_peer); @@ -465,6 +471,9 @@ impl LightProtocol { // called when a peer disconnects. fn on_disconnect(&self, peer: PeerId, io: &IoContext) { + trace!(target: "les", "Peer {} disconnecting", peer); + + self.pending_peers.write().remove(&peer); if self.peers.write().remove(&peer).is_some() { let unfulfilled: Vec<_> = self.pending_requests.read() diff --git a/ethcore/light/src/net/status.rs b/ethcore/light/src/net/status.rs index 6d0a76823..eb80fbe44 100644 --- a/ethcore/light/src/net/status.rs +++ b/ethcore/light/src/net/status.rs @@ -98,6 +98,7 @@ impl<'a> Parser<'a> { // expect a specific next key, and get the value's RLP. // if the key isn't found, the position isn't advanced. fn expect_raw(&mut self, key: Key) -> Result<UntrustedRlp<'a>, DecoderError> { + trace!(target: "les", "Expecting key {}", key.as_str()); let pre_pos = self.pos; if let Some((k, val)) = try!(self.get_next()) { if k == key { return Ok(val) } From 10c356de65bd269833ef12d6927a00d89ca3d9f8 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 00:52:21 +0100 Subject: [PATCH 026/131] Simplify, consolidate uses between subscription managers --- js/src/api/contract/contract.js | 30 ++++++++++++++++------------- js/src/api/subscriptions/manager.js | 19 +++++++----------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index f34cd8575..233115d68 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -316,6 +316,21 @@ export default class Contract { } } + _sendData (subscriptionId, error, logs) { + const { autoRemove, callback } = this._subscriptions[subscriptionId]; + let result = false; + + try { + result = callback(error, logs); + } catch (error) { + console.warn('_sendData', subscriptionId, error); + } + + if (autoRemove && !result) { + this.unsubscribe(subscriptionId); + } + } + _subscribe (event = null, _options, callback, autoRemove = false) { const subscriptionId = nextSubscriptionId++; const { skipInitFetch } = _options; @@ -339,12 +354,7 @@ export default class Contract { return this._api.eth .getFilterLogs(filterId) .then((logs) => { - const result = callback(null, this.parseEventLogs(logs)); - - if (autoRemove && !result) { - this.unsubscribe(subscriptionId); - } - + this._sendData(subscriptionId, null, this.parseEventLogs(logs)); this._subscribeToChanges(); return subscriptionId; }); @@ -448,17 +458,11 @@ export default class Contract { return; } - let result = false; - try { - result = subscriptions[subscriptionId].callback(null, this.parseEventLogs(logs)); + this.sendData(subscriptionId, null, this.parseEventLogs(logs)); } catch (error) { console.error('_sendSubscriptionChanges', error); } - - if (subscriptions[subscriptionId].autoRemove && !result) { - this.unsubscribe(subscriptionId); - } }); }) .catch((error) => { diff --git a/js/src/api/subscriptions/manager.js b/js/src/api/subscriptions/manager.js index 685aa243c..a2716684b 100644 --- a/js/src/api/subscriptions/manager.js +++ b/js/src/api/subscriptions/manager.js @@ -82,11 +82,7 @@ export default class Manager { if (!engine.isStarted) { engine.start(); } else { - const result = this._sendData(subscriptionId, error, data); - - if (autoRemove && !result) { - this.unsubscribe(subscriptionId); - } + this._sendData(subscriptionId, error, data); } resolve(subscriptionId); @@ -106,15 +102,18 @@ export default class Manager { } _sendData (subscriptionId, error, data) { + const { autoRemove, callback } = this.subscriptions[subscriptionId]; let result = false; try { - result = this.subscriptions[subscriptionId].callback(error, data); + result = callback(error, data); } catch (error) { console.error(`Unable to update callback for subscriptionId ${subscriptionId}`, error); } - return result; + if (autoRemove && !result) { + this.unsubscribe(subscriptionId); + } } _updateSubscriptions = (subscriptionName, error, data) => { @@ -125,11 +124,7 @@ export default class Manager { subscriptions .forEach((subscription) => { - const result = this._sendData(subscription.id, error, data); - - if (subscription.autoRemove && !result) { - this.unsubscribe(subscription.id); - } + this._sendData(subscription.id, error, data); }); } } From 13f962ae01c981ab4d4f7972af80b24dd951e246 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 00:56:12 +0100 Subject: [PATCH 027/131] Attempt to fix ci webpack --- js/src/api/contract/contract.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index 233115d68..2ef24c685 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -240,7 +240,7 @@ export default class Contract { } _bindEvent = (event) => { - event.subscribe = (options = {}, callback, autoRemove = false) => { + event.subscribe = (options = {}, callback, autoRemove) => { return this._subscribe(event, options, callback, autoRemove); }; @@ -307,7 +307,7 @@ export default class Contract { return this._api.eth.newFilter(options); } - subscribe (eventName = null, options = {}, callback, autoRemove = false) { + subscribe (eventName = null, options = {}, callback, autoRemove) { try { const event = this._findEvent(eventName); return this._subscribe(event, options, callback, autoRemove); From b76a717720dec7e3688f9054da1e4cec23e324df Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 00:58:53 +0100 Subject: [PATCH 028/131] Fix & with && --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2460678d4..14f7b41e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -108,9 +108,9 @@ linux-centos: paths: - target/release/parity name: "x86_64-unknown-centos-gnu_parity" -linux-i686: - stage: build - image: ethcore/rust-i686:latest +linux-i686: + stage: build + image: ethcore/rust-i686:latest only: - beta - tags @@ -348,7 +348,7 @@ windows: - set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;C:\vs2015\VC\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt - set LIB=C:\vs2015\VC\lib;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64 - set RUST_BACKTRACE=1 - - set RUSTFLAGS=%RUSTFLAGS% + - set RUSTFLAGS=%RUSTFLAGS% - rustup default stable-x86_64-pc-windows-msvc - cargo build -j 8 --release #%CARGOFLAGS% - curl -sL --url "https://github.com/ethcore/win-build/raw/master/SimpleFC.dll" -o nsis\SimpleFC.dll @@ -428,7 +428,7 @@ test-rust-stable: script: - export RUST_BACKTRACE=1 - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test"&./test.sh $CARGOFLAGS; else echo "skip rust test"&./js/scripts/lint.sh&./js/scripts/test.sh&./js/scripts/build.sh; fi + - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test" && ./test.sh $CARGOFLAGS; else echo "skip rust test" && ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi tags: - rust - rust-stable @@ -443,7 +443,7 @@ js-test: script: - export RUST_BACKTRACE=1 - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test"; else echo "skip rust test"&./js/scripts/lint.sh&./js/scripts/test.sh&./js/scripts/build.sh; fi + - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test"; else echo "skip rust test" && ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi tags: - rust - rust-stable @@ -489,6 +489,6 @@ js-release: - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js build"; else ./js/scripts/install-deps.sh;fi script: - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js build"; else ./js/scripts/build.sh&&./js/scripts/release.sh; fi + - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js build"; else ./js/scripts/build.sh && ./js/scripts/release.sh; fi tags: - javascript From 07d7a3731958f60644bfbff599c87a7b1108d0a5 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Fri, 9 Dec 2016 01:06:51 +0100 Subject: [PATCH 029/131] les: make peer buffer flow params optional --- ethcore/light/src/net/error.rs | 4 ++ ethcore/light/src/net/mod.rs | 50 ++++++++++++---------- ethcore/light/src/net/status.rs | 66 ++++++++++++++++++++++-------- ethcore/light/src/net/tests/mod.rs | 24 +++++------ 4 files changed, 95 insertions(+), 49 deletions(-) diff --git a/ethcore/light/src/net/error.rs b/ethcore/light/src/net/error.rs index 86dbd54ba..c9ba85a42 100644 --- a/ethcore/light/src/net/error.rs +++ b/ethcore/light/src/net/error.rs @@ -56,6 +56,8 @@ pub enum Error { UnknownPeer, /// Unsolicited response. UnsolicitedResponse, + /// Not a server. + NotServer, } impl Error { @@ -70,6 +72,7 @@ impl Error { Error::WrongNetwork => Punishment::Disable, Error::UnknownPeer => Punishment::Disconnect, Error::UnsolicitedResponse => Punishment::Disable, + Error::NotServer => Punishment::Disable, } } } @@ -97,6 +100,7 @@ impl fmt::Display for Error { Error::WrongNetwork => write!(f, "Wrong network"), Error::UnknownPeer => write!(f, "Unknown peer"), Error::UnsolicitedResponse => write!(f, "Peer provided unsolicited data"), + Error::NotServer => write!(f, "Peer not a server."), } } } \ No newline at end of file diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 0eda7b77c..1eb89a92f 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -116,10 +116,9 @@ struct PendingPeer { // data about each peer. struct Peer { local_buffer: Buffer, // their buffer relative to us - remote_buffer: Buffer, // our buffer relative to them status: Status, capabilities: Capabilities, - remote_flow: FlowParams, + remote_flow: Option<(Buffer, FlowParams)>, sent_head: H256, // last head we've given them. last_update: SteadyTime, } @@ -142,12 +141,6 @@ impl Peer { self.local_buffer.current() } - - // recharge remote buffer with remote flow params. - fn recharge_remote(&mut self) { - let flow = &mut self.remote_flow; - flow.recharge(&mut self.remote_buffer); - } } /// An LES event handler. @@ -250,16 +243,21 @@ impl LightProtocol { /// Check the maximum amount of requests of a specific type /// which a peer would be able to serve. pub fn max_requests(&self, peer: PeerId, kind: request::Kind) -> Option<usize> { - self.peers.read().get(&peer).map(|peer| { + self.peers.read().get(&peer).and_then(|peer| { let mut peer = peer.lock(); - peer.recharge_remote(); - peer.remote_flow.max_amount(&peer.remote_buffer, kind) + match peer.remote_flow.as_mut() { + Some(&mut (ref mut buf, ref flow)) => { + flow.recharge(buf); + Some(flow.max_amount(&*buf, kind)) + } + None => None, + } }) } /// Make a request to a peer. /// - /// Fails on: nonexistent peer, network error, + /// Fails on: nonexistent peer, network error, peer not server, /// insufficient buffer. Does not check capabilities before sending. /// On success, returns a request id which can later be coordinated /// with an event. @@ -268,10 +266,14 @@ impl LightProtocol { let peer = try!(peers.get(peer_id).ok_or_else(|| Error::UnknownPeer)); let mut peer = peer.lock(); - peer.recharge_remote(); - - let max = peer.remote_flow.compute_cost(request.kind(), request.amount()); - try!(peer.remote_buffer.deduct_cost(max)); + match peer.remote_flow.as_mut() { + Some(&mut (ref mut buf, ref flow)) => { + flow.recharge(buf); + let max = flow.compute_cost(request.kind(), request.amount()); + try!(buf.deduct_cost(max)); + } + None => return Err(Error::NotServer), + } let req_id = self.req_id.fetch_add(1, Ordering::SeqCst); let packet_data = encode_request(&request, req_id); @@ -390,8 +392,13 @@ impl LightProtocol { match peers.get(peer) { Some(peer_info) => { let mut peer_info = peer_info.lock(); - let actual_buffer = ::std::cmp::min(cur_buffer, *peer_info.remote_flow.limit()); - peer_info.remote_buffer.update_to(actual_buffer); + match peer_info.remote_flow.as_mut() { + Some(&mut (ref mut buf, ref mut flow)) => { + let actual_buffer = ::std::cmp::min(cur_buffer, *flow.limit()); + buf.update_to(actual_buffer) + } + None => return Err(Error::NotServer), // this really should be impossible. + } Ok(ReqId(req_id)) } None => Err(Error::UnknownPeer), // probably only occurs in a race of some kind. @@ -516,7 +523,7 @@ impl LightProtocol { }; let capabilities = self.capabilities.read().clone(); - let status_packet = status::write_handshake(&status, &capabilities, &self.flow_params); + let status_packet = status::write_handshake(&status, &capabilities, Some(&self.flow_params)); io.send(peer, packet::STATUS, status_packet); @@ -543,12 +550,13 @@ impl LightProtocol { return Err(Error::WrongNetwork); } + let remote_flow = flow_params.map(|params| (params.create_buffer(), params)); + self.peers.write().insert(*peer, Mutex::new(Peer { local_buffer: self.flow_params.create_buffer(), - remote_buffer: flow_params.create_buffer(), status: status.clone(), capabilities: capabilities.clone(), - remote_flow: flow_params, + remote_flow: remote_flow, sent_head: pending.sent_head, last_update: pending.last_update, })); diff --git a/ethcore/light/src/net/status.rs b/ethcore/light/src/net/status.rs index eb80fbe44..59981b88d 100644 --- a/ethcore/light/src/net/status.rs +++ b/ethcore/light/src/net/status.rs @@ -198,7 +198,7 @@ impl Capabilities { /// - chain status /// - serving capabilities /// - buffer flow parameters -pub fn parse_handshake(rlp: UntrustedRlp) -> Result<(Status, Capabilities, FlowParams), DecoderError> { +pub fn parse_handshake(rlp: UntrustedRlp) -> Result<(Status, Capabilities, Option<FlowParams>), DecoderError> { let mut parser = Parser { pos: 0, rlp: rlp, @@ -221,17 +221,20 @@ pub fn parse_handshake(rlp: UntrustedRlp) -> Result<(Status, Capabilities, FlowP tx_relay: parser.expect_raw(Key::TxRelay).is_ok(), }; - let flow_params = FlowParams::new( - try!(parser.expect(Key::BufferLimit)), - try!(parser.expect(Key::BufferCostTable)), - try!(parser.expect(Key::BufferRechargeRate)), - ); + let flow_params = match ( + parser.expect(Key::BufferLimit), + parser.expect(Key::BufferCostTable), + parser.expect(Key::BufferRechargeRate) + ) { + (Ok(bl), Ok(bct), Ok(brr)) => Some(FlowParams::new(bl, bct, brr)), + _ => None, + }; Ok((status, capabilities, flow_params)) } /// Write a handshake, given status, capabilities, and flow parameters. -pub fn write_handshake(status: &Status, capabilities: &Capabilities, flow_params: &FlowParams) -> Vec<u8> { +pub fn write_handshake(status: &Status, capabilities: &Capabilities, flow_params: Option<&FlowParams>) -> Vec<u8> { let mut pairs = Vec::new(); pairs.push(encode_pair(Key::ProtocolVersion, &status.protocol_version)); pairs.push(encode_pair(Key::NetworkId, &(status.network_id as u64))); @@ -253,9 +256,11 @@ pub fn write_handshake(status: &Status, capabilities: &Capabilities, flow_params pairs.push(encode_flag(Key::TxRelay)); } - pairs.push(encode_pair(Key::BufferLimit, flow_params.limit())); - pairs.push(encode_pair(Key::BufferCostTable, flow_params.cost_table())); - pairs.push(encode_pair(Key::BufferRechargeRate, flow_params.recharge_rate())); + if let Some(flow_params) = flow_params { + pairs.push(encode_pair(Key::BufferLimit, flow_params.limit())); + pairs.push(encode_pair(Key::BufferCostTable, flow_params.cost_table())); + pairs.push(encode_pair(Key::BufferRechargeRate, flow_params.recharge_rate())); + } let mut stream = RlpStream::new_list(pairs.len()); @@ -386,14 +391,14 @@ mod tests { 1000.into(), ); - let handshake = write_handshake(&status, &capabilities, &flow_params); + let handshake = write_handshake(&status, &capabilities, Some(&flow_params)); let (read_status, read_capabilities, read_flow) = parse_handshake(UntrustedRlp::new(&handshake)).unwrap(); assert_eq!(read_status, status); assert_eq!(read_capabilities, capabilities); - assert_eq!(read_flow, flow_params); + assert_eq!(read_flow.unwrap(), flow_params); } #[test] @@ -421,14 +426,14 @@ mod tests { 1000.into(), ); - let handshake = write_handshake(&status, &capabilities, &flow_params); + let handshake = write_handshake(&status, &capabilities, Some(&flow_params)); let (read_status, read_capabilities, read_flow) = parse_handshake(UntrustedRlp::new(&handshake)).unwrap(); assert_eq!(read_status, status); assert_eq!(read_capabilities, capabilities); - assert_eq!(read_flow, flow_params); + assert_eq!(read_flow.unwrap(), flow_params); } #[test] @@ -456,7 +461,7 @@ mod tests { 1000.into(), ); - let handshake = write_handshake(&status, &capabilities, &flow_params); + let handshake = write_handshake(&status, &capabilities, Some(&flow_params)); let interleaved = { let handshake = UntrustedRlp::new(&handshake); let mut stream = RlpStream::new_list(handshake.item_count() * 3); @@ -478,7 +483,7 @@ mod tests { assert_eq!(read_status, status); assert_eq!(read_capabilities, capabilities); - assert_eq!(read_flow, flow_params); + assert_eq!(read_flow.unwrap(), flow_params); } #[test] @@ -528,4 +533,33 @@ mod tests { let out = stream.drain(); assert!(parse_announcement(UntrustedRlp::new(&out)).is_ok()); } + + #[test] + fn optional_flow() { + let status = Status { + protocol_version: 1, + network_id: 1, + head_td: U256::default(), + head_hash: H256::default(), + head_num: 10, + genesis_hash: H256::zero(), + last_head: None, + }; + + let capabilities = Capabilities { + serve_headers: true, + serve_chain_since: Some(5), + serve_state_since: Some(8), + tx_relay: true, + }; + + let handshake = write_handshake(&status, &capabilities, None); + + let (read_status, read_capabilities, read_flow) + = parse_handshake(UntrustedRlp::new(&handshake)).unwrap(); + + assert_eq!(read_status, status); + assert_eq!(read_capabilities, capabilities); + assert!(read_flow.is_none()); + } } \ No newline at end of file diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 30ab2bab2..7a159b6a4 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -204,7 +204,7 @@ fn handshake_expected() { let status = status(provider.client.chain_info()); - let packet_body = write_handshake(&status, &capabilities, &flow_params); + let packet_body = write_handshake(&status, &capabilities, Some(&flow_params)); proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); } @@ -220,7 +220,7 @@ fn genesis_mismatch() { let mut status = status(provider.client.chain_info()); status.genesis_hash = H256::default(); - let packet_body = write_handshake(&status, &capabilities, &flow_params); + let packet_body = write_handshake(&status, &capabilities, Some(&flow_params)); proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); } @@ -235,12 +235,12 @@ fn buffer_overflow() { let status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&status, &capabilities, &flow_params); + let packet_body = write_handshake(&status, &capabilities, Some(&flow_params)); proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); } { - let my_status = write_handshake(&status, &capabilities, &flow_params); + let my_status = write_handshake(&status, &capabilities, Some(&flow_params)); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); } @@ -267,14 +267,14 @@ fn get_block_headers() { let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let cur_status = status(provider.client.chain_info()); - let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + let my_status = write_handshake(&cur_status, &capabilities, Some(&flow_params)); provider.client.add_blocks(100, EachBlockWith::Nothing); let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); } @@ -317,14 +317,14 @@ fn get_block_bodies() { let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let cur_status = status(provider.client.chain_info()); - let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + let my_status = write_handshake(&cur_status, &capabilities, Some(&flow_params)); provider.client.add_blocks(100, EachBlockWith::Nothing); let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); } @@ -364,14 +364,14 @@ fn get_block_receipts() { let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let cur_status = status(provider.client.chain_info()); - let my_status = write_handshake(&cur_status, &capabilities, &flow_params); + let my_status = write_handshake(&cur_status, &capabilities, Some(&flow_params)); provider.client.add_blocks(1000, EachBlockWith::Nothing); let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); } @@ -419,7 +419,7 @@ fn get_state_proofs() { let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body.clone())); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &packet_body); } @@ -468,7 +468,7 @@ fn get_contract_code() { let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, &flow_params); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body.clone())); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &packet_body); } From 296301e284d1a827fbee54750803d58480245e74 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 10:55:46 +0100 Subject: [PATCH 030/131] Extend tests for TxList --- js/src/ui/TxList/TxRow/index.js | 17 ++++ js/src/ui/TxList/TxRow/txRow.js | 133 +++++++++++++++++++++++++++ js/src/ui/TxList/TxRow/txRow.spec.js | 51 ++++++++++ js/src/ui/TxList/txList.js | 114 +---------------------- js/src/ui/TxList/txList.spec.js | 52 +++++++++++ 5 files changed, 254 insertions(+), 113 deletions(-) create mode 100644 js/src/ui/TxList/TxRow/index.js create mode 100644 js/src/ui/TxList/TxRow/txRow.js create mode 100644 js/src/ui/TxList/TxRow/txRow.spec.js create mode 100644 js/src/ui/TxList/txList.spec.js diff --git a/js/src/ui/TxList/TxRow/index.js b/js/src/ui/TxList/TxRow/index.js new file mode 100644 index 000000000..90243cd5f --- /dev/null +++ b/js/src/ui/TxList/TxRow/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +export default from './txRow'; diff --git a/js/src/ui/TxList/TxRow/txRow.js b/js/src/ui/TxList/TxRow/txRow.js new file mode 100644 index 000000000..98e948a38 --- /dev/null +++ b/js/src/ui/TxList/TxRow/txRow.js @@ -0,0 +1,133 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import moment from 'moment'; +import React, { Component, PropTypes } from 'react'; + +import { txLink, addressLink } from '~/3rdparty/etherscan/links'; + +import IdentityIcon from '../../IdentityIcon'; +import IdentityName from '../../IdentityName'; +import MethodDecoding from '../../MethodDecoding'; + +import styles from '../txList.css'; + +export default class TxRow extends Component { + static contextTypes = { + api: PropTypes.object.isRequired + }; + + static propTypes = { + tx: PropTypes.object.isRequired, + address: PropTypes.string.isRequired, + isTest: PropTypes.bool.isRequired, + + block: PropTypes.object, + historic: PropTypes.bool, + className: PropTypes.string + }; + + static defaultProps = { + historic: true + }; + + render () { + const { tx, address, isTest, historic, className } = this.props; + + return ( + <tr className={ className || '' }> + { this.renderBlockNumber(tx.blockNumber) } + { this.renderAddress(tx.from) } + <td className={ styles.transaction }> + { this.renderEtherValue(tx.value) } + <div>⇒</div> + <div> + <a + className={ styles.link } + href={ txLink(tx.hash, isTest) } + target='_blank'> + { `${tx.hash.substr(2, 6)}...${tx.hash.slice(-6)}` } + </a> + </div> + </td> + { this.renderAddress(tx.to) } + <td className={ styles.method }> + <MethodDecoding + historic={ historic } + address={ address } + transaction={ tx } /> + </td> + </tr> + ); + } + + renderAddress (address) { + const { isTest } = this.props; + + let esLink = null; + if (address) { + esLink = ( + <a + href={ addressLink(address, isTest) } + target='_blank' + className={ styles.link }> + <IdentityName address={ address } shorten /> + </a> + ); + } + + return ( + <td className={ styles.address }> + <div className={ styles.center }> + <IdentityIcon + center + className={ styles.icon } + address={ address } /> + </div> + <div className={ styles.center }> + { esLink || 'DEPLOY' } + </div> + </td> + ); + } + + renderEtherValue (_value) { + const { api } = this.context; + const value = api.util.fromWei(_value); + + if (value.eq(0)) { + return <div className={ styles.value }>{ ' ' }</div>; + } + + return ( + <div className={ styles.value }> + { value.toFormat(5) }<small>ETH</small> + </div> + ); + } + + renderBlockNumber (_blockNumber) { + const { block } = this.props; + const blockNumber = _blockNumber.toNumber(); + + return ( + <td className={ styles.timestamp }> + <div>{ blockNumber && block ? moment(block.timestamp).fromNow() : null }</div> + <div>{ blockNumber ? _blockNumber.toFormat() : 'Pending' }</div> + </td> + ); + } +} diff --git a/js/src/ui/TxList/TxRow/txRow.spec.js b/js/src/ui/TxList/TxRow/txRow.spec.js new file mode 100644 index 000000000..64baa2fe7 --- /dev/null +++ b/js/src/ui/TxList/TxRow/txRow.spec.js @@ -0,0 +1,51 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import BigNumber from 'bignumber.js'; +import React from 'react'; +import { shallow } from 'enzyme'; +import sinon from 'sinon'; + +import Api from '~/api'; + +import TxRow from './txRow'; + +const api = new Api({ execute: sinon.stub() }); + +function renderShallow (props) { + return shallow( + <TxRow + { ...props } />, + { context: { api } } + ); +} + +describe('ui/TxRow', () => { + describe('rendering', () => { + it('renders defaults', () => { + const block = { + timestamp: new Date() + }; + const tx = { + blockNumber: new BigNumber(123), + hash: '0x123456789abcdef0123456789abcdef0123456789abcdef', + value: new BigNumber(1) + }; + + expect(renderShallow({ block, tx })).to.be.ok; + }); + }); +}); diff --git a/js/src/ui/TxList/txList.js b/js/src/ui/TxList/txList.js index b8c53c1d9..45face696 100644 --- a/js/src/ui/TxList/txList.js +++ b/js/src/ui/TxList/txList.js @@ -14,128 +14,16 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import moment from 'moment'; import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { observer } from 'mobx-react'; -import { txLink, addressLink } from '../../3rdparty/etherscan/links'; - -import IdentityIcon from '../IdentityIcon'; -import IdentityName from '../IdentityName'; -import MethodDecoding from '../MethodDecoding'; import Store from './store'; +import TxRow from './TxRow'; import styles from './txList.css'; -export class TxRow extends Component { - static contextTypes = { - api: PropTypes.object.isRequired - }; - - static propTypes = { - tx: PropTypes.object.isRequired, - address: PropTypes.string.isRequired, - isTest: PropTypes.bool.isRequired, - - block: PropTypes.object, - historic: PropTypes.bool, - className: PropTypes.string - }; - - static defaultProps = { - historic: true - }; - - render () { - const { tx, address, isTest, historic, className } = this.props; - - return ( - <tr className={ className || '' }> - { this.renderBlockNumber(tx.blockNumber) } - { this.renderAddress(tx.from) } - <td className={ styles.transaction }> - { this.renderEtherValue(tx.value) } - <div>⇒</div> - <div> - <a - className={ styles.link } - href={ txLink(tx.hash, isTest) } - target='_blank'> - { `${tx.hash.substr(2, 6)}...${tx.hash.slice(-6)}` } - </a> - </div> - </td> - { this.renderAddress(tx.to) } - <td className={ styles.method }> - <MethodDecoding - historic={ historic } - address={ address } - transaction={ tx } /> - </td> - </tr> - ); - } - - renderAddress (address) { - const { isTest } = this.props; - - let esLink = null; - if (address) { - esLink = ( - <a - href={ addressLink(address, isTest) } - target='_blank' - className={ styles.link }> - <IdentityName address={ address } shorten /> - </a> - ); - } - - return ( - <td className={ styles.address }> - <div className={ styles.center }> - <IdentityIcon - center - className={ styles.icon } - address={ address } /> - </div> - <div className={ styles.center }> - { esLink || 'DEPLOY' } - </div> - </td> - ); - } - - renderEtherValue (_value) { - const { api } = this.context; - const value = api.util.fromWei(_value); - - if (value.eq(0)) { - return <div className={ styles.value }>{ ' ' }</div>; - } - - return ( - <div className={ styles.value }> - { value.toFormat(5) }<small>ETH</small> - </div> - ); - } - - renderBlockNumber (_blockNumber) { - const { block } = this.props; - const blockNumber = _blockNumber.toNumber(); - - return ( - <td className={ styles.timestamp }> - <div>{ blockNumber && block ? moment(block.timestamp).fromNow() : null }</div> - <div>{ blockNumber ? _blockNumber.toFormat() : 'Pending' }</div> - </td> - ); - } -} - @observer class TxList extends Component { static contextTypes = { diff --git a/js/src/ui/TxList/txList.spec.js b/js/src/ui/TxList/txList.spec.js new file mode 100644 index 000000000..dcaf5fb78 --- /dev/null +++ b/js/src/ui/TxList/txList.spec.js @@ -0,0 +1,52 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React from 'react'; +import { shallow } from 'enzyme'; +import sinon from 'sinon'; + +import Api from '~/api'; + +import TxList from './txList'; + +const api = new Api({ execute: sinon.stub() }); + +const STORE = { + getState: () => { + return { + nodeStatus: { + isTest: true + } + }; + } +}; + +function renderShallow (props) { + return shallow( + <TxList + store={ STORE } + { ...props } />, + { context: { api } } + ); +} + +describe('ui/TxList', () => { + describe('rendering', () => { + it('renders defaults', () => { + expect(renderShallow()).to.be.ok; + }); + }); +}); From 22a63f6fd391a31ddc263d51bc0be5578b6288dc Mon Sep 17 00:00:00 2001 From: arkpar <arkady.paronyan@gmail.com> Date: Fri, 9 Dec 2016 11:45:16 +0100 Subject: [PATCH 031/131] Added IO Service explicit stop --- util/io/src/service.rs | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/util/io/src/service.rs b/util/io/src/service.rs index 5d773f525..d7bba5b4d 100644 --- a/util/io/src/service.rs +++ b/util/io/src/service.rs @@ -430,6 +430,20 @@ impl<Message> IoService<Message> where Message: Send + Sync + Clone + 'static { }) } + pub fn stop(&mut self) { + trace!(target: "shutdown", "[IoService] Closing..."); + // Clear handlers so that shared pointers are not stuck on stack + // in Channel::send_sync + self.handlers.write().clear(); + self.host_channel.lock().send(IoMessage::Shutdown).unwrap_or_else(|e| warn!("Error on IO service shutdown: {:?}", e)); + if let Some(thread) = self.thread.take() { + thread.join().unwrap_or_else(|e| { + debug!(target: "shutdown", "Error joining IO service event loop thread: {:?}", e); + }); + } + trace!(target: "shutdown", "[IoService] Closed."); + } + /// Regiter an IO handler with the event loop. pub fn register_handler(&self, handler: Arc<IoHandler<Message>+Send>) -> Result<(), IoError> { try!(self.host_channel.lock().send(IoMessage::AddHandler { @@ -452,17 +466,7 @@ impl<Message> IoService<Message> where Message: Send + Sync + Clone + 'static { impl<Message> Drop for IoService<Message> where Message: Send + Sync + Clone { fn drop(&mut self) { - trace!(target: "shutdown", "[IoService] Closing..."); - // Clear handlers so that shared pointers are not stuck on stack - // in Channel::send_sync - self.handlers.write().clear(); - self.host_channel.lock().send(IoMessage::Shutdown).unwrap_or_else(|e| warn!("Error on IO service shutdown: {:?}", e)); - if let Some(thread) = self.thread.take() { - thread.join().unwrap_or_else(|e| { - debug!(target: "shutdown", "Error joining IO service event loop thread: {:?}", e); - }); - } - trace!(target: "shutdown", "[IoService] Closed."); + self.stop() } } From 1f4c84cbf1a58cef3daf62151a54e580bf7a3361 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 13:03:46 +0100 Subject: [PATCH 032/131] Theme tests --- js/src/ui/Theme/theme.spec.js | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 js/src/ui/Theme/theme.spec.js diff --git a/js/src/ui/Theme/theme.spec.js b/js/src/ui/Theme/theme.spec.js new file mode 100644 index 000000000..9d2aa1bd8 --- /dev/null +++ b/js/src/ui/Theme/theme.spec.js @@ -0,0 +1,55 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import getMuiTheme from 'material-ui/styles/getMuiTheme'; +import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme'; + +const muiTheme = getMuiTheme(lightBaseTheme); + +import theme from './theme'; + +describe('ui/Theme', () => { + it('is MUI-based', () => { + expect(Object.keys(theme)).to.deep.equal(Object.keys(muiTheme).concat('parity')); + }); + + it('allows setting of Parity backgrounds', () => { + expect(typeof theme.parity.setBackgroundSeed === 'function').to.be.true; + expect(typeof theme.parity.getBackgroundStyle === 'function').to.be.true; + }); + + describe('parity', () => { + describe('setBackgroundSeed', () => { + const SEED = 'testseed'; + + beforeEach(() => { + theme.parity.setBackgroundSeed(SEED); + }); + + it('sets the correct theme values', () => { + expect(theme.parity.backgroundSeed).to.equal(SEED); + }); + }); + + describe('getBackgroundStyle', () => { + it('generates a style containing background', () => { + const style = theme.parity.getBackgroundStyle(); + + expect(style).to.have.property('background'); + }); + }); + }); +}); From 364dd9dda4b7d3c880323e593795a610612ba2ca Mon Sep 17 00:00:00 2001 From: arkpar <arkady.paronyan@gmail.com> Date: Fri, 9 Dec 2016 13:25:02 +0100 Subject: [PATCH 033/131] Make stop const --- util/io/src/service.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/io/src/service.rs b/util/io/src/service.rs index d7bba5b4d..6086acadd 100644 --- a/util/io/src/service.rs +++ b/util/io/src/service.rs @@ -394,7 +394,7 @@ impl<Message> IoChannel<Message> where Message: Send + Clone + Sync + 'static { /// 'Message' is a notification message type pub struct IoService<Message> where Message: Send + Sync + Clone + 'static { panic_handler: Arc<PanicHandler>, - thread: Option<JoinHandle<()>>, + thread: Mutex<Option<JoinHandle<()>>>, host_channel: Mutex<Sender<IoMessage<Message>>>, handlers: Arc<RwLock<Slab<Arc<IoHandler<Message>>, HandlerId>>>, } @@ -424,19 +424,19 @@ impl<Message> IoService<Message> where Message: Send + Sync + Clone + 'static { }); Ok(IoService { panic_handler: panic_handler, - thread: Some(thread), + thread: Mutex::new(Some(thread)), host_channel: Mutex::new(channel), handlers: handlers, }) } - pub fn stop(&mut self) { + pub fn stop(&self) { trace!(target: "shutdown", "[IoService] Closing..."); // Clear handlers so that shared pointers are not stuck on stack // in Channel::send_sync self.handlers.write().clear(); self.host_channel.lock().send(IoMessage::Shutdown).unwrap_or_else(|e| warn!("Error on IO service shutdown: {:?}", e)); - if let Some(thread) = self.thread.take() { + if let Some(thread) = self.thread.lock().take() { thread.join().unwrap_or_else(|e| { debug!(target: "shutdown", "Error joining IO service event loop thread: {:?}", e); }); From bb209424ac5f00b30ed6202f2090c3ced55250fa Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 13:36:46 +0100 Subject: [PATCH 034/131] IdentityName flags testing --- js/src/ui/IdentityName/identityName.spec.js | 76 +++++++++++++++++++++ js/src/ui/TxList/txList.spec.js | 2 + 2 files changed, 78 insertions(+) create mode 100644 js/src/ui/IdentityName/identityName.spec.js diff --git a/js/src/ui/IdentityName/identityName.spec.js b/js/src/ui/IdentityName/identityName.spec.js new file mode 100644 index 000000000..554a5be0a --- /dev/null +++ b/js/src/ui/IdentityName/identityName.spec.js @@ -0,0 +1,76 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React from 'react'; +import { mount } from 'enzyme'; +import sinon from 'sinon'; + +import IdentityName from './identityName'; + +const ADDR_A = '0x123456789abcdef0123456789A'; +const ADDR_B = '0x123456789abcdef0123456789B'; +const ADDR_C = '0x123456789abcdef0123456789C'; +const STORE = { + dispatch: sinon.stub(), + subscribe: sinon.stub(), + getState: () => { + return { + balances: { + tokens: {} + }, + personal: { + accountsInfo: { + [ADDR_A]: { name: 'testing' }, + [ADDR_B]: {} + } + } + }; + } +}; + +function render (props) { + return mount( + <IdentityName + store={ STORE } + { ...props } /> + ); +} + +describe('ui/IdentityName', () => { + describe('rendering', () => { + it('renders defaults', () => { + expect(render()).to.be.ok; + }); + + describe('account not found', () => { + it('renders null with empty', () => { + expect(render({ address: ADDR_C, empty: true }).html()).to.be.null; + }); + + it('renders address without empty', () => { + expect(render({ address: ADDR_C }).text()).to.equal(ADDR_C); + }); + + it('renders short address with shorten', () => { + expect(render({ address: ADDR_C, shorten: true }).text()).to.equal('123456…56789c'); + }); + + it('renders unknown with flag', () => { + expect(render({ address: ADDR_C, unknown: true }).text()).to.equal('UNNAMED'); + }); + }); + }); +}); diff --git a/js/src/ui/TxList/txList.spec.js b/js/src/ui/TxList/txList.spec.js index dcaf5fb78..3f773980f 100644 --- a/js/src/ui/TxList/txList.spec.js +++ b/js/src/ui/TxList/txList.spec.js @@ -25,6 +25,8 @@ import TxList from './txList'; const api = new Api({ execute: sinon.stub() }); const STORE = { + dispatch: sinon.stub(), + subscribe: sinon.stub(), getState: () => { return { nodeStatus: { From cc8c2ea58d64aab71c28c695390fda384ad4cd13 Mon Sep 17 00:00:00 2001 From: arkpar <arkady.paronyan@gmail.com> Date: Wed, 7 Dec 2016 23:13:53 +0100 Subject: [PATCH 035/131] Reject existing tx --- ethcore/src/client/client.rs | 4 ++++ ethcore/src/client/test_client.rs | 4 ++++ ethcore/src/client/traits.rs | 3 +++ ethcore/src/miner/miner.rs | 15 ++++++++++++--- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 21c5a2366..dcdadd3d1 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1060,6 +1060,10 @@ impl BlockChainClient for Client { self.transaction_address(id).and_then(|address| self.chain.read().transaction(&address)) } + fn transaction_block(&self, id: TransactionID) -> Option<H256> { + self.transaction_address(id).map(|addr| addr.block_hash) + } + fn uncle(&self, id: UncleID) -> Option<Bytes> { let index = id.position; self.block_body(id.block).and_then(|body| BodyView::new(&body).uncle_rlp_at(index)) diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index dd00db7ec..cce102622 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -432,6 +432,10 @@ impl BlockChainClient for TestBlockChainClient { None // Simple default. } + fn transaction_block(&self, _id: TransactionID) -> Option<H256> { + None // Simple default. + } + fn uncle(&self, _id: UncleID) -> Option<Bytes> { None // Simple default. } diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 7bf17279c..e23a564d4 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -129,6 +129,9 @@ pub trait BlockChainClient : Sync + Send { /// Get transaction with given hash. fn transaction(&self, id: TransactionID) -> Option<LocalizedTransaction>; + /// Get the hash of block that contains the transaction, if any. + fn transaction_block(&self, id: TransactionID) -> Option<H256>; + /// Get uncle with given id. fn uncle(&self, id: UncleID) -> Option<Bytes>; diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 8d1f55567..b171856b9 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -23,7 +23,7 @@ use account_provider::{AccountProvider, Error as AccountError}; use views::{BlockView, HeaderView}; use header::Header; use state::{State, CleanupMode}; -use client::{MiningBlockChainClient, Executive, Executed, EnvInfo, TransactOptions, BlockID, CallAnalytics}; +use client::{MiningBlockChainClient, Executive, Executed, EnvInfo, TransactOptions, BlockID, CallAnalytics, TransactionID}; use client::TransactionImportResult; use executive::contract_address; use block::{ClosedBlock, SealedBlock, IsBlock, Block}; @@ -357,6 +357,8 @@ impl Miner { let block_number = open_block.block().fields().header.number(); // TODO Push new uncles too. + let mut tx_count: usize = 0; + let tx_total = transactions.len(); for tx in transactions { let hash = tx.hash(); let start = Instant::now(); @@ -378,7 +380,7 @@ impl Miner { }, _ => {}, } - + trace!(target: "miner", "Adding tx {:?} took {:?}", hash, took); match result { Err(Error::Execution(ExecutionError::BlockGasLimitReached { gas_limit, gas_used, gas })) => { debug!(target: "miner", "Skipping adding transaction to block because of gas limit: {:?} (limit: {:?}, used: {:?}, gas: {:?})", hash, gas_limit, gas_used, gas); @@ -407,9 +409,12 @@ impl Miner { "Error adding transaction to block: number={}. transaction_hash={:?}, Error: {:?}", block_number, hash, e); }, - _ => {} // imported ok + _ => { + tx_count += 1; + } // imported ok } } + trace!(target: "miner", "Pushed {}/{} transactions", tx_count, tx_total); let block = open_block.close(); @@ -580,6 +585,10 @@ impl Miner { let best_block_header: Header = ::rlp::decode(&chain.best_block_header()); transactions.into_iter() .map(|tx| { + if chain.transaction_block(TransactionID::Hash(tx.hash())).is_some() { + debug!(target: "miner", "Rejected tx {:?}: already in the blockchain", tx.hash()); + return Err(Error::Transaction(TransactionError::AlreadyImported)); + } match self.engine.verify_transaction_basic(&tx, &best_block_header) { Err(e) => { debug!(target: "miner", "Rejected tx {:?} with invalid signature: {:?}", tx.hash(), e); From 5f37c936595426b367a6f04dbb38c1f3593b8244 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Fri, 9 Dec 2016 15:04:54 +0100 Subject: [PATCH 036/131] les: use negotiated protocol version --- ethcore/light/src/net/context.rs | 7 +++++++ ethcore/light/src/net/error.rs | 8 ++++++++ ethcore/light/src/net/mod.rs | 22 +++++++++++++++++----- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ethcore/light/src/net/context.rs b/ethcore/light/src/net/context.rs index f2d5ab907..c05e69b0f 100644 --- a/ethcore/light/src/net/context.rs +++ b/ethcore/light/src/net/context.rs @@ -38,6 +38,9 @@ pub trait IoContext { /// Disable a peer -- this is a disconnect + a time-out. fn disable_peer(&self, peer: PeerId); + + /// Get a peer's protocol version. + fn protocol_version(&self, peer: PeerId) -> Option<u8>; } impl<'a> IoContext for NetworkContext<'a> { @@ -60,6 +63,10 @@ impl<'a> IoContext for NetworkContext<'a> { fn disable_peer(&self, peer: PeerId) { NetworkContext::disable_peer(self, peer); } + + fn protocol_version(&self, peer: PeerId) -> Option<u8> { + self.protocol_version(self.subprotocol_name(), peer) + } } /// Context for a protocol event. diff --git a/ethcore/light/src/net/error.rs b/ethcore/light/src/net/error.rs index c9ba85a42..01a15928b 100644 --- a/ethcore/light/src/net/error.rs +++ b/ethcore/light/src/net/error.rs @@ -58,6 +58,10 @@ pub enum Error { UnsolicitedResponse, /// Not a server. NotServer, + /// Unsupported protocol version. + UnsupportedProtocolVersion(u8), + /// Bad protocol version. + BadProtocolVersion, } impl Error { @@ -73,6 +77,8 @@ impl Error { Error::UnknownPeer => Punishment::Disconnect, Error::UnsolicitedResponse => Punishment::Disable, Error::NotServer => Punishment::Disable, + Error::UnsupportedProtocolVersion(_) => Punishment::Disable, + Error::BadProtocolVersion => Punishment::Disable, } } } @@ -101,6 +107,8 @@ impl fmt::Display for Error { Error::UnknownPeer => write!(f, "Unknown peer"), Error::UnsolicitedResponse => write!(f, "Peer provided unsolicited data"), Error::NotServer => write!(f, "Peer not a server."), + Error::UnsupportedProtocolVersion(pv) => write!(f, "Unsupported protocol version: {}", pv), + Error::BadProtocolVersion => write!(f, "Bad protocol version in handshake"), } } } \ No newline at end of file diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 1eb89a92f..481740a48 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -23,7 +23,7 @@ use ethcore::transaction::SignedTransaction; use ethcore::receipt::Receipt; use io::TimerToken; -use network::{NetworkProtocolHandler, NetworkContext, NetworkError, PeerId}; +use network::{NetworkProtocolHandler, NetworkContext, PeerId}; use rlp::{RlpStream, Stream, UntrustedRlp, View}; use util::hash::H256; use util::{Bytes, Mutex, RwLock, U256}; @@ -111,6 +111,7 @@ pub struct ReqId(usize); struct PendingPeer { sent_head: H256, last_update: SteadyTime, + proto_version: u8, } // data about each peer. @@ -121,6 +122,7 @@ struct Peer { remote_flow: Option<(Buffer, FlowParams)>, sent_head: H256, // last head we've given them. last_update: SteadyTime, + proto_version: u8, } impl Peer { @@ -507,17 +509,21 @@ impl LightProtocol { } // send status to a peer. - fn send_status(&self, peer: PeerId, io: &IoContext) -> Result<PendingPeer, NetworkError> { - let chain_info = self.provider.chain_info(); + fn send_status(&self, peer: PeerId, io: &IoContext) -> Result<PendingPeer, Error> { + let proto_version = try!(io.protocol_version(peer).ok_or(Error::WrongNetwork)); - // TODO: could update capabilities here. + if PROTOCOL_VERSIONS.iter().find(|x| **x == proto_version).is_none() { + return Err(Error::UnsupportedProtocolVersion(proto_version)); + } + + let chain_info = self.provider.chain_info(); let status = Status { head_td: chain_info.total_difficulty, head_hash: chain_info.best_block_hash, head_num: chain_info.best_block_number, genesis_hash: chain_info.genesis_hash, - protocol_version: MAX_PROTOCOL_VERSION as u32, + protocol_version: proto_version as u32, // match peer proto version network_id: self.network_id, last_head: None, }; @@ -530,6 +536,7 @@ impl LightProtocol { Ok(PendingPeer { sent_head: chain_info.best_block_hash, last_update: SteadyTime::now(), + proto_version: proto_version, }) } @@ -550,6 +557,10 @@ impl LightProtocol { return Err(Error::WrongNetwork); } + if Some(status.protocol_version as u8) != io.protocol_version(*peer) { + return Err(Error::BadProtocolVersion); + } + let remote_flow = flow_params.map(|params| (params.create_buffer(), params)); self.peers.write().insert(*peer, Mutex::new(Peer { @@ -559,6 +570,7 @@ impl LightProtocol { remote_flow: remote_flow, sent_head: pending.sent_head, last_update: pending.last_update, + proto_version: pending.proto_version, })); for handler in &self.handlers { From 5d054f08c33df9ec6d17664f3529cc06758ab625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Fri, 9 Dec 2016 15:05:03 +0100 Subject: [PATCH 037/131] Clearing old transactions --- ethcore/src/miner/transaction_queue.rs | 41 +++++++++++++++++++++++++- util/table/src/lib.rs | 6 ++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index cd2d3ba47..84981b893 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -81,6 +81,8 @@ //! 3. `remove_all` is used to inform the queue about client (state) nonce changes. //! - It removes all transactions (either from `current` or `future`) with nonce < client nonce //! - It moves matching `future` transactions to `current` +//! 4. `remove_old` is used periodically to clear the transactions if node goes out of sync +//! (in such case `remove_all` is not invoked because we are syncing the chain) use std::ops::Deref; use std::cmp::Ordering; @@ -765,6 +767,20 @@ impl TransactionQueue { assert_eq!(self.future.by_priority.len() + self.current.by_priority.len(), self.by_hash.len()); } + /// Checks the current nonce for all transactions' senders in the queue and removes the old transactions. + pub fn remove_old<F>(&mut self, fetch_account: &F) where + F: Fn(&Address) -> AccountDetails, + { + let senders = self.current.by_address + .keys() + .map(|key| (*key, fetch_account(key).nonce)) + .collect::<Vec<_>>(); + + for (sender, nonce) in senders { + self.remove_all(sender, nonce); + } + } + /// Penalize transactions from sender of transaction with given hash. /// I.e. it should change the priority of the transaction in the queue. /// @@ -2438,7 +2454,7 @@ mod test { } #[test] - fn should_reject_transactions_below_bas_gas() { + fn should_reject_transactions_below_base_gas() { // given let mut txq = TransactionQueue::default(); let (tx1, tx2) = new_tx_pair_default(1.into(), 0.into()); @@ -2457,4 +2473,27 @@ mod test { } + #[test] + fn should_clear_all_old_transactions() { + // given + let mut txq = TransactionQueue::default(); + let (tx1, tx2) = new_tx_pair_default(1.into(), 0.into()); + let (tx3, tx4) = new_tx_pair_default(1.into(), 0.into()); + let nonce1 = tx1.nonce; + let new_details = |_a: &Address| AccountDetails { nonce: nonce1 + U256::one(), balance: !U256::zero() }; + + // Insert all transactions + txq.add(tx1, TransactionOrigin::External, &default_account_details, &gas_estimator).unwrap(); + txq.add(tx2, TransactionOrigin::External, &default_account_details, &gas_estimator).unwrap(); + txq.add(tx3, TransactionOrigin::External, &default_account_details, &gas_estimator).unwrap(); + txq.add(tx4, TransactionOrigin::External, &default_account_details, &gas_estimator).unwrap(); + assert_eq!(txq.top_transactions().len(), 4); + + // when + txq.remove_old(&new_details); + + // then + assert_eq!(txq.top_transactions().len(), 2); + } + } diff --git a/util/table/src/lib.rs b/util/table/src/lib.rs index a13beab11..f65c1e171 100644 --- a/util/table/src/lib.rs +++ b/util/table/src/lib.rs @@ -18,6 +18,7 @@ use std::hash::Hash; use std::collections::HashMap; +use std::collections::hash_map::Keys; /// Structure to hold double-indexed values /// @@ -41,6 +42,11 @@ impl<Row, Col, Val> Table<Row, Col, Val> } } + /// Returns keys iterator for this Table. + pub fn keys(&self) -> Keys<Row, HashMap<Col, Val>> { + self.map.keys() + } + /// Removes all elements from this Table pub fn clear(&mut self) { self.map.clear(); From 415fccfffbe391a00ee5561623a47ace745dc553 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Fri, 9 Dec 2016 15:20:45 +0100 Subject: [PATCH 038/131] add ethcore-light cov target --- ethcore/light/src/net/tests/mod.rs | 4 ++++ scripts/targets.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 7a159b6a4..6e2bc9f33 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -64,6 +64,10 @@ impl IoContext for Expect { fn disable_peer(&self, peer: PeerId) { assert_eq!(self, &Expect::Punish(peer)); } + + fn protocol_version(&self, _peer: PeerId) -> Option<u8> { + Some(super::MAX_PROTOCOL_VERSION) + } } // can't implement directly for Arc due to cross-crate orphan rules. diff --git a/scripts/targets.sh b/scripts/targets.sh index 529937c23..505875336 100644 --- a/scripts/targets.sh +++ b/scripts/targets.sh @@ -17,4 +17,5 @@ export TARGETS=" -p ethcore-ipc \ -p ethcore-ipc-tests \ -p ethcore-ipc-nano \ + -p ethcore-light \ -p parity" From d2494d14255cdd431471e84d46fbccc28e10f057 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 15:43:24 +0100 Subject: [PATCH 039/131] GasPrice selection for contract execution --- .../DetailsStep/detailsStep.js | 35 +++- .../ExecuteContract/executeContract.css | 12 ++ .../modals/ExecuteContract/executeContract.js | 154 ++++++++++++------ js/src/modals/Transfer/Extras/extras.js | 11 +- js/src/modals/Transfer/store.js | 2 + js/src/ui/GasPriceEditor/gasPriceEditor.js | 18 +- js/src/ui/GasPriceEditor/store.js | 20 ++- 7 files changed, 184 insertions(+), 68 deletions(-) diff --git a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js index b4488729a..3ffb929a9 100644 --- a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js +++ b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js @@ -15,13 +15,19 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; -import { MenuItem } from 'material-ui'; +import { Checkbox, MenuItem } from 'material-ui'; import { AddressSelect, Form, Input, Select, TypedInput } from '~/ui'; import { parseAbiType } from '~/util/abi'; import styles from '../executeContract.css'; +const CHECK_STYLE = { + position: 'absolute', + top: '38px', + left: '1em' +}; + export default class DetailsStep extends Component { static propTypes = { accounts: PropTypes.object.isRequired, @@ -31,10 +37,12 @@ export default class DetailsStep extends Component { onAmountChange: PropTypes.func.isRequired, fromAddress: PropTypes.string, fromAddressError: PropTypes.string, + gasEdit: PropTypes.bool, onFromAddressChange: PropTypes.func.isRequired, func: PropTypes.object, funcError: PropTypes.string, onFuncChange: PropTypes.func, + onGasEditClick: PropTypes.func, values: PropTypes.array.isRequired, valuesError: PropTypes.array.isRequired, warning: PropTypes.string, @@ -42,7 +50,7 @@ export default class DetailsStep extends Component { } render () { - const { accounts, amount, amountError, fromAddress, fromAddressError, onFromAddressChange, onAmountChange } = this.props; + const { accounts, amount, amountError, fromAddress, fromAddressError, gasEdit, onGasEditClick, onFromAddressChange, onAmountChange } = this.props; return ( <Form> @@ -56,12 +64,23 @@ export default class DetailsStep extends Component { onChange={ onFromAddressChange } /> { this.renderFunctionSelect() } { this.renderParameters() } - <Input - label='transaction value (in ETH)' - hint='the amount to send to with the transaction' - value={ amount } - error={ amountError } - onSubmit={ onAmountChange } /> + <div className={ styles.columns }> + <div> + <Input + label='transaction value (in ETH)' + hint='the amount to send to with the transaction' + value={ amount } + error={ amountError } + onSubmit={ onAmountChange } /> + </div> + <div> + <Checkbox + checked={ gasEdit } + label='edit gas price or value' + onCheck={ onGasEditClick } + style={ CHECK_STYLE } /> + </div> + </div> </Form> ); } diff --git a/js/src/modals/ExecuteContract/executeContract.css b/js/src/modals/ExecuteContract/executeContract.css index a83b373ee..6b7132912 100644 --- a/js/src/modals/ExecuteContract/executeContract.css +++ b/js/src/modals/ExecuteContract/executeContract.css @@ -42,3 +42,15 @@ padding: 0.75em; text-align: center; } + +.columns { + display: flex; + flex-wrap: wrap; + position: relative; + + &>div { + flex: 0 1 50%; + width: 50%; + position: relative; + } +} diff --git a/js/src/modals/ExecuteContract/executeContract.js b/js/src/modals/ExecuteContract/executeContract.js index 2db5e2b04..3f7940ca3 100644 --- a/js/src/modals/ExecuteContract/executeContract.js +++ b/js/src/modals/ExecuteContract/executeContract.js @@ -17,19 +17,36 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; +import { observer } from 'mobx-react'; import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import ContentClear from 'material-ui/svg-icons/content/clear'; +import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; +import NavigationArrowForward from 'material-ui/svg-icons/navigation/arrow-forward'; -import { BusyStep, CompletedStep, Button, IdentityIcon, Modal, TxHash } from '~/ui'; +import { BusyStep, Button, CompletedStep, GasPriceEditor, IdentityIcon, Modal, TxHash } from '~/ui'; import { MAX_GAS_ESTIMATION } from '~/util/constants'; import { validateAddress, validateUint } from '~/util/validation'; import { parseAbiType } from '~/util/abi'; import DetailsStep from './DetailsStep'; -import ERRORS from '../Transfer/errors'; import { ERROR_CODES } from '~/api/transport/error'; +const STEP_DETAILS = 0; +const STEP_BUSY_OR_GAS = 1; +const STEP_BUSY = 2; + +const TITLES = { + transfer: 'function details', + sending: 'sending', + complete: 'complete', + gas: 'gas selection', + rejected: 'rejected' +}; +const STAGES_BASIC = [TITLES.transfer, TITLES.sending, TITLES.complete]; +const STAGES_GAS = [TITLES.transfer, TITLES.gas, TITLES.sending, TITLES.complete]; + +@observer class ExecuteContract extends Component { static contextTypes = { api: PropTypes.object.isRequired, @@ -46,21 +63,22 @@ class ExecuteContract extends Component { onFromAddressChange: PropTypes.func.isRequired } + gasStore = new GasPriceEditor.Store(this.context.api, this.props.gasLimit); + state = { amount: '0', amountError: null, + busyState: null, fromAddressError: null, func: null, funcError: null, - gas: null, - gasLimitError: null, + gasEdit: false, + rejected: false, + step: STEP_DETAILS, + sending: false, values: [], valuesError: [], - step: 0, - sending: false, - busyState: null, - txhash: null, - rejected: false + txhash: null } componentDidMount () { @@ -79,15 +97,21 @@ class ExecuteContract extends Component { } render () { - const { sending } = this.state; + const { sending, step, gasEdit, rejected } = this.state; + const steps = gasEdit ? STAGES_GAS : STAGES_BASIC; + + if (rejected) { + steps[steps.length - 1] = TITLES.rejected; + } return ( <Modal actions={ this.renderDialogActions() } - title='execute function' busy={ sending } - waiting={ [1] } - visible> + current={ step } + steps={ steps } + visible + waiting={ gasEdit ? [STEP_BUSY] : [STEP_BUSY_OR_GAS] }> { this.renderStep() } </Modal> ); @@ -95,7 +119,7 @@ class ExecuteContract extends Component { renderDialogActions () { const { onClose, fromAddress } = this.props; - const { sending, step, fromAddressError, valuesError } = this.state; + const { gasEdit, sending, step, fromAddressError, valuesError } = this.state; const hasError = fromAddressError || valuesError.find((error) => error); const cancelBtn = ( @@ -105,21 +129,44 @@ class ExecuteContract extends Component { icon={ <ContentClear /> } onClick={ onClose } /> ); + const postBtn = ( + <Button + key='postTransaction' + label='post transaction' + disabled={ !!(sending || hasError) } + icon={ <IdentityIcon address={ fromAddress } button /> } + onClick={ this.postTransaction } /> + ); + const nextBtn = ( + <Button + key='nextStep' + label='next' + icon={ <NavigationArrowForward /> } + onClick={ this.onNextClick } /> + ); + const prevBtn = ( + <Button + key='prevStep' + label='prev' + icon={ <NavigationArrowBack /> } + onClick={ this.onPrevClick } /> + ); - if (step === 0) { + if (step === STEP_DETAILS) { return [ cancelBtn, - <Button - key='postTransaction' - label='post transaction' - disabled={ !!(sending || hasError) } - icon={ <IdentityIcon address={ fromAddress } button /> } - onClick={ this.postTransaction } /> + gasEdit ? nextBtn : postBtn ]; - } else if (step === 1) { + } else if (step === (gasEdit ? STEP_BUSY : STEP_BUSY_OR_GAS)) { return [ cancelBtn ]; + } else if (gasEdit && (step === STEP_BUSY_OR_GAS)) { + return [ + cancelBtn, + prevBtn, + postBtn + ]; } return [ @@ -133,7 +180,8 @@ class ExecuteContract extends Component { renderStep () { const { onFromAddressChange } = this.props; - const { step, busyState, gasLimitError, txhash, rejected } = this.state; + const { gasEdit, step, busyState, txhash, rejected } = this.state; + const { errorEstimated } = this.gasStore; if (rejected) { return ( @@ -144,23 +192,29 @@ class ExecuteContract extends Component { ); } - if (step === 0) { + if (step === STEP_DETAILS) { return ( <DetailsStep { ...this.props } { ...this.state } - warning={ gasLimitError } + warning={ errorEstimated } onAmountChange={ this.onAmountChange } onFromAddressChange={ onFromAddressChange } onFuncChange={ this.onFuncChange } + onGasEditClick={ this.onGasEditClick } onValueChange={ this.onValueChange } /> ); - } else if (step === 1) { + } else if (step === (gasEdit ? STEP_BUSY : STEP_BUSY_OR_GAS)) { return ( <BusyStep title='The function execution is in progress' state={ busyState } /> ); + } else if (gasEdit && (step === STEP_BUSY_OR_GAS)) { + return ( + <GasPriceEditor + store={ this.gasStore } /> + ); } return ( @@ -171,6 +225,7 @@ class ExecuteContract extends Component { } onAmountChange = (amount) => { + this.gasStore.setEthValue(amount); this.setState({ amount }, this.estimateGas); } @@ -221,7 +276,7 @@ class ExecuteContract extends Component { estimateGas = (_fromAddress) => { const { api } = this.context; - const { fromAddress, gasLimit } = this.props; + const { fromAddress } = this.props; const { amount, func, values } = this.state; const options = { gas: MAX_GAS_ESTIMATION, @@ -237,18 +292,11 @@ class ExecuteContract extends Component { .estimateGas(options, values) .then((gasEst) => { const gas = gasEst.mul(1.2); - let gasLimitError = null; - if (gas.gte(MAX_GAS_ESTIMATION)) { - gasLimitError = ERRORS.gasException; - } else if (gas.gt(gasLimit)) { - gasLimitError = ERRORS.gasBlockLimit; - } + console.log(`estimateGas: received ${gasEst.toFormat(0)}, adjusted to ${gas.toFormat(0)}`); - this.setState({ - gas, - gasLimitError - }); + this.gasStore.setEstimated(gasEst.toFixed(0)); + this.gasStore.setGas(gas.toFixed(0)); }) .catch((error) => { console.warn('estimateGas', error); @@ -258,22 +306,18 @@ class ExecuteContract extends Component { postTransaction = () => { const { api, store } = this.context; const { fromAddress } = this.props; - const { amount, func, values } = this.state; + const { amount, func, gasEdit, values } = this.state; const options = { - gas: MAX_GAS_ESTIMATION, + gas: this.gasStore.gas, + gasPrice: this.gasStore.price, from: fromAddress, value: api.util.toWei(amount || 0) }; - this.setState({ sending: true, step: 1 }); + this.setState({ sending: true, step: gasEdit ? STEP_BUSY : STEP_BUSY_OR_GAS }); func - .estimateGas(options, values) - .then((gas) => { - options.gas = gas.mul(1.2).toFixed(0); - console.log(`estimateGas: received ${gas.toFormat(0)}, adjusted to ${gas.mul(1.2).toFormat(0)}`); - return func.postTransaction(options, values); - }) + .postTransaction(options, values) .then((requestId) => { this.setState({ busyState: 'Waiting for authorization in the Parity Signer' }); @@ -296,6 +340,24 @@ class ExecuteContract extends Component { store.dispatch({ type: 'newError', error }); }); } + + onGasEditClick = () => { + this.setState({ + gasEdit: !this.state.gasEdit + }); + } + + onNextClick = () => { + this.setState({ + step: this.state.step + 1 + }); + } + + onPrevClick = () => { + this.setState({ + step: this.state.step - 1 + }); + } } function mapStateToProps (state) { diff --git a/js/src/modals/Transfer/Extras/extras.js b/js/src/modals/Transfer/Extras/extras.js index 6d2bfc821..def5a22c6 100644 --- a/js/src/modals/Transfer/Extras/extras.js +++ b/js/src/modals/Transfer/Extras/extras.js @@ -30,21 +30,14 @@ export default class Extras extends Component { } render () { - const { gasStore, onChange, total, totalError } = this.props; + const { gasStore, onChange } = this.props; return ( <Form> { this.renderData() } <GasPriceEditor store={ gasStore } - onChange={ onChange }> - <Input - disabled - label='total transaction amount' - hint='the total amount of the transaction' - error={ totalError } - value={ `${total} ETH` } /> - </GasPriceEditor> + onChange={ onChange } /> </Form> ); } diff --git a/js/src/modals/Transfer/store.js b/js/src/modals/Transfer/store.js index a43057c86..cbb10f17f 100644 --- a/js/src/modals/Transfer/store.js +++ b/js/src/modals/Transfer/store.js @@ -408,6 +408,8 @@ export default class TransferStore { this.totalError = totalError; this.value = value; this.valueError = valueError; + this.gasStore.setErrorTotal(totalError); + this.gasStore.setEthValue(totalEth); }); } diff --git a/js/src/ui/GasPriceEditor/gasPriceEditor.js b/js/src/ui/GasPriceEditor/gasPriceEditor.js index c6759ddf1..8c94dfca7 100644 --- a/js/src/ui/GasPriceEditor/gasPriceEditor.js +++ b/js/src/ui/GasPriceEditor/gasPriceEditor.js @@ -26,8 +26,11 @@ import styles from './gasPriceEditor.css'; @observer export default class GasPriceEditor extends Component { + static contextTypes = { + api: PropTypes.object.isRequired + }; + static propTypes = { - children: PropTypes.node, store: PropTypes.object.isRequired, onChange: PropTypes.func } @@ -35,9 +38,11 @@ export default class GasPriceEditor extends Component { static Store = Store; render () { - const { children, store } = this.props; - const { estimated, priceDefault, price, gas, histogram, errorGas, errorPrice } = store; + const { api } = this.context; + const { store } = this.props; + const { estimated, priceDefault, price, gas, histogram, errorGas, errorPrice, errorTotal, totalValue } = store; + const eth = api.util.fromWei(totalValue).toFormat(); const gasLabel = `gas (estimated: ${new BigNumber(estimated).toFormat()})`; const priceLabel = `price (current: ${new BigNumber(priceDefault).toFormat()})`; @@ -75,7 +80,12 @@ export default class GasPriceEditor extends Component { </div> <div className={ styles.row }> - { children } + <Input + disabled + label='total transaction amount' + hint='the total amount of the transaction' + error={ errorTotal } + value={ `${eth} ETH` } /> </div> </div> </div> diff --git a/js/src/ui/GasPriceEditor/store.js b/js/src/ui/GasPriceEditor/store.js index 3f3e50430..afa5e15b2 100644 --- a/js/src/ui/GasPriceEditor/store.js +++ b/js/src/ui/GasPriceEditor/store.js @@ -15,7 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import BigNumber from 'bignumber.js'; -import { action, observable, transaction } from 'mobx'; +import { action, computed, observable, transaction } from 'mobx'; import { ERRORS, validatePositiveNumber } from '~/util/validation'; import { DEFAULT_GAS, DEFAULT_GASPRICE, MAX_GAS_ESTIMATION } from '~/util/constants'; @@ -24,12 +24,14 @@ export default class GasPriceEditor { @observable errorEstimated = null; @observable errorGas = null; @observable errorPrice = null; + @observable errorTotal = null; @observable estimated = DEFAULT_GAS; @observable histogram = null; @observable price = DEFAULT_GASPRICE; @observable priceDefault = DEFAULT_GASPRICE; @observable gas = DEFAULT_GAS; @observable gasLimit = 0; + @observable weiValue = '0'; constructor (api, gasLimit, loadDefaults = true) { this._api = api; @@ -40,6 +42,18 @@ export default class GasPriceEditor { } } + @computed get totalValue () { + try { + return new BigNumber(this.gas).mul(this.price).add(this.weiValue); + } catch (error) { + return new BigNumber(0); + } + } + + @action setErrorTotal = (errorTotal) => { + this.errorTotal = errorTotal; + } + @action setEstimated = (estimated) => { transaction(() => { const bn = new BigNumber(estimated); @@ -56,6 +70,10 @@ export default class GasPriceEditor { }); } + @action setEthValue = (weiValue) => { + this.weiValue = weiValue; + } + @action setHistogram = (gasHistogram) => { this.histogram = gasHistogram; } From 63137b15482344ff9df634c086abaabed452eadc Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Fri, 9 Dec 2016 15:52:28 +0100 Subject: [PATCH 040/131] Add enhanced Wallet solidity code --- js/src/contracts/snippets/enhanced-wallet.sol | 460 ++++++++++++++++++ 1 file changed, 460 insertions(+) create mode 100644 js/src/contracts/snippets/enhanced-wallet.sol diff --git a/js/src/contracts/snippets/enhanced-wallet.sol b/js/src/contracts/snippets/enhanced-wallet.sol new file mode 100644 index 000000000..374eb595f --- /dev/null +++ b/js/src/contracts/snippets/enhanced-wallet.sol @@ -0,0 +1,460 @@ +//sol Wallet +// Multi-sig, daily-limited account proxy/wallet. +// @authors: +// Gav Wood <g@ethdev.com> +// inheritable "property" contract that enables methods to be protected by requiring the acquiescence of either a +// single, or, crucially, each of a number of, designated owners. +// usage: +// use modifiers onlyowner (just own owned) or onlymanyowners(hash), whereby the same hash must be provided by +// some number (specified in constructor) of the set of owners (specified in the constructor, modifiable) before the +// interior is executed. +pragma solidity ^0.4.6; + +contract multisig { + // EVENTS + + // this contract can accept a confirmation, in which case + // we record owner and operation (hash) alongside it. + event Confirmation(address owner, bytes32 operation); + event Revoke(address owner, bytes32 operation); + + // some others are in the case of an owner changing. + event OwnerChanged(address oldOwner, address newOwner); + event OwnerAdded(address newOwner); + event OwnerRemoved(address oldOwner); + + // the last one is emitted if the required signatures change + event RequirementChanged(uint newRequirement); + + // Funds has arrived into the wallet (record how much). + event Deposit(address _from, uint value); + // Single transaction going out of the wallet (record who signed for it, how much, and to whom it's going). + event SingleTransact(address owner, uint value, address to, bytes data); + // Multi-sig transaction going out of the wallet (record who signed for it last, the operation hash, how much, and to whom it's going). + event MultiTransact(address owner, bytes32 operation, uint value, address to, bytes data); + // Confirmation still needed for a transaction. + event ConfirmationNeeded(bytes32 operation, address initiator, uint value, address to, bytes data); +} + +contract multisigAbi is multisig { + function isOwner(address _addr) returns (bool); + + function hasConfirmed(bytes32 _operation, address _owner) constant returns (bool); + + function confirm(bytes32 _h) returns(bool); + + // (re)sets the daily limit. needs many of the owners to confirm. doesn't alter the amount already spent today. + function setDailyLimit(uint _newLimit); + + function addOwner(address _owner); + + function removeOwner(address _owner); + + function changeRequirement(uint _newRequired); + + // Revokes a prior confirmation of the given operation + function revoke(bytes32 _operation); + + function changeOwner(address _from, address _to); + + function execute(address _to, uint _value, bytes _data) returns(bool); +} + +contract WalletLibrary is multisig { + // TYPES + + // struct for the status of a pending operation. + struct PendingState { + uint yetNeeded; + uint ownersDone; + uint index; + } + + // Transaction structure to remember details of transaction lest it need be saved for a later call. + struct Transaction { + address to; + uint value; + bytes data; + } + + /****************************** + ***** MULTI OWNED SECTION **** + ******************************/ + + // MODIFIERS + + // simple single-sig function modifier. + modifier onlyowner { + if (isOwner(msg.sender)) + _; + } + // multi-sig function modifier: the operation must have an intrinsic hash in order + // that later attempts can be realised as the same underlying operation and + // thus count as confirmations. + modifier onlymanyowners(bytes32 _operation) { + if (confirmAndCheck(_operation)) + _; + } + + // METHODS + + // constructor is given number of sigs required to do protected "onlymanyowners" transactions + // as well as the selection of addresses capable of confirming them. + function initMultiowned(address[] _owners, uint _required) { + m_numOwners = _owners.length + 1; + m_owners[1] = uint(msg.sender); + m_ownerIndex[uint(msg.sender)] = 1; + m_required = _required; + + for (uint i = 0; i < _owners.length; ++i) + { + m_owners[2 + i] = uint(_owners[i]); + m_ownerIndex[uint(_owners[i])] = 2 + i; + } + } + + // Revokes a prior confirmation of the given operation + function revoke(bytes32 _operation) { + uint ownerIndex = m_ownerIndex[uint(msg.sender)]; + // make sure they're an owner + if (ownerIndex == 0) return; + uint ownerIndexBit = 2**ownerIndex; + var pending = m_pending[_operation]; + if (pending.ownersDone & ownerIndexBit > 0) { + pending.yetNeeded++; + pending.ownersDone -= ownerIndexBit; + Revoke(msg.sender, _operation); + } + } + + // Replaces an owner `_from` with another `_to`. + function changeOwner(address _from, address _to) onlymanyowners(sha3(msg.data)) { + if (isOwner(_to)) return; + uint ownerIndex = m_ownerIndex[uint(_from)]; + if (ownerIndex == 0) return; + + clearPending(); + m_owners[ownerIndex] = uint(_to); + m_ownerIndex[uint(_from)] = 0; + m_ownerIndex[uint(_to)] = ownerIndex; + OwnerChanged(_from, _to); + } + + function addOwner(address _owner) onlymanyowners(sha3(msg.data)) { + if (isOwner(_owner)) return; + + clearPending(); + if (m_numOwners >= c_maxOwners) + reorganizeOwners(); + if (m_numOwners >= c_maxOwners) + return; + m_numOwners++; + m_owners[m_numOwners] = uint(_owner); + m_ownerIndex[uint(_owner)] = m_numOwners; + OwnerAdded(_owner); + } + + function removeOwner(address _owner) onlymanyowners(sha3(msg.data)) { + uint ownerIndex = m_ownerIndex[uint(_owner)]; + if (ownerIndex == 0) return; + if (m_required > m_numOwners - 1) return; + + m_owners[ownerIndex] = 0; + m_ownerIndex[uint(_owner)] = 0; + clearPending(); + reorganizeOwners(); //make sure m_numOwner is equal to the number of owners and always points to the optimal free slot + OwnerRemoved(_owner); + } + + function changeRequirement(uint _newRequired) onlymanyowners(sha3(msg.data)) { + if (_newRequired > m_numOwners) return; + m_required = _newRequired; + clearPending(); + RequirementChanged(_newRequired); + } + + function isOwner(address _addr) returns (bool) { + return m_ownerIndex[uint(_addr)] > 0; + } + + + function hasConfirmed(bytes32 _operation, address _owner) constant returns (bool) { + var pending = m_pending[_operation]; + uint ownerIndex = m_ownerIndex[uint(_owner)]; + + // make sure they're an owner + if (ownerIndex == 0) return false; + + // determine the bit to set for this owner. + uint ownerIndexBit = 2**ownerIndex; + return !(pending.ownersDone & ownerIndexBit == 0); + } + + // INTERNAL METHODS + + function confirmAndCheck(bytes32 _operation) internal returns (bool) { + // determine what index the present sender is: + uint ownerIndex = m_ownerIndex[uint(msg.sender)]; + // make sure they're an owner + if (ownerIndex == 0) return; + + var pending = m_pending[_operation]; + // if we're not yet working on this operation, switch over and reset the confirmation status. + if (pending.yetNeeded == 0) { + // reset count of confirmations needed. + pending.yetNeeded = m_required; + // reset which owners have confirmed (none) - set our bitmap to 0. + pending.ownersDone = 0; + pending.index = m_pendingIndex.length++; + m_pendingIndex[pending.index] = _operation; + } + // determine the bit to set for this owner. + uint ownerIndexBit = 2**ownerIndex; + // make sure we (the message sender) haven't confirmed this operation previously. + if (pending.ownersDone & ownerIndexBit == 0) { + Confirmation(msg.sender, _operation); + // ok - check if count is enough to go ahead. + if (pending.yetNeeded <= 1) { + // enough confirmations: reset and run interior. + delete m_pendingIndex[m_pending[_operation].index]; + delete m_pending[_operation]; + return true; + } + else + { + // not enough: record that this owner in particular confirmed. + pending.yetNeeded--; + pending.ownersDone |= ownerIndexBit; + } + } + } + + function reorganizeOwners() private { + uint free = 1; + while (free < m_numOwners) + { + while (free < m_numOwners && m_owners[free] != 0) free++; + while (m_numOwners > 1 && m_owners[m_numOwners] == 0) m_numOwners--; + if (free < m_numOwners && m_owners[m_numOwners] != 0 && m_owners[free] == 0) + { + m_owners[free] = m_owners[m_numOwners]; + m_ownerIndex[m_owners[free]] = free; + m_owners[m_numOwners] = 0; + } + } + } + + function clearPending() internal { + uint length = m_pendingIndex.length; + for (uint i = 0; i < length; ++i) + if (m_pendingIndex[i] != 0) + delete m_pending[m_pendingIndex[i]]; + delete m_pendingIndex; + } + + + /****************************** + ****** DAY LIMIT SECTION ***** + ******************************/ + + // MODIFIERS + + // simple modifier for daily limit. + modifier limitedDaily(uint _value) { + if (underLimit(_value)) + _; + } + + // METHODS + + // constructor - stores initial daily limit and records the present day's index. + function initDaylimit(uint _limit) { + m_dailyLimit = _limit; + m_lastDay = today(); + } + // (re)sets the daily limit. needs many of the owners to confirm. doesn't alter the amount already spent today. + function setDailyLimit(uint _newLimit) onlymanyowners(sha3(msg.data)) { + m_dailyLimit = _newLimit; + } + // resets the amount already spent today. needs many of the owners to confirm. + function resetSpentToday() onlymanyowners(sha3(msg.data)) { + m_spentToday = 0; + } + + // INTERNAL METHODS + + // checks to see if there is at least `_value` left from the daily limit today. if there is, subtracts it and + // returns true. otherwise just returns false. + function underLimit(uint _value) internal onlyowner returns (bool) { + // reset the spend limit if we're on a different day to last time. + if (today() > m_lastDay) { + m_spentToday = 0; + m_lastDay = today(); + } + // check to see if there's enough left - if so, subtract and return true. + // overflow protection // dailyLimit check + if (m_spentToday + _value >= m_spentToday && m_spentToday + _value <= m_dailyLimit) { + m_spentToday += _value; + return true; + } + return false; + } + + // determines today's index. + function today() private constant returns (uint) { return now / 1 days; } + + + /****************************** + ********* WALLET SECTION ***** + ******************************/ + + // METHODS + + // constructor - just pass on the owner array to the multiowned and + // the limit to daylimit + function initWallet(address[] _owners, uint _required, uint _daylimit) { + initMultiowned(_owners, _required); + initDaylimit(_daylimit) ; + } + + // kills the contract sending everything to `_to`. + function kill(address _to) onlymanyowners(sha3(msg.data)) { + suicide(_to); + } + + // Outside-visible transact entry point. Executes transaction immediately if below daily spend limit. + // If not, goes into multisig process. We provide a hash on return to allow the sender to provide + // shortcuts for the other confirmations (allowing them to avoid replicating the _to, _value + // and _data arguments). They still get the option of using them if they want, anyways. + function execute(address _to, uint _value, bytes _data) onlyowner returns(bool _callValue) { + // first, take the opportunity to check that we're under the daily limit. + if (underLimit(_value)) { + SingleTransact(msg.sender, _value, _to, _data); + // yes - just execute the call. + _callValue =_to.call.value(_value)(_data); + } else { + // determine our operation hash. + bytes32 _r = sha3(msg.data, block.number); + if (!confirm(_r) && m_txs[_r].to == 0) { + m_txs[_r].to = _to; + m_txs[_r].value = _value; + m_txs[_r].data = _data; + ConfirmationNeeded(_r, msg.sender, _value, _to, _data); + } + } + } + + // confirm a transaction through just the hash. we use the previous transactions map, m_txs, in order + // to determine the body of the transaction from the hash provided. + function confirm(bytes32 _h) onlymanyowners(_h) returns (bool) { + if (m_txs[_h].to != 0) { + m_txs[_h].to.call.value(m_txs[_h].value)(m_txs[_h].data); + MultiTransact(msg.sender, _h, m_txs[_h].value, m_txs[_h].to, m_txs[_h].data); + delete m_txs[_h]; + return true; + } + } + + // INTERNAL METHODS + + function clearWalletPending() internal { + uint length = m_pendingIndex.length; + for (uint i = 0; i < length; ++i) + delete m_txs[m_pendingIndex[i]]; + clearPending(); + } + + // FIELDS + address constant _walletLibrary = 0xcafecafecafecafecafecafecafecafecafecafe; + + // the number of owners that must confirm the same operation before it is run. + uint m_required; + // pointer used to find a free slot in m_owners + uint m_numOwners; + + uint public m_dailyLimit; + uint public m_spentToday; + uint public m_lastDay; + + // list of owners + uint[256] m_owners; + uint constant c_maxOwners = 250; + + // index on the list of owners to allow reverse lookup + mapping(uint => uint) m_ownerIndex; + // the ongoing operations. + mapping(bytes32 => PendingState) m_pending; + bytes32[] m_pendingIndex; + + // pending transactions we have at present. + mapping (bytes32 => Transaction) m_txs; +} + + +contract Wallet is multisig { + + // WALLET CONSTRUCTOR + // calls the `initWallet` method of the Library in this context + function Wallet(address[] _owners, uint _required, uint _daylimit) { + // Signature of the Wallet Library's init function + bytes4 sig = bytes4(sha3("initWallet(address[],uint256,uint256)")); + address target = _walletLibrary; + + // Compute the size of the call data : arrays has 2 + // 32bytes for offset and length, plus 32bytes per element ; + // plus 2 32bytes for each uint + uint argarraysize = (2 + _owners.length); + uint argsize = (2 + argarraysize) * 32; + + assembly { + // Add the signature first to memory + mstore(0x0, sig) + // Add the call data, which is at the end of the + // code + codecopy(0x4, sub(codesize, argsize), argsize) + // Delegate call to the library + delegatecall(sub(gas, 10000), target, 0x0, add(argsize, 0x4), 0x0, 0x0) + } + } + + // METHODS + + // gets called when no other function matches + function() payable { + // just being sent some cash? + if (msg.value > 0) + Deposit(msg.sender, msg.value); + else if (msg.data.length > 0) + _walletLibrary.delegatecall(msg.data); + } + + // Gets an owner by 0-indexed position (using numOwners as the count) + function getOwner(uint ownerIndex) constant returns (address) { + return address(m_owners[ownerIndex + 1]); + } + + // As return statement unavailable in fallback, explicit the method here + + function hasConfirmed(bytes32 _operation, address _owner) constant returns (bool) { + return _walletLibrary.delegatecall(msg.data); + } + + function isOwner(address _addr) returns (bool) { + return _walletLibrary.delegatecall(msg.data); + } + + // FIELDS + address constant _walletLibrary = 0xcafecafecafecafecafecafecafecafecafecafe; + + // the number of owners that must confirm the same operation before it is run. + uint public m_required; + // pointer used to find a free slot in m_owners + uint public m_numOwners; + + uint public m_dailyLimit; + uint public m_spentToday; + uint public m_lastDay; + + // list of owners + uint[256] m_owners; +} From cee07fef747cb5146a170e066aeb2ca2b5cc129e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Fri, 9 Dec 2016 15:54:13 +0100 Subject: [PATCH 041/131] Trigger remove_old on new block --- ethcore/src/miner/miner.rs | 60 +++++++++----------------- ethcore/src/miner/transaction_queue.rs | 42 ++++++++++++------ 2 files changed, 48 insertions(+), 54 deletions(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 8d1f55567..cebd35b09 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1083,20 +1083,6 @@ impl MinerService for Miner { fn chain_new_blocks(&self, chain: &MiningBlockChainClient, _imported: &[H256], _invalid: &[H256], enacted: &[H256], retracted: &[H256]) { trace!(target: "miner", "chain_new_blocks"); - fn fetch_transactions(chain: &MiningBlockChainClient, hash: &H256) -> Vec<SignedTransaction> { - let block = chain - .block(BlockID::Hash(*hash)) - // Client should send message after commit to db and inserting to chain. - .expect("Expected in-chain blocks."); - let block = BlockView::new(&block); - let txs = block.transactions(); - // populate sender - for tx in &txs { - let _sender = tx.sender(); - } - txs - } - // 1. We ignore blocks that were `imported` (because it means that they are not in canon-chain, and transactions // should be still available in the queue. // 2. We ignore blocks that are `invalid` because it doesn't have any meaning in terms of the transactions that @@ -1107,35 +1093,29 @@ impl MinerService for Miner { // Then import all transactions... { - let out_of_chain = retracted - .par_iter() - .map(|h| fetch_transactions(chain, h)); - out_of_chain.for_each(|txs| { - let mut transaction_queue = self.transaction_queue.lock(); - let _ = self.add_transactions_to_queue( - chain, txs, TransactionOrigin::RetractedBlock, &mut transaction_queue - ); - }); + retracted.par_iter() + .map(|hash| { + let block = chain.block(BlockID::Hash(*hash)) + .expect("Client is sending message after commit to db and inserting to chain; the block is available; qed"); + let block = BlockView::new(&block); + let txs = block.transactions(); + // populate sender + for tx in &txs { + let _sender = tx.sender(); + } + txs + }).for_each(|txs| { + let mut transaction_queue = self.transaction_queue.lock(); + let _ = self.add_transactions_to_queue( + chain, txs, TransactionOrigin::RetractedBlock, &mut transaction_queue + ); + }); } - // ...and at the end remove old ones + // ...and at the end remove the old ones { - let in_chain = enacted - .par_iter() - .map(|h: &H256| fetch_transactions(chain, h)); - - in_chain.for_each(|mut txs| { - let mut transaction_queue = self.transaction_queue.lock(); - - let to_remove = txs.drain(..) - .map(|tx| { - tx.sender().expect("Transaction is in block, so sender has to be defined.") - }) - .collect::<HashSet<Address>>(); - for sender in to_remove { - transaction_queue.remove_all(sender, chain.latest_nonce(&sender)); - } - }); + let mut transaction_queue = self.transaction_queue.lock(); + transaction_queue.remove_old(|sender| chain.latest_nonce(sender)); } if enacted.len() > 0 { diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index 84981b893..03a9da8e3 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -79,10 +79,10 @@ //! we check if the transactions should go to `current` (comparing state nonce) //! - When it's removed from `current` - all transactions from this sender (`current` & `future`) are recalculated. //! 3. `remove_all` is used to inform the queue about client (state) nonce changes. -//! - It removes all transactions (either from `current` or `future`) with nonce < client nonce -//! - It moves matching `future` transactions to `current` -//! 4. `remove_old` is used periodically to clear the transactions if node goes out of sync -//! (in such case `remove_all` is not invoked because we are syncing the chain) +//! - It removes all transactions (either from `current` or `future`) with nonce < client nonce +//! - It moves matching `future` transactions to `current` +//! 4. `remove_old` is used as convenient method to update the state nonce for all senders in the queue. +//! - Invokes `remove_all` with latest state nonce for all senders. use std::ops::Deref; use std::cmp::Ordering; @@ -754,6 +754,21 @@ impl TransactionQueue { /// Removes all transactions from particular sender up to (excluding) given client (state) nonce. /// Client (State) Nonce = next valid nonce for this sender. pub fn remove_all(&mut self, sender: Address, client_nonce: U256) { + // Check if there is anything in current... + let should_check_in_current = self.current.by_address.row(&sender) + // If nonce == client_nonce nothing is changed + .and_then(|by_nonce| by_nonce.keys().find(|nonce| *nonce < &client_nonce)) + .map(|_| ()); + // ... or future + let should_check_in_future = self.future.by_address.row(&sender) + // if nonce == client_nonce we need to promote to current + .and_then(|by_nonce| by_nonce.keys().find(|nonce| *nonce <= &client_nonce)) + .map(|_| ()); + + if should_check_in_current.or(should_check_in_future).is_none() { + return; + } + // We will either move transaction to future or remove it completely // so there will be no transactions from this sender in current self.last_nonces.remove(&sender); @@ -768,16 +783,16 @@ impl TransactionQueue { } /// Checks the current nonce for all transactions' senders in the queue and removes the old transactions. - pub fn remove_old<F>(&mut self, fetch_account: &F) where - F: Fn(&Address) -> AccountDetails, + pub fn remove_old<F>(&mut self, fetch_nonce: F) where + F: Fn(&Address) -> U256, { - let senders = self.current.by_address - .keys() - .map(|key| (*key, fetch_account(key).nonce)) - .collect::<Vec<_>>(); + let senders = self.current.by_address.keys() + .chain(self.future.by_address.keys()) + .cloned() + .collect::<HashSet<_>>(); - for (sender, nonce) in senders { - self.remove_all(sender, nonce); + for sender in senders { + self.remove_all(sender, fetch_nonce(&sender)); } } @@ -2480,7 +2495,6 @@ mod test { let (tx1, tx2) = new_tx_pair_default(1.into(), 0.into()); let (tx3, tx4) = new_tx_pair_default(1.into(), 0.into()); let nonce1 = tx1.nonce; - let new_details = |_a: &Address| AccountDetails { nonce: nonce1 + U256::one(), balance: !U256::zero() }; // Insert all transactions txq.add(tx1, TransactionOrigin::External, &default_account_details, &gas_estimator).unwrap(); @@ -2490,7 +2504,7 @@ mod test { assert_eq!(txq.top_transactions().len(), 4); // when - txq.remove_old(&new_details); + txq.remove_old(|_| nonce1 + U256::one()); // then assert_eq!(txq.top_transactions().len(), 2); From d992c642ffb2aa5c50e058a51bd59209f8bb7142 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 15:55:50 +0100 Subject: [PATCH 042/131] Adjust to final step on rejected/completed --- js/src/modals/ExecuteContract/executeContract.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/src/modals/ExecuteContract/executeContract.js b/js/src/modals/ExecuteContract/executeContract.js index 3f7940ca3..7b4e8ccd2 100644 --- a/js/src/modals/ExecuteContract/executeContract.js +++ b/js/src/modals/ExecuteContract/executeContract.js @@ -307,6 +307,8 @@ class ExecuteContract extends Component { const { api, store } = this.context; const { fromAddress } = this.props; const { amount, func, gasEdit, values } = this.state; + const steps = gasEdit ? STAGES_GAS : STAGES_BASIC; + const finalstep = steps.length - 1; const options = { gas: this.gasStore.gas, gasPrice: this.gasStore.price, @@ -325,7 +327,7 @@ class ExecuteContract extends Component { .pollMethod('parity_checkRequest', requestId) .catch((error) => { if (error.code === ERROR_CODES.REQUEST_REJECTED) { - this.setState({ rejected: true }); + this.setState({ rejected: true, step: finalstep }); return false; } @@ -333,7 +335,7 @@ class ExecuteContract extends Component { }); }) .then((txhash) => { - this.setState({ sending: false, step: 2, txhash, busyState: 'Your transaction has been posted to the network' }); + this.setState({ sending: false, step: finalstep, txhash, busyState: 'Your transaction has been posted to the network' }); }) .catch((error) => { console.error('postTransaction', error); From efee55ae84159f8cf62c54304632e1eb1b21ee9d Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Fri, 9 Dec 2016 16:24:11 +0100 Subject: [PATCH 043/131] Updated Wallet Version ! Now only 500k gas for Wallet creation --- js/src/contracts/code/index.js | 2 +- js/src/contracts/code/wallet.js | 10 +++++--- .../CreateWallet/WalletType/walletType.js | 5 +++- .../modals/CreateWallet/createWalletStore.js | 25 +++++++++++++------ 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/js/src/contracts/code/index.js b/js/src/contracts/code/index.js index baa144979..ff6d218eb 100644 --- a/js/src/contracts/code/index.js +++ b/js/src/contracts/code/index.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import wallet from './wallet'; +import { wallet } from './wallet'; export { wallet diff --git a/js/src/contracts/code/wallet.js b/js/src/contracts/code/wallet.js index 94aa04b7b..35ed3b106 100644 --- a/js/src/contracts/code/wallet.js +++ b/js/src/contracts/code/wallet.js @@ -16,8 +16,10 @@ /** * @version Solidity v0.4.6 - * @from https://github.com/ethereum/dapp-bin/blob/dd5c485359074d49f571693ae064ce78970f3d6d/wallet/wallet.sol - * @date 22-Nov-2016 @ 15h00 UTC + * @from https://github.com/ethcore/parity/blob/63137b15482344ff9df634c086abaabed452eadc/js/src/contracts/snippets/enhanced-wallet.sol + * @date 09-Dec-2016 @ 16h00 UTC */ -export default '0x606060405234610000576040516113bb3803806113bb83398101604090815281516020830151918301519201915b805b83835b815160019081019055600033600160a060020a03166003825b505550600160a060020a033316600090815261010260205260408120600190555b82518110156100ee57828181518110156100005790602001906020020151600160a060020a0316600282600201610100811015610000570160005b5081905550806002016101026000858481518110156100005790602001906020020151600160a060020a03168152602001908152602001600020819055505b60010161006c565b60008290555b50505061010581905561011264010000000061127861012182021704565b610107555b505b50505061012b565b6201518042045b90565b611282806101396000396000f3606060405236156100da5760e060020a6000350463173825d981146101305780632f54bf6e146101425780634123cb6b1461016657806352375093146101855780635c52c2f5146101a4578063659010e7146101b35780637065cb48146101d2578063746c9171146101e4578063797af62714610203578063b20d30a914610227578063b61d27f614610239578063b75c7dc61461026b578063ba51a6df1461027d578063c2cf73261461028f578063c41a360a146102b6578063cbf0b0c0146102e2578063f00d4b5d146102f4578063f1736d8614610309575b61012e5b600034111561012b5760408051600160a060020a033316815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b5b565b005b346100005761012e600435610328565b005b3461000057610152600435610415565b604080519115158252519081900360200190f35b3461000057610173610436565b60408051918252519081900360200190f35b346100005761017361043c565b60408051918252519081900360200190f35b346100005761012e610443565b005b346100005761017361047b565b60408051918252519081900360200190f35b346100005761012e600435610482565b005b3461000057610173610571565b60408051918252519081900360200190f35b3461000057610152600435610577565b604080519115158252519081900360200190f35b346100005761012e6004356107e3565b005b34610000576101736004803590602480359160443591820191013561081c565b60408051918252519081900360200190f35b346100005761012e600435610ab3565b005b346100005761012e600435610b5e565b005b3461000057610152600435602435610be0565b604080519115158252519081900360200190f35b34610000576102c6600435610c35565b60408051600160a060020a039092168252519081900360200190f35b346100005761012e600435610c55565b005b346100005761012e600435602435610c93565b005b3461000057610173610d8c565b60408051918252519081900360200190f35b600060003660405180838380828437820191505092505050604051809103902061035181610d93565b1561040e57600160a060020a03831660009081526101026020526040902054915081151561037e5761040e565b60016001540360005411156103925761040e565b6000600283610100811015610000570160005b5055600160a060020a038316600090815261010260205260408120556103c9610f32565b6103d1611002565b60408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a15b5b5b505050565b600160a060020a03811660009081526101026020526040812054115b919050565b60015481565b6101075481565b60003660405180838380828437820191505092505050604051809103902061046a81610d93565b15610476576000610106555b5b5b50565b6101065481565b6000366040518083838082843782019150509250505060405180910390206104a981610d93565b1561056b576104b782610415565b156104c15761056b565b6104c9610f32565b60015460fa90106104dc576104dc611002565b5b60015460fa90106104ed5761056b565b60018054810190819055600160a060020a03831690600290610100811015610000570160005b5055600154600160a060020a03831660008181526101026020908152604091829020939093558051918252517f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3929181900390910190a15b5b5b5050565b60005481565b60008161058381610d93565b156107da5760008381526101086020526040902054600160a060020a0316156107da5760008381526101086020526040908190208054600180830154935160029384018054600160a060020a0390941695949093919283928592918116156101000260001901160480156106385780601f1061060d57610100808354040283529160200191610638565b820191906000526020600020905b81548152906001019060200180831161061b57829003601f168201915b505091505060006040518083038185876185025a03f15050506000848152610108602090815260409182902060018082015482548551600160a060020a033381811683529682018c905296810183905295166060860181905260a06080870181815260029586018054958616156101000260001901909516959095049087018190527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a95929491939290919060c08301908490801561073d5780601f106107125761010080835404028352916020019161073d565b820191906000526020600020905b81548152906001019060200180831161072057829003601f168201915b5050965050505050505060405180910390a16000838152610108602052604081208054600160a060020a0319168155600180820183905560028083018054858255939493909281161561010002600019011604601f81901061079f57506107d1565b601f0160209004906000526020600020908101906107d191905b808211156107cd57600081556001016107b9565b5090565b5b505050600191505b5b5b5b50919050565b60003660405180838380828437820191505092505050604051809103902061080a81610d93565b1561056b576101058290555b5b5b5050565b600061082733610415565b15610aa85761083584611131565b156108f3577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00433858786866040518086600160a060020a0316815260200185815260200184600160a060020a0316815260200180602001828103825284848281815260200192508082843760405192018290039850909650505050505050a184600160a060020a03168484846040518083838082843782019150509250505060006040518083038185876185025a03f15060009350610aa892505050565b6000364360405180848480828437820191505082815260200193505050506040518091039020905061092481610577565b158015610947575060008181526101086020526040902054600160a060020a0316155b15610aa857600081815261010860209081526040822080546c01000000000000000000000000808a0204600160a060020a0319909116178155600180820188905560029182018054818652948490209094601f928116156101000260001901169290920481019290920481019185919087908390106109d15782800160ff198235161785556109fe565b828001600101855582156109fe579182015b828111156109fe5782358255916020019190600101906109e3565b5b50610a1f9291505b808211156107cd57600081556001016107b9565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32813386888787604051808760001916815260200186600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284376040519201829003995090975050505050505050a15b5b5b5b949350505050565b600160a060020a033316600090815261010260205260408120549080821515610adb57610b57565b50506000828152610103602052604081206001810154600284900a929083161115610b575780546001908101825581018054839003905560408051600160a060020a03331681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b5b50505050565b600036604051808383808284378201915050925050506040518091039020610b8581610d93565b1561056b57600154821115610b995761056b565b6000829055610ba6610f32565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15b5b5b5050565b600082815261010360209081526040808320600160a060020a038516845261010290925282205482811515610c185760009350610c2c565b8160020a9050808360010154166000141593505b50505092915050565b6000600282600101610100811015610000570160005b505490505b919050565b600036604051808383808284378201915050925050506040518091039020610c7c81610d93565b1561056b5781600160a060020a0316ff5b5b5b5050565b6000600036604051808383808284378201915050925050506040518091039020610cbc81610d93565b15610b5757610cca83610415565b15610cd457610b57565b600160a060020a038416600090815261010260205260409020549150811515610cfc57610b57565b610d04610f32565b82600160a060020a0316600283610100811015610000570160005b5055600160a060020a0380851660008181526101026020908152604080832083905593871680835291849020869055835192835282015281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a15b5b5b50505050565b6101055481565b600160a060020a033316600090815261010260205260408120548180821515610dbb57610f28565b60008581526101036020526040902080549092501515610e4f576000805483556001808401919091556101048054918201808255828015829011610e2457600083815260209020610e249181019083015b808211156107cd57600081556001016107b9565b5090565b5b50505060028301819055610104805487929081101561000057906000526020600020900160005b50555b8260020a90508082600101541660001415610f285760408051600160a060020a03331681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610f155760008581526101036020526040902060020154610104805490919081101561000057906000526020600020900160005b506000908190558581526101036020526040812081815560018082018390556002909101919091559350610f2856610f28565b8154600019018255600182018054821790555b5b5b505050919050565b6101045460005b81811015610ff557610108600061010483815481101561000057906000526020600020900160005b50548152602081019190915260400160009081208054600160a060020a0319168155600180820183905560028083018054858255939493909281161561010002600019011604601f819010610fb65750610fe8565b601f016020900490600052602060002090810190610fe891905b808211156107cd57600081556001016107b9565b5090565b5b5050505b600101610f39565b61056b6111a4565b5b5050565b60015b600154811015610476575b600154811080156110325750600281610100811015610000570160005b505415155b1561103f57600101611010565b5b600160015411801561106457506002600154610100811015610000570160005b5054155b156110785760018054600019019055611040565b6001548110801561109c57506002600154610100811015610000570160005b505415155b80156110b85750600281610100811015610000570160005b5054155b15611128576002600154610100811015610000570160005b5054600282610100811015610000570160005b5055806101026000600283610100811015610000570160005b505481526020019081526020016000208190555060006002600154610100811015610000570160005b50555b611005565b5b50565b600061113c33610415565b15610431576101075461114d611278565b111561116657600061010655611161611278565b610107555b610106548281011080159061118357506101055482610106540111155b1561119957506101068054820190556001610431565b5060005b5b5b919050565b6101045460005b818110156112215761010481815481101561000057906000526020600020900160005b50541561121857610103600061010483815481101561000057906000526020600020900160005b505481526020810191909152604001600090812081815560018101829055600201555b5b6001016111ab565b610104805460008083559190915261040e907f4c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe908101905b808211156107cd57600081556001016107b9565b5090565b5b505b5050565b6201518042045b9056'; - +export const wallet = '0x6060604052346100005760405161041b38038061041b83398101604090815281516020830151918301519201915b604080517f696e697457616c6c657428616464726573735b5d2c75696e743235362c75696e81527f7432353629000000000000000000000000000000000000000000000000000000602080830191909152915190819003602501902084516000829052909173__WalletLibrary_________________________91600281019160049182010290819038829003903960006000600483016000866127105a03f45b505050505050505b610337806100e46000396000f36060604052361561006c5760e060020a60003504632f54bf6e81146101245780634123cb6b146101485780635237509314610167578063659010e714610186578063746c9171146101a5578063c2cf7326146101c4578063c41a360a146101eb578063f1736d8614610217575b6101225b60003411156100c15760408051600160a060020a033316815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a161011e565b600036111561011e5773__WalletLibrary_________________________600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f4156100005750505b5b5b565b005b3461000057610134600435610236565b604080519115158252519081900360200190f35b3461000057610155610297565b60408051918252519081900360200190f35b346100005761015561029d565b60408051918252519081900360200190f35b34610000576101556102a3565b60408051918252519081900360200190f35b34610000576101556102a9565b60408051918252519081900360200190f35b34610000576101346004356024356102af565b604080519115158252519081900360200190f35b34610000576101fb600435610311565b60408051600160a060020a039092168252519081900360200190f35b3461000057610155610331565b60408051918252519081900360200190f35b600073__WalletLibrary_________________________600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f4156100005750506040515190505b919050565b60015481565b60045481565b60035481565b60005481565b600073__WalletLibrary_________________________600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f4156100005750506040515190505b92915050565b6000600582600101610100811015610000570160005b505490505b919050565b6002548156'; +export const walletLibrary = '0x606060405234610000575b611381806100186000396000f3606060405236156100da5760e060020a6000350463173825d981146100df5780632f54bf6e146100f157806352375093146101155780635c52c2f514610134578063659010e7146101435780637065cb4814610162578063797af627146101745780639da5e0eb14610198578063b20d30a9146101aa578063b61d27f6146101bc578063b75c7dc614610227578063ba51a6df14610239578063c2cf73261461024b578063c57c5f6014610272578063cbf0b0c0146102c6578063e46dcfeb146102d8578063f00d4b5d14610331578063f1736d8614610346575b610000565b34610000576100ef600435610365565b005b3461000057610101600435610452565b604080519115158252519081900360200190f35b3461000057610122610473565b60408051918252519081900360200190f35b34610000576100ef610479565b005b34610000576101226104b0565b60408051918252519081900360200190f35b34610000576100ef6004356104b6565b005b34610000576101016004356105a5565b604080519115158252519081900360200190f35b34610000576100ef60043561081e565b005b34610000576100ef600435610832565b005b3461000057604080516020600460443581810135601f810184900484028501840190955284845261010194823594602480359560649492939190920191819084018382808284375094965061086a95505050505050565b604080519115158252519081900360200190f35b34610000576100ef600435610bcc565b005b34610000576100ef600435610c77565b005b3461000057610101600435602435610cf9565b604080519115158252519081900360200190f35b34610000576100ef6004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496505093359350610d4e92505050565b005b34610000576100ef600435610e13565b005b34610000576100ef60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965050843594602001359350610e5192505050565b005b34610000576100ef600435602435610e6a565b005b3461000057610122610f63565b60408051918252519081900360200190f35b600060003660405180838380828437820191505092505050604051809103902061038e81610f69565b1561044b57600160a060020a0383166000908152610105602052604090205491508115156103bb5761044b565b60016001540360005411156103cf5761044b565b6000600583610100811015610000570160005b5055600160a060020a03831660009081526101056020526040812055610406611108565b61040e6111dc565b60408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a15b5b5b505050565b600160a060020a03811660009081526101056020526040812054115b919050565b60045481565b6000366040518083838082843782019150509250505060405180910390206104a081610f69565b156104ab5760006003555b5b5b50565b60035481565b6000366040518083838082843782019150509250505060405180910390206104dd81610f69565b1561059f576104eb82610452565b156104f55761059f565b6104fd611108565b60015460fa9010610510576105106111dc565b5b60015460fa90106105215761059f565b60018054810190819055600160a060020a03831690600590610100811015610000570160005b5055600154600160a060020a03831660008181526101056020908152604091829020939093558051918252517f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3929181900390910190a15b5b5b5050565b6000816105b181610f69565b156108155760008381526101086020526040902054600160a060020a0316156108155760008381526101086020526040908190208054600180830154935160029384018054600160a060020a0390941695949093919283928592918116156101000260001901160480156106665780601f1061063b57610100808354040283529160200191610666565b820191906000526020600020905b81548152906001019060200180831161064957829003601f168201915b505091505060006040518083038185876185025a03f15050506000848152610108602090815260409182902060018082015482548551600160a060020a033381811683529682018c905296810183905295166060860181905260a06080870181815260029586018054958616156101000260001901909516959095049087018190527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a95929491939290919060c08301908490801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050965050505050505060405180910390a1600083815261010860205260408120805473ffffffffffffffffffffffffffffffffffffffff19168155600180820183905560028083018054858255939493909281161561010002600019011604601f8190106107da575061080c565b601f01602090049060005260206000209081019061080c91905b8082111561080857600081556001016107f4565b5090565b5b505050600191505b5b5b5b50919050565b600281905561082b61130b565b6004555b50565b60003660405180838380828437820191505092505050604051809103902061085981610f69565b1561059f5760028290555b5b5b5050565b6000600061087733610452565b15610bc05761088584611315565b156109bc577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd004338587866040518085600160a060020a0316815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156109335780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a184600160a060020a03168484604051808280519060200190808383829060006004602084601f0104600302600f01f150905090810190601f16801561099c5780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876185025a03f1925050509150610bc0565b600036436040518084848082843782019150508281526020019350505050604051809103902090506109ed816105a5565b158015610a10575060008181526101086020526040902054600160a060020a0316155b15610bc057600081815261010860209081526040822080546c01000000000000000000000000808a020473ffffffffffffffffffffffffffffffffffffffff199091161781556001808201889055865160029283018054818752958590209095601f9381161561010002600019011693909304820184900483019390929190880190839010610aaa57805160ff1916838001178555610ad7565b82800160010185558215610ad7579182015b82811115610ad7578251825591602001919060010190610abc565b5b50610af89291505b8082111561080857600081556001016107f4565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328133868887604051808660001916815260200185600160a060020a0316815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f168015610bae5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a15b5b5b5b5b509392505050565b600160a060020a033316600090815261010560205260408120549080821515610bf457610c70565b50506000828152610106602052604081206001810154600284900a929083161115610c705780546001908101825581018054839003905560408051600160a060020a03331681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b5b50505050565b600036604051808383808284378201915050925050506040518091039020610c9e81610f69565b1561059f57600154821115610cb25761059f565b6000829055610cbf611108565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15b5b5b5050565b600082815261010660209081526040808320600160a060020a038516845261010590925282205482811515610d315760009350610d45565b8160020a9050808360010154166000141593505b50505092915050565b815160019081019055600033600160a060020a03166006825b505550600160a060020a033316600090815261010560205260408120600190558181555b825181101561044b57828181518110156100005790602001906020020151600160a060020a0316600582600201610100811015610000570160005b5081905550806002016101056000858481518110156100005790602001906020020151600160a060020a03168152602001908152602001600020819055505b600101610d8b565b5b505050565b600036604051808383808284378201915050925050506040518091039020610e3a81610f69565b1561059f5781600160a060020a0316ff5b5b5b5050565b610e5b8383610d4e565b61044b8161081e565b5b505050565b6000600036604051808383808284378201915050925050506040518091039020610e9381610f69565b15610c7057610ea183610452565b15610eab57610c70565b600160a060020a038416600090815261010560205260409020549150811515610ed357610c70565b610edb611108565b82600160a060020a0316600583610100811015610000570160005b5055600160a060020a0380851660008181526101056020908152604080832083905593871680835291849020869055835192835282015281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a15b5b5b50505050565b60025481565b600160a060020a033316600090815261010560205260408120548180821515610f91576110fe565b60008581526101066020526040902080549092501515611025576000805483556001808401919091556101078054918201808255828015829011610ffa57600083815260209020610ffa9181019083015b8082111561080857600081556001016107f4565b5090565b5b50505060028301819055610107805487929081101561000057906000526020600020900160005b50555b8260020a905080826001015416600014156110fe5760408051600160a060020a03331681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a18154600190116110eb5760008581526101066020526040902060020154610107805490919081101561000057906000526020600020900160005b5060009081905585815261010660205260408120818155600180820183905560029091019190915593506110fe566110fe565b8154600019018255600182018054821790555b5b5b505050919050565b6101075460005b818110156111855761010781815481101561000057906000526020600020900160005b50541561117c57610106600061010783815481101561000057906000526020600020900160005b505481526020810191909152604001600090812081815560018101829055600201555b5b60010161110f565b610107805460008083559190915261044b907f47c4908e245f386bfc1825973249847f4053a761ddb4880ad63c323a7b5a2a25908101905b8082111561080857600081556001016107f4565b5090565b5b505b5050565b60015b6001548110156104ab575b6001548110801561120c5750600581610100811015610000570160005b505415155b15611219576001016111ea565b5b600160015411801561123e57506005600154610100811015610000570160005b5054155b15611252576001805460001901905561121a565b6001548110801561127657506005600154610100811015610000570160005b505415155b80156112925750600581610100811015610000570160005b5054155b15611302576005600154610100811015610000570160005b5054600582610100811015610000570160005b5055806101056000600583610100811015610000570160005b505481526020019081526020016000208190555060006005600154610100811015610000570160005b50555b6111df565b5b50565b6201518042045b90565b600061132033610452565b1561046e5760045461133061130b565b111561134757600060035561134361130b565b6004555b600354828101108015906113615750600254826003540111155b1561137657506003805482019055600161046e565b5060005b5b5b91905056'; +export const walletSourceURL = 'https://github.com/ethcore/parity/blob/63137b15482344ff9df634c086abaabed452eadc/js/src/contracts/snippets/enhanced-wallet.sol'; +export const walletLibraryRegKey = 'walletLibrary'; diff --git a/js/src/modals/CreateWallet/WalletType/walletType.js b/js/src/modals/CreateWallet/WalletType/walletType.js index 868c6ad9b..93dd818f1 100644 --- a/js/src/modals/CreateWallet/WalletType/walletType.js +++ b/js/src/modals/CreateWallet/WalletType/walletType.js @@ -17,6 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { RadioButtons } from '~/ui'; +import { walletSourceURL } from '~/contracts/code/wallet'; // import styles from '../createWallet.css'; @@ -46,7 +47,9 @@ export default class WalletType extends Component { description: ( <span> <span>Create/Deploy a </span> - <a href='https://github.com/ethereum/dapp-bin/blob/master/wallet/wallet.sol' target='_blank'>standard multi-signature </a> + <a href={ walletSourceURL } target='_blank'> + standard multi-signature + </a> <span> Wallet</span> </span> ) diff --git a/js/src/modals/CreateWallet/createWalletStore.js b/js/src/modals/CreateWallet/createWalletStore.js index d8c308a12..e6edab56b 100644 --- a/js/src/modals/CreateWallet/createWalletStore.js +++ b/js/src/modals/CreateWallet/createWalletStore.js @@ -20,8 +20,10 @@ import { validateUint, validateAddress, validateName } from '~/util/validation'; import { ERROR_CODES } from '~/api/transport/error'; import Contract from '~/api/contract'; +import Contracts from '~/contracts'; import { wallet as walletAbi } from '~/contracts/abi'; import { wallet as walletCode } from '~/contracts/code'; +import { walletLibraryRegKey } from '~/contracts/code/wallet'; import WalletsUtils from '~/util/wallets'; @@ -160,14 +162,23 @@ export default class CreateWalletStore { const { account, owners, required, daylimit } = this.wallet; - const options = { - data: walletCode, - from: account - }; + Contracts + .get() + .registry + .lookupAddress(walletLibraryRegKey) + .then((address) => { + const walletLibraryAddress = address.replace(/^0x/, '').toLowerCase(); + const code = walletCode.replace(/(_)+WalletLibrary(_)+/g, walletLibraryAddress); - this.api - .newContract(walletAbi) - .deploy(options, [ owners, required, daylimit ], this.onDeploymentState) + const options = { + data: code, + from: account + }; + + return this.api + .newContract(walletAbi) + .deploy(options, [ owners, required, daylimit ], this.onDeploymentState); + }) .then((address) => { this.deployed = true; this.wallet.address = address; From caf3a96c1999a4342c87435844f7349cdb5b0480 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Fri, 9 Dec 2016 16:29:57 +0100 Subject: [PATCH 044/131] Add fallback Full Fleshed Wallet if no library --- js/src/contracts/code/wallet.js | 4 ++++ js/src/modals/CreateWallet/createWalletStore.js | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/src/contracts/code/wallet.js b/js/src/contracts/code/wallet.js index 35ed3b106..92bcf8795 100644 --- a/js/src/contracts/code/wallet.js +++ b/js/src/contracts/code/wallet.js @@ -23,3 +23,7 @@ export const wallet = '0x6060604052346100005760405161041b38038061041b83398101604 export const walletLibrary = '0x606060405234610000575b611381806100186000396000f3606060405236156100da5760e060020a6000350463173825d981146100df5780632f54bf6e146100f157806352375093146101155780635c52c2f514610134578063659010e7146101435780637065cb4814610162578063797af627146101745780639da5e0eb14610198578063b20d30a9146101aa578063b61d27f6146101bc578063b75c7dc614610227578063ba51a6df14610239578063c2cf73261461024b578063c57c5f6014610272578063cbf0b0c0146102c6578063e46dcfeb146102d8578063f00d4b5d14610331578063f1736d8614610346575b610000565b34610000576100ef600435610365565b005b3461000057610101600435610452565b604080519115158252519081900360200190f35b3461000057610122610473565b60408051918252519081900360200190f35b34610000576100ef610479565b005b34610000576101226104b0565b60408051918252519081900360200190f35b34610000576100ef6004356104b6565b005b34610000576101016004356105a5565b604080519115158252519081900360200190f35b34610000576100ef60043561081e565b005b34610000576100ef600435610832565b005b3461000057604080516020600460443581810135601f810184900484028501840190955284845261010194823594602480359560649492939190920191819084018382808284375094965061086a95505050505050565b604080519115158252519081900360200190f35b34610000576100ef600435610bcc565b005b34610000576100ef600435610c77565b005b3461000057610101600435602435610cf9565b604080519115158252519081900360200190f35b34610000576100ef6004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496505093359350610d4e92505050565b005b34610000576100ef600435610e13565b005b34610000576100ef60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965050843594602001359350610e5192505050565b005b34610000576100ef600435602435610e6a565b005b3461000057610122610f63565b60408051918252519081900360200190f35b600060003660405180838380828437820191505092505050604051809103902061038e81610f69565b1561044b57600160a060020a0383166000908152610105602052604090205491508115156103bb5761044b565b60016001540360005411156103cf5761044b565b6000600583610100811015610000570160005b5055600160a060020a03831660009081526101056020526040812055610406611108565b61040e6111dc565b60408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a15b5b5b505050565b600160a060020a03811660009081526101056020526040812054115b919050565b60045481565b6000366040518083838082843782019150509250505060405180910390206104a081610f69565b156104ab5760006003555b5b5b50565b60035481565b6000366040518083838082843782019150509250505060405180910390206104dd81610f69565b1561059f576104eb82610452565b156104f55761059f565b6104fd611108565b60015460fa9010610510576105106111dc565b5b60015460fa90106105215761059f565b60018054810190819055600160a060020a03831690600590610100811015610000570160005b5055600154600160a060020a03831660008181526101056020908152604091829020939093558051918252517f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3929181900390910190a15b5b5b5050565b6000816105b181610f69565b156108155760008381526101086020526040902054600160a060020a0316156108155760008381526101086020526040908190208054600180830154935160029384018054600160a060020a0390941695949093919283928592918116156101000260001901160480156106665780601f1061063b57610100808354040283529160200191610666565b820191906000526020600020905b81548152906001019060200180831161064957829003601f168201915b505091505060006040518083038185876185025a03f15050506000848152610108602090815260409182902060018082015482548551600160a060020a033381811683529682018c905296810183905295166060860181905260a06080870181815260029586018054958616156101000260001901909516959095049087018190527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a95929491939290919060c08301908490801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050965050505050505060405180910390a1600083815261010860205260408120805473ffffffffffffffffffffffffffffffffffffffff19168155600180820183905560028083018054858255939493909281161561010002600019011604601f8190106107da575061080c565b601f01602090049060005260206000209081019061080c91905b8082111561080857600081556001016107f4565b5090565b5b505050600191505b5b5b5b50919050565b600281905561082b61130b565b6004555b50565b60003660405180838380828437820191505092505050604051809103902061085981610f69565b1561059f5760028290555b5b5b5050565b6000600061087733610452565b15610bc05761088584611315565b156109bc577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd004338587866040518085600160a060020a0316815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156109335780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a184600160a060020a03168484604051808280519060200190808383829060006004602084601f0104600302600f01f150905090810190601f16801561099c5780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876185025a03f1925050509150610bc0565b600036436040518084848082843782019150508281526020019350505050604051809103902090506109ed816105a5565b158015610a10575060008181526101086020526040902054600160a060020a0316155b15610bc057600081815261010860209081526040822080546c01000000000000000000000000808a020473ffffffffffffffffffffffffffffffffffffffff199091161781556001808201889055865160029283018054818752958590209095601f9381161561010002600019011693909304820184900483019390929190880190839010610aaa57805160ff1916838001178555610ad7565b82800160010185558215610ad7579182015b82811115610ad7578251825591602001919060010190610abc565b5b50610af89291505b8082111561080857600081556001016107f4565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328133868887604051808660001916815260200185600160a060020a0316815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f168015610bae5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a15b5b5b5b5b509392505050565b600160a060020a033316600090815261010560205260408120549080821515610bf457610c70565b50506000828152610106602052604081206001810154600284900a929083161115610c705780546001908101825581018054839003905560408051600160a060020a03331681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b5b50505050565b600036604051808383808284378201915050925050506040518091039020610c9e81610f69565b1561059f57600154821115610cb25761059f565b6000829055610cbf611108565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15b5b5b5050565b600082815261010660209081526040808320600160a060020a038516845261010590925282205482811515610d315760009350610d45565b8160020a9050808360010154166000141593505b50505092915050565b815160019081019055600033600160a060020a03166006825b505550600160a060020a033316600090815261010560205260408120600190558181555b825181101561044b57828181518110156100005790602001906020020151600160a060020a0316600582600201610100811015610000570160005b5081905550806002016101056000858481518110156100005790602001906020020151600160a060020a03168152602001908152602001600020819055505b600101610d8b565b5b505050565b600036604051808383808284378201915050925050506040518091039020610e3a81610f69565b1561059f5781600160a060020a0316ff5b5b5b5050565b610e5b8383610d4e565b61044b8161081e565b5b505050565b6000600036604051808383808284378201915050925050506040518091039020610e9381610f69565b15610c7057610ea183610452565b15610eab57610c70565b600160a060020a038416600090815261010560205260409020549150811515610ed357610c70565b610edb611108565b82600160a060020a0316600583610100811015610000570160005b5055600160a060020a0380851660008181526101056020908152604080832083905593871680835291849020869055835192835282015281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a15b5b5b50505050565b60025481565b600160a060020a033316600090815261010560205260408120548180821515610f91576110fe565b60008581526101066020526040902080549092501515611025576000805483556001808401919091556101078054918201808255828015829011610ffa57600083815260209020610ffa9181019083015b8082111561080857600081556001016107f4565b5090565b5b50505060028301819055610107805487929081101561000057906000526020600020900160005b50555b8260020a905080826001015416600014156110fe5760408051600160a060020a03331681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a18154600190116110eb5760008581526101066020526040902060020154610107805490919081101561000057906000526020600020900160005b5060009081905585815261010660205260408120818155600180820183905560029091019190915593506110fe566110fe565b8154600019018255600182018054821790555b5b5b505050919050565b6101075460005b818110156111855761010781815481101561000057906000526020600020900160005b50541561117c57610106600061010783815481101561000057906000526020600020900160005b505481526020810191909152604001600090812081815560018101829055600201555b5b60010161110f565b610107805460008083559190915261044b907f47c4908e245f386bfc1825973249847f4053a761ddb4880ad63c323a7b5a2a25908101905b8082111561080857600081556001016107f4565b5090565b5b505b5050565b60015b6001548110156104ab575b6001548110801561120c5750600581610100811015610000570160005b505415155b15611219576001016111ea565b5b600160015411801561123e57506005600154610100811015610000570160005b5054155b15611252576001805460001901905561121a565b6001548110801561127657506005600154610100811015610000570160005b505415155b80156112925750600581610100811015610000570160005b5054155b15611302576005600154610100811015610000570160005b5054600582610100811015610000570160005b5055806101056000600583610100811015610000570160005b505481526020019081526020016000208190555060006005600154610100811015610000570160005b50555b6111df565b5b50565b6201518042045b90565b600061132033610452565b1561046e5760045461133061130b565b111561134757600060035561134361130b565b6004555b600354828101108015906113615750600254826003540111155b1561137657506003805482019055600161046e565b5060005b5b5b91905056'; export const walletSourceURL = 'https://github.com/ethcore/parity/blob/63137b15482344ff9df634c086abaabed452eadc/js/src/contracts/snippets/enhanced-wallet.sol'; export const walletLibraryRegKey = 'walletLibrary'; + +// Used if no Wallet Library found in registry... +// Compiled from `wallet.sol` using Solidity v0.4.6 +export const fullWalletCode = '0x606060405234610000576040516113bb3803806113bb83398101604090815281516020830151918301519201915b805b83835b815160019081019055600033600160a060020a03166003825b505550600160a060020a033316600090815261010260205260408120600190555b82518110156100ee57828181518110156100005790602001906020020151600160a060020a0316600282600201610100811015610000570160005b5081905550806002016101026000858481518110156100005790602001906020020151600160a060020a03168152602001908152602001600020819055505b60010161006c565b60008290555b50505061010581905561011264010000000061127861012182021704565b610107555b505b50505061012b565b6201518042045b90565b611282806101396000396000f3606060405236156100da5760e060020a6000350463173825d981146101305780632f54bf6e146101425780634123cb6b1461016657806352375093146101855780635c52c2f5146101a4578063659010e7146101b35780637065cb48146101d2578063746c9171146101e4578063797af62714610203578063b20d30a914610227578063b61d27f614610239578063b75c7dc61461026b578063ba51a6df1461027d578063c2cf73261461028f578063c41a360a146102b6578063cbf0b0c0146102e2578063f00d4b5d146102f4578063f1736d8614610309575b61012e5b600034111561012b5760408051600160a060020a033316815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b5b565b005b346100005761012e600435610328565b005b3461000057610152600435610415565b604080519115158252519081900360200190f35b3461000057610173610436565b60408051918252519081900360200190f35b346100005761017361043c565b60408051918252519081900360200190f35b346100005761012e610443565b005b346100005761017361047b565b60408051918252519081900360200190f35b346100005761012e600435610482565b005b3461000057610173610571565b60408051918252519081900360200190f35b3461000057610152600435610577565b604080519115158252519081900360200190f35b346100005761012e6004356107e3565b005b34610000576101736004803590602480359160443591820191013561081c565b60408051918252519081900360200190f35b346100005761012e600435610ab3565b005b346100005761012e600435610b5e565b005b3461000057610152600435602435610be0565b604080519115158252519081900360200190f35b34610000576102c6600435610c35565b60408051600160a060020a039092168252519081900360200190f35b346100005761012e600435610c55565b005b346100005761012e600435602435610c93565b005b3461000057610173610d8c565b60408051918252519081900360200190f35b600060003660405180838380828437820191505092505050604051809103902061035181610d93565b1561040e57600160a060020a03831660009081526101026020526040902054915081151561037e5761040e565b60016001540360005411156103925761040e565b6000600283610100811015610000570160005b5055600160a060020a038316600090815261010260205260408120556103c9610f32565b6103d1611002565b60408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a15b5b5b505050565b600160a060020a03811660009081526101026020526040812054115b919050565b60015481565b6101075481565b60003660405180838380828437820191505092505050604051809103902061046a81610d93565b15610476576000610106555b5b5b50565b6101065481565b6000366040518083838082843782019150509250505060405180910390206104a981610d93565b1561056b576104b782610415565b156104c15761056b565b6104c9610f32565b60015460fa90106104dc576104dc611002565b5b60015460fa90106104ed5761056b565b60018054810190819055600160a060020a03831690600290610100811015610000570160005b5055600154600160a060020a03831660008181526101026020908152604091829020939093558051918252517f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3929181900390910190a15b5b5b5050565b60005481565b60008161058381610d93565b156107da5760008381526101086020526040902054600160a060020a0316156107da5760008381526101086020526040908190208054600180830154935160029384018054600160a060020a0390941695949093919283928592918116156101000260001901160480156106385780601f1061060d57610100808354040283529160200191610638565b820191906000526020600020905b81548152906001019060200180831161061b57829003601f168201915b505091505060006040518083038185876185025a03f15050506000848152610108602090815260409182902060018082015482548551600160a060020a033381811683529682018c905296810183905295166060860181905260a06080870181815260029586018054958616156101000260001901909516959095049087018190527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a95929491939290919060c08301908490801561073d5780601f106107125761010080835404028352916020019161073d565b820191906000526020600020905b81548152906001019060200180831161072057829003601f168201915b5050965050505050505060405180910390a16000838152610108602052604081208054600160a060020a0319168155600180820183905560028083018054858255939493909281161561010002600019011604601f81901061079f57506107d1565b601f0160209004906000526020600020908101906107d191905b808211156107cd57600081556001016107b9565b5090565b5b505050600191505b5b5b5b50919050565b60003660405180838380828437820191505092505050604051809103902061080a81610d93565b1561056b576101058290555b5b5b5050565b600061082733610415565b15610aa85761083584611131565b156108f3577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00433858786866040518086600160a060020a0316815260200185815260200184600160a060020a0316815260200180602001828103825284848281815260200192508082843760405192018290039850909650505050505050a184600160a060020a03168484846040518083838082843782019150509250505060006040518083038185876185025a03f15060009350610aa892505050565b6000364360405180848480828437820191505082815260200193505050506040518091039020905061092481610577565b158015610947575060008181526101086020526040902054600160a060020a0316155b15610aa857600081815261010860209081526040822080546c01000000000000000000000000808a0204600160a060020a0319909116178155600180820188905560029182018054818652948490209094601f928116156101000260001901169290920481019290920481019185919087908390106109d15782800160ff198235161785556109fe565b828001600101855582156109fe579182015b828111156109fe5782358255916020019190600101906109e3565b5b50610a1f9291505b808211156107cd57600081556001016107b9565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32813386888787604051808760001916815260200186600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284376040519201829003995090975050505050505050a15b5b5b5b949350505050565b600160a060020a033316600090815261010260205260408120549080821515610adb57610b57565b50506000828152610103602052604081206001810154600284900a929083161115610b575780546001908101825581018054839003905560408051600160a060020a03331681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b5b50505050565b600036604051808383808284378201915050925050506040518091039020610b8581610d93565b1561056b57600154821115610b995761056b565b6000829055610ba6610f32565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15b5b5b5050565b600082815261010360209081526040808320600160a060020a038516845261010290925282205482811515610c185760009350610c2c565b8160020a9050808360010154166000141593505b50505092915050565b6000600282600101610100811015610000570160005b505490505b919050565b600036604051808383808284378201915050925050506040518091039020610c7c81610d93565b1561056b5781600160a060020a0316ff5b5b5b5050565b6000600036604051808383808284378201915050925050506040518091039020610cbc81610d93565b15610b5757610cca83610415565b15610cd457610b57565b600160a060020a038416600090815261010260205260409020549150811515610cfc57610b57565b610d04610f32565b82600160a060020a0316600283610100811015610000570160005b5055600160a060020a0380851660008181526101026020908152604080832083905593871680835291849020869055835192835282015281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a15b5b5b50505050565b6101055481565b600160a060020a033316600090815261010260205260408120548180821515610dbb57610f28565b60008581526101036020526040902080549092501515610e4f576000805483556001808401919091556101048054918201808255828015829011610e2457600083815260209020610e249181019083015b808211156107cd57600081556001016107b9565b5090565b5b50505060028301819055610104805487929081101561000057906000526020600020900160005b50555b8260020a90508082600101541660001415610f285760408051600160a060020a03331681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610f155760008581526101036020526040902060020154610104805490919081101561000057906000526020600020900160005b506000908190558581526101036020526040812081815560018082018390556002909101919091559350610f2856610f28565b8154600019018255600182018054821790555b5b5b505050919050565b6101045460005b81811015610ff557610108600061010483815481101561000057906000526020600020900160005b50548152602081019190915260400160009081208054600160a060020a0319168155600180820183905560028083018054858255939493909281161561010002600019011604601f819010610fb65750610fe8565b601f016020900490600052602060002090810190610fe891905b808211156107cd57600081556001016107b9565b5090565b5b5050505b600101610f39565b61056b6111a4565b5b5050565b60015b600154811015610476575b600154811080156110325750600281610100811015610000570160005b505415155b1561103f57600101611010565b5b600160015411801561106457506002600154610100811015610000570160005b5054155b156110785760018054600019019055611040565b6001548110801561109c57506002600154610100811015610000570160005b505415155b80156110b85750600281610100811015610000570160005b5054155b15611128576002600154610100811015610000570160005b5054600282610100811015610000570160005b5055806101026000600283610100811015610000570160005b505481526020019081526020016000208190555060006002600154610100811015610000570160005b50555b611005565b5b50565b600061113c33610415565b15610431576101075461114d611278565b111561116657600061010655611161611278565b610107555b610106548281011080159061118357506101055482610106540111155b1561119957506101068054820190556001610431565b5060005b5b5b919050565b6101045460005b818110156112215761010481815481101561000057906000526020600020900160005b50541561121857610103600061010483815481101561000057906000526020600020900160005b505481526020810191909152604001600090812081815560018101829055600201555b5b6001016111ab565b610104805460008083559190915261040e907f4c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe908101905b808211156107cd57600081556001016107b9565b5090565b5b505b5050565b6201518042045b9056'; diff --git a/js/src/modals/CreateWallet/createWalletStore.js b/js/src/modals/CreateWallet/createWalletStore.js index e6edab56b..7f516eb25 100644 --- a/js/src/modals/CreateWallet/createWalletStore.js +++ b/js/src/modals/CreateWallet/createWalletStore.js @@ -23,7 +23,7 @@ import Contract from '~/api/contract'; import Contracts from '~/contracts'; import { wallet as walletAbi } from '~/contracts/abi'; import { wallet as walletCode } from '~/contracts/code'; -import { walletLibraryRegKey } from '~/contracts/code/wallet'; +import { walletLibraryRegKey, fullWalletCode } from '~/contracts/code/wallet'; import WalletsUtils from '~/util/wallets'; @@ -167,8 +167,10 @@ export default class CreateWalletStore { .registry .lookupAddress(walletLibraryRegKey) .then((address) => { - const walletLibraryAddress = address.replace(/^0x/, '').toLowerCase(); - const code = walletCode.replace(/(_)+WalletLibrary(_)+/g, walletLibraryAddress); + const walletLibraryAddress = (address || '').replace(/^0x/, '').toLowerCase(); + const code = walletLibraryAddress.length && !/^0+$/.test(walletLibraryAddress) + ? walletCode.replace(/(_)+WalletLibrary(_)+/g, walletLibraryAddress) + : fullWalletCode; const options = { data: code, From ff11634e1d4e2c0dc7945719c40f7d1952d9439e Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Fri, 9 Dec 2016 16:55:43 +0100 Subject: [PATCH 045/131] PR Grumble --- js/src/modals/CreateWallet/createWalletStore.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/src/modals/CreateWallet/createWalletStore.js b/js/src/modals/CreateWallet/createWalletStore.js index 5e6e8a81a..3edf8f638 100644 --- a/js/src/modals/CreateWallet/createWalletStore.js +++ b/js/src/modals/CreateWallet/createWalletStore.js @@ -20,8 +20,7 @@ import Contract from '~/api/contract'; import Contracts from '~/contracts'; import { ERROR_CODES } from '~/api/transport/error'; import { wallet as walletAbi } from '~/contracts/abi'; -import { wallet as walletCode } from '~/contracts/code'; -import { walletLibraryRegKey, fullWalletCode } from '~/contracts/code/wallet'; +import { wallet as walletCode, walletLibraryRegKey, fullWalletCode } from '~/contracts/code/wallet'; import { validateUint, validateAddress, validateName } from '~/util/validation'; import WalletsUtils from '~/util/wallets'; From ffd8314a115b49c9dc7eeff582bd480fbaec0a8e Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jacogr@gmail.com> Date: Fri, 9 Dec 2016 17:52:25 +0100 Subject: [PATCH 046/131] Be lenient around invalid owners map (#3764) * Be lenient around invalid owners map * Filter invalid owners before render --- js/src/views/Accounts/Summary/summary.js | 6 ++++-- js/src/views/Accounts/accounts.js | 18 +++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/js/src/views/Accounts/Summary/summary.js b/js/src/views/Accounts/Summary/summary.js index 764f24edf..aeff8a2e5 100644 --- a/js/src/views/Accounts/Summary/summary.js +++ b/js/src/views/Accounts/Summary/summary.js @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. +import BigNumber from 'bignumber.js'; import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; import { isEqual } from 'lodash'; @@ -113,15 +114,16 @@ export default class Summary extends Component { renderOwners () { const { owners } = this.props; + const ownersValid = (owners || []).filter((owner) => owner.address && new BigNumber(owner.address).gt(0)); - if (!owners || owners.length === 0) { + if (!ownersValid || ownersValid.length === 0) { return null; } return ( <div className={ styles.owners }> { - owners.map((owner) => ( + ownersValid.map((owner) => ( <div key={ owner.address }> <div data-tip diff --git a/js/src/views/Accounts/accounts.js b/js/src/views/Accounts/accounts.js index 4383b7662..a844ae989 100644 --- a/js/src/views/Accounts/accounts.js +++ b/js/src/views/Accounts/accounts.js @@ -293,13 +293,17 @@ function mapStateToProps (state) { const walletsOwners = Object .keys(walletsInfo) - .map((wallet) => ({ - owners: walletsInfo[wallet].owners.map((owner) => ({ - address: owner, - name: accountsInfo[owner] && accountsInfo[owner].name || owner - })), - address: wallet - })) + .map((wallet) => { + const owners = walletsInfo[wallet].owners || []; + + return { + owners: owners.map((owner) => ({ + address: owner, + name: accountsInfo[owner] && accountsInfo[owner].name || owner + })), + address: wallet + }; + }) .reduce((walletsOwners, wallet) => { walletsOwners[wallet.address] = wallet.owners; return walletsOwners; From fd23a2972c08455c61fc83e6af80407ee4429a88 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Fri, 9 Dec 2016 17:00:59 +0000 Subject: [PATCH 047/131] [ci skip] js-precompiled 20161209-165845 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d0664d801..675d94ec4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1271,7 +1271,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#8e8e515f958d2d4a5abec07253a51a052f2b744d" +source = "git+https://github.com/ethcore/js-precompiled.git#b8e8e9a8482a51b9a86bb841674f71aca1e57934" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index ab501f6a7..77c9686a5 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.103", + "version": "0.2.104", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 1b0945940bb4e2162577696167aeb0b4b9745f18 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 18:14:05 +0100 Subject: [PATCH 048/131] Test for boolean result before unsubscribe --- js/src/api/contract/contract.js | 2 +- js/src/api/subscriptions/manager.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index 873dac38c..58dd62e7b 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -325,7 +325,7 @@ export default class Contract { console.warn('_sendData', subscriptionId, error); } - if (autoRemove && !result) { + if (autoRemove && !result && typeof result === 'boolean') { this.unsubscribe(subscriptionId); } } diff --git a/js/src/api/subscriptions/manager.js b/js/src/api/subscriptions/manager.js index a2716684b..f1afe685a 100644 --- a/js/src/api/subscriptions/manager.js +++ b/js/src/api/subscriptions/manager.js @@ -111,7 +111,7 @@ export default class Manager { console.error(`Unable to update callback for subscriptionId ${subscriptionId}`, error); } - if (autoRemove && !result) { + if (autoRemove && !result && typeof result === 'boolean') { this.unsubscribe(subscriptionId); } } From 0cbef3050893f3b577cd995cbb7d0dc9304dea2a Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Fri, 9 Dec 2016 18:17:31 +0100 Subject: [PATCH 049/131] Unsubscribe on true --- js/src/api/contract/contract.js | 4 ++-- js/src/api/subscriptions/manager.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index 58dd62e7b..bfe7cabc4 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -317,7 +317,7 @@ export default class Contract { _sendData (subscriptionId, error, logs) { const { autoRemove, callback } = this._subscriptions[subscriptionId]; - let result = false; + let result = true; try { result = callback(error, logs); @@ -325,7 +325,7 @@ export default class Contract { console.warn('_sendData', subscriptionId, error); } - if (autoRemove && !result && typeof result === 'boolean') { + if (autoRemove && result && typeof result === 'boolean') { this.unsubscribe(subscriptionId); } } diff --git a/js/src/api/subscriptions/manager.js b/js/src/api/subscriptions/manager.js index f1afe685a..25e6e6129 100644 --- a/js/src/api/subscriptions/manager.js +++ b/js/src/api/subscriptions/manager.js @@ -103,7 +103,7 @@ export default class Manager { _sendData (subscriptionId, error, data) { const { autoRemove, callback } = this.subscriptions[subscriptionId]; - let result = false; + let result = true; try { result = callback(error, data); @@ -111,7 +111,7 @@ export default class Manager { console.error(`Unable to update callback for subscriptionId ${subscriptionId}`, error); } - if (autoRemove && !result && typeof result === 'boolean') { + if (autoRemove && result && typeof result === 'boolean') { this.unsubscribe(subscriptionId); } } From d5d9d78bd974e1b2ba1dc3da798ed9f7f10b50b6 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Fri, 9 Dec 2016 18:58:37 +0100 Subject: [PATCH 050/131] It's not either-or. --- .gitlab-ci.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14f7b41e6..55d143a47 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -422,13 +422,14 @@ test-rust-stable: image: ethcore/rust:stable before_script: - git submodule update --init --recursive + - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep \.rs | wc -l) - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep \.js | wc -l) - - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test"; else ./js/scripts/install-deps.sh;fi + - echo "rust/js modified: $RUST_FILES_MODIFIED / $JS_FILES_MODIFIED" + - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - export RUST_BACKTRACE=1 - - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test" && ./test.sh $CARGOFLAGS; else echo "skip rust test" && ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi + - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi + - if [ "$RUST_FILES_MODIFIED" = 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi tags: - rust - rust-stable @@ -439,11 +440,11 @@ js-test: - git submodule update --init --recursive - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep \.js | wc -l) - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test"; else ./js/scripts/install-deps.sh;fi + - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - export RUST_BACKTRACE=1 - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test"; else echo "skip rust test" && ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi + - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi tags: - rust - rust-stable @@ -486,9 +487,9 @@ js-release: before_script: - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep \.js | wc -l) - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js build"; else ./js/scripts/install-deps.sh;fi + - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js build"; else ./js/scripts/build.sh && ./js/scripts/release.sh; fi + - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS rebuild since no JS files modified."; else ./js/scripts/build.sh && ./js/scripts/release.sh; fi tags: - javascript From 5758bb7cac23ede07217601e014c17013c41934b Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan <arkady.paronyan@gmail.com> Date: Fri, 9 Dec 2016 19:11:00 +0100 Subject: [PATCH 051/131] Rust files are all non-js files --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55d143a47..e78eabb18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -422,7 +422,7 @@ test-rust-stable: image: ethcore/rust:stable before_script: - git submodule update --init --recursive - - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep \.rs | wc -l) + - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v \.js | wc -l) - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep \.js | wc -l) - echo "rust/js modified: $RUST_FILES_MODIFIED / $JS_FILES_MODIFIED" - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi From cf0b1bb9b2a1c73e81f178c919e14816daffde37 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Fri, 9 Dec 2016 19:21:39 +0100 Subject: [PATCH 052/131] use path prefix --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e78eabb18..d27b58f9a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -422,8 +422,8 @@ test-rust-stable: image: ethcore/rust:stable before_script: - git submodule update --init --recursive - - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v \.js | wc -l) - - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep \.js | wc -l) + - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v ^js/ | wc -l) + - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - echo "rust/js modified: $RUST_FILES_MODIFIED / $JS_FILES_MODIFIED" - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: @@ -438,7 +438,7 @@ js-test: image: ethcore/rust:stable before_script: - git submodule update --init --recursive - - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep \.js | wc -l) + - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - echo $JS_FILES_MODIFIED - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: @@ -485,7 +485,7 @@ js-release: - stable image: ethcore/rust:stable before_script: - - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep \.js | wc -l) + - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - echo $JS_FILES_MODIFIED - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: From 647b62b4a2a2b2692e171fca30ccd00bf50c77e9 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Fri, 9 Dec 2016 18:23:46 +0000 Subject: [PATCH 053/131] [ci skip] js-precompiled 20161209-182130 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 675d94ec4..58d3e1286 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1271,7 +1271,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#b8e8e9a8482a51b9a86bb841674f71aca1e57934" +source = "git+https://github.com/ethcore/js-precompiled.git#3d3b2f9e8e8b0fd62c172240bfd001a317cf2979" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 77c9686a5..404a625b5 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.104", + "version": "0.2.105", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From c91a614c3dd5503a7a8c52b01671fc9422ee3108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Fri, 9 Dec 2016 20:24:33 +0100 Subject: [PATCH 054/131] Fixing tests --- ethcore/src/miner/transaction_queue.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index 03a9da8e3..b4cc93a9c 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -769,6 +769,11 @@ impl TransactionQueue { return; } + self.remove_all_internal(sender, client_nonce); + } + + /// Always updates future and moves transactions from current to future. + fn remove_all_internal(&mut self, sender: Address, client_nonce: U256) { // We will either move transaction to future or remove it completely // so there will be no transactions from this sender in current self.last_nonces.remove(&sender); @@ -878,7 +883,7 @@ impl TransactionQueue { if order.is_some() { // This will keep consistency in queue // Moves all to future and then promotes a batch from current: - self.remove_all(sender, current_nonce); + self.remove_all_internal(sender, current_nonce); assert_eq!(self.future.by_priority.len() + self.current.by_priority.len(), self.by_hash.len()); return; } From 97f358ced92898484b262c6901c7196a8f3acef2 Mon Sep 17 00:00:00 2001 From: arkpar <arkady.paronyan@gmail.com> Date: Tue, 6 Dec 2016 19:23:15 +0100 Subject: [PATCH 055/131] AuthorityRound network simulation test --- Cargo.lock | 2 + ethcore/res/authority_round.json | 3 +- ethcore/src/client/client.rs | 12 +- ethcore/src/client/test_client.rs | 4 +- ethcore/src/engines/authority_round.rs | 27 ++-- ethcore/src/engines/mod.rs | 2 + ethcore/src/spec/spec.rs | 2 +- json/src/spec/authority_round.rs | 7 +- sync/Cargo.toml | 2 + sync/src/lib.rs | 3 + sync/src/tests/chain.rs | 96 +++++++------- sync/src/tests/consensus.rs | 78 +++++++++++ sync/src/tests/helpers.rs | 171 +++++++++++++++++++------ sync/src/tests/mod.rs | 1 + sync/src/tests/snapshot.rs | 2 +- 15 files changed, 311 insertions(+), 101 deletions(-) create mode 100644 sync/src/tests/consensus.rs diff --git a/Cargo.lock b/Cargo.lock index 675d94ec4..5fa56cb26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -660,12 +660,14 @@ dependencies = [ "clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.5.0", + "ethcore-devtools 1.5.0", "ethcore-io 1.5.0", "ethcore-ipc 1.5.0", "ethcore-ipc-codegen 1.5.0", "ethcore-ipc-nano 1.5.0", "ethcore-network 1.5.0", "ethcore-util 1.5.0", + "ethkey 0.2.0", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ethcore/res/authority_round.json b/ethcore/res/authority_round.json index a0f88b85b..85beb51b4 100644 --- a/ethcore/res/authority_round.json +++ b/ethcore/res/authority_round.json @@ -4,7 +4,8 @@ "AuthorityRound": { "params": { "gasLimitBoundDivisor": "0x0400", - "stepDuration": "1", + "stepDuration": 1, + "startStep": 2, "authorities" : [ "0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e", "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 21c5a2366..3ed6579c5 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -255,6 +255,11 @@ impl Client { self.notify.write().push(Arc::downgrade(&target)); } + /// Returns engine reference. + pub fn engine(&self) -> &Engine { + &*self.engine + } + fn notify<F>(&self, f: F) where F: Fn(&ChainNotify) { for np in self.notify.read().iter() { if let Some(n) = np.upgrade() { @@ -563,6 +568,11 @@ impl Client { results.len() } + /// Get shared miner reference. + pub fn miner(&self) -> Arc<Miner> { + self.miner.clone() + } + /// Used by PoA to try sealing on period change. pub fn update_sealing(&self) { self.miner.update_sealing(self) @@ -1433,4 +1443,4 @@ mod tests { assert!(client.tree_route(&genesis, &new_hash).is_none()); } -} \ No newline at end of file +} diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index dd00db7ec..8950a9e5c 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -255,7 +255,7 @@ impl TestBlockChainClient { } /// Make a bad block by setting invalid extra data. - pub fn corrupt_block(&mut self, n: BlockNumber) { + pub fn corrupt_block(&self, n: BlockNumber) { let hash = self.block_hash(BlockID::Number(n)).unwrap(); let mut header: BlockHeader = decode(&self.block_header(BlockID::Number(n)).unwrap()); header.set_extra_data(b"This extra data is way too long to be considered valid".to_vec()); @@ -267,7 +267,7 @@ impl TestBlockChainClient { } /// Make a bad block by setting invalid parent hash. - pub fn corrupt_block_parent(&mut self, n: BlockNumber) { + pub fn corrupt_block_parent(&self, n: BlockNumber) { let hash = self.block_hash(BlockID::Number(n)).unwrap(); let mut header: BlockHeader = decode(&self.block_header(BlockID::Number(n)).unwrap()); header.set_parent_hash(H256::from(42)); diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs index f632c9382..21a6e4761 100644 --- a/ethcore/src/engines/authority_round.rs +++ b/ethcore/src/engines/authority_round.rs @@ -49,6 +49,8 @@ pub struct AuthorityRoundParams { pub authorities: Vec<Address>, /// Number of authorities. pub authority_n: usize, + /// Starting step, + pub start_step: Option<u64>, } impl From<ethjson::spec::AuthorityRoundParams> for AuthorityRoundParams { @@ -58,6 +60,7 @@ impl From<ethjson::spec::AuthorityRoundParams> for AuthorityRoundParams { step_duration: Duration::from_secs(p.step_duration.into()), authority_n: p.authorities.len(), authorities: p.authorities.into_iter().map(Into::into).collect::<Vec<_>>(), + start_step: p.start_step.map(Into::into), } } } @@ -97,7 +100,7 @@ impl AsMillis for Duration { impl AuthorityRound { /// Create a new instance of AuthorityRound engine. pub fn new(params: CommonParams, our_params: AuthorityRoundParams, builtins: BTreeMap<Address, Builtin>) -> Result<Arc<Self>, Error> { - let initial_step = (unix_now().as_secs() / our_params.step_duration.as_secs()) as usize; + let initial_step = our_params.start_step.unwrap_or_else(|| (unix_now().as_secs() / our_params.step_duration.as_secs())) as usize; let engine = Arc::new( AuthorityRound { params: params, @@ -160,14 +163,7 @@ impl IoHandler<()> for TransitionHandler { fn timeout(&self, io: &IoContext<()>, timer: TimerToken) { if timer == ENGINE_TIMEOUT_TOKEN { if let Some(engine) = self.engine.upgrade() { - engine.step.fetch_add(1, AtomicOrdering::SeqCst); - engine.proposed.store(false, AtomicOrdering::SeqCst); - if let Some(ref channel) = *engine.message_channel.lock() { - match channel.send(ClientIoMessage::UpdateSealing) { - Ok(_) => trace!(target: "poa", "timeout: UpdateSealing message sent for step {}.", engine.step.load(AtomicOrdering::Relaxed)), - Err(err) => trace!(target: "poa", "timeout: Could not send a sealing message {} for step {}.", err, engine.step.load(AtomicOrdering::Relaxed)), - } - } + engine.step(); io.register_timer_once(ENGINE_TIMEOUT_TOKEN, engine.remaining_step_duration().as_millis()) .unwrap_or_else(|e| warn!(target: "poa", "Failed to restart consensus step timer: {}.", e)) } @@ -184,6 +180,17 @@ impl Engine for AuthorityRound { fn params(&self) -> &CommonParams { &self.params } fn builtins(&self) -> &BTreeMap<Address, Builtin> { &self.builtins } + fn step(&self) { + self.step.fetch_add(1, AtomicOrdering::SeqCst); + self.proposed.store(false, AtomicOrdering::SeqCst); + if let Some(ref channel) = *self.message_channel.lock() { + match channel.send(ClientIoMessage::UpdateSealing) { + Ok(_) => trace!(target: "poa", "timeout: UpdateSealing message sent for step {}.", self.step.load(AtomicOrdering::Relaxed)), + Err(err) => trace!(target: "poa", "timeout: Could not send a sealing message {} for step {}.", err, self.step.load(AtomicOrdering::Relaxed)), + } + } + } + /// Additional engine-specific information for the user/developer concerning `header`. fn extra_info(&self, header: &Header) -> BTreeMap<String, String> { map![ @@ -235,6 +242,8 @@ impl Engine for AuthorityRound { } else { warn!(target: "poa", "generate_seal: FAIL: Accounts not provided."); } + } else { + trace!(target: "poa", "generate_seal: Not a proposer for step {}.", step); } None } diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index d7ff06248..8e407f0b7 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -160,4 +160,6 @@ pub trait Engine : Sync + Send { /// Add an account provider useful for Engines that sign stuff. fn register_account_provider(&self, _account_provider: Arc<AccountProvider>) {} + /// Trigger next step of the consensus engine. + fn step(&self) {} } diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index c9ae087c0..e14ea3949 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -273,7 +273,7 @@ impl Spec { pub fn new_instant() -> Spec { load_bundled!("instant_seal") } /// Create a new Spec with AuthorityRound consensus which does internal sealing (not requiring work). - /// Accounts with secrets "1".sha3() and "2".sha3() are the authorities. + /// Accounts with secrets "0".sha3() and "1".sha3() are the authorities. pub fn new_test_round() -> Self { load_bundled!("authority_round") } } diff --git a/json/src/spec/authority_round.rs b/json/src/spec/authority_round.rs index 3d73ef1ef..bae17bb24 100644 --- a/json/src/spec/authority_round.rs +++ b/json/src/spec/authority_round.rs @@ -30,6 +30,10 @@ pub struct AuthorityRoundParams { pub step_duration: Uint, /// Valid authorities pub authorities: Vec<Address>, + /// Starting step. Determined automatically if not specified. + /// To be used for testing only. + #[serde(rename="startStep")] + pub start_step: Option<Uint>, } /// Authority engine deserialization. @@ -50,7 +54,8 @@ mod tests { "params": { "gasLimitBoundDivisor": "0x0400", "stepDuration": "0x02", - "authorities" : ["0xc6d9d2cd449a754c494264e1809c50e34d64562b"] + "authorities" : ["0xc6d9d2cd449a754c494264e1809c50e34d64562b"], + "startStep" : 24 } }"#; diff --git a/sync/Cargo.toml b/sync/Cargo.toml index 738f5f55c..d7980f0d9 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -26,6 +26,8 @@ heapsize = "0.3" ethcore-ipc = { path = "../ipc/rpc" } semver = "0.2" ethcore-ipc-nano = { path = "../ipc/nano" } +ethcore-devtools = { path = "../devtools" } +ethkey = { path = "../ethkey" } parking_lot = "0.3" [features] diff --git a/sync/src/lib.rs b/sync/src/lib.rs index 2061e4e3a..ced4c3f52 100644 --- a/sync/src/lib.rs +++ b/sync/src/lib.rs @@ -37,6 +37,9 @@ extern crate semver; extern crate parking_lot; extern crate rlp; +#[cfg(test)] extern crate ethcore_devtools as devtools; +#[cfg(test)] extern crate ethkey; + #[macro_use] extern crate log; #[macro_use] diff --git a/sync/src/tests/chain.rs b/sync/src/tests/chain.rs index 7705215f5..361d53e29 100644 --- a/sync/src/tests/chain.rs +++ b/sync/src/tests/chain.rs @@ -24,8 +24,8 @@ use SyncConfig; fn two_peers() { ::env_logger::init().ok(); let mut net = TestNet::new(3); - net.peer_mut(1).chain.add_blocks(1000, EachBlockWith::Uncle); - net.peer_mut(2).chain.add_blocks(1000, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(1000, EachBlockWith::Uncle); + net.peer(2).chain.add_blocks(1000, EachBlockWith::Uncle); net.sync(); assert!(net.peer(0).chain.block(BlockID::Number(1000)).is_some()); assert_eq!(*net.peer(0).chain.blocks.read(), *net.peer(1).chain.blocks.read()); @@ -35,7 +35,7 @@ fn two_peers() { fn long_chain() { ::env_logger::init().ok(); let mut net = TestNet::new(2); - net.peer_mut(1).chain.add_blocks(50000, EachBlockWith::Nothing); + net.peer(1).chain.add_blocks(50000, EachBlockWith::Nothing); net.sync(); assert!(net.peer(0).chain.block(BlockID::Number(50000)).is_some()); assert_eq!(*net.peer(0).chain.blocks.read(), *net.peer(1).chain.blocks.read()); @@ -45,8 +45,8 @@ fn long_chain() { fn status_after_sync() { ::env_logger::init().ok(); let mut net = TestNet::new(3); - net.peer_mut(1).chain.add_blocks(1000, EachBlockWith::Uncle); - net.peer_mut(2).chain.add_blocks(1000, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(1000, EachBlockWith::Uncle); + net.peer(2).chain.add_blocks(1000, EachBlockWith::Uncle); net.sync(); let status = net.peer(0).sync.read().status(); assert_eq!(status.state, SyncState::Idle); @@ -55,8 +55,8 @@ fn status_after_sync() { #[test] fn takes_few_steps() { let mut net = TestNet::new(3); - net.peer_mut(1).chain.add_blocks(100, EachBlockWith::Uncle); - net.peer_mut(2).chain.add_blocks(100, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(100, EachBlockWith::Uncle); + net.peer(2).chain.add_blocks(100, EachBlockWith::Uncle); let total_steps = net.sync(); assert!(total_steps < 20); } @@ -67,8 +67,8 @@ fn empty_blocks() { let mut net = TestNet::new(3); for n in 0..200 { let with = if n % 2 == 0 { EachBlockWith::Nothing } else { EachBlockWith::Uncle }; - net.peer_mut(1).chain.add_blocks(5, with.clone()); - net.peer_mut(2).chain.add_blocks(5, with); + net.peer(1).chain.add_blocks(5, with.clone()); + net.peer(2).chain.add_blocks(5, with); } net.sync(); assert!(net.peer(0).chain.block(BlockID::Number(1000)).is_some()); @@ -79,14 +79,14 @@ fn empty_blocks() { fn forked() { ::env_logger::init().ok(); let mut net = TestNet::new(3); - net.peer_mut(0).chain.add_blocks(30, EachBlockWith::Uncle); - net.peer_mut(1).chain.add_blocks(30, EachBlockWith::Uncle); - net.peer_mut(2).chain.add_blocks(30, EachBlockWith::Uncle); - net.peer_mut(0).chain.add_blocks(10, EachBlockWith::Nothing); //fork - net.peer_mut(1).chain.add_blocks(20, EachBlockWith::Uncle); - net.peer_mut(2).chain.add_blocks(20, EachBlockWith::Uncle); - net.peer_mut(1).chain.add_blocks(10, EachBlockWith::Uncle); //fork between 1 and 2 - net.peer_mut(2).chain.add_blocks(1, EachBlockWith::Nothing); + net.peer(0).chain.add_blocks(30, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(30, EachBlockWith::Uncle); + net.peer(2).chain.add_blocks(30, EachBlockWith::Uncle); + net.peer(0).chain.add_blocks(10, EachBlockWith::Nothing); //fork + net.peer(1).chain.add_blocks(20, EachBlockWith::Uncle); + net.peer(2).chain.add_blocks(20, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(10, EachBlockWith::Uncle); //fork between 1 and 2 + net.peer(2).chain.add_blocks(1, EachBlockWith::Nothing); // peer 1 has the best chain of 601 blocks let peer1_chain = net.peer(1).chain.numbers.read().clone(); net.sync(); @@ -102,12 +102,12 @@ fn forked_with_misbehaving_peer() { let mut net = TestNet::new(3); // peer 0 is on a totally different chain with higher total difficulty net.peer_mut(0).chain = TestBlockChainClient::new_with_extra_data(b"fork".to_vec()); - net.peer_mut(0).chain.add_blocks(50, EachBlockWith::Nothing); - net.peer_mut(1).chain.add_blocks(10, EachBlockWith::Nothing); - net.peer_mut(2).chain.add_blocks(10, EachBlockWith::Nothing); + net.peer(0).chain.add_blocks(50, EachBlockWith::Nothing); + net.peer(1).chain.add_blocks(10, EachBlockWith::Nothing); + net.peer(2).chain.add_blocks(10, EachBlockWith::Nothing); - net.peer_mut(1).chain.add_blocks(10, EachBlockWith::Nothing); - net.peer_mut(2).chain.add_blocks(20, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(10, EachBlockWith::Nothing); + net.peer(2).chain.add_blocks(20, EachBlockWith::Uncle); // peer 1 should sync to peer 2, others should not change let peer0_chain = net.peer(0).chain.numbers.read().clone(); let peer2_chain = net.peer(2).chain.numbers.read().clone(); @@ -124,13 +124,13 @@ fn net_hard_fork() { ref_client.add_blocks(50, EachBlockWith::Uncle); { let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockID::Number(50)).unwrap()))); - net.peer_mut(0).chain.add_blocks(100, EachBlockWith::Uncle); + net.peer(0).chain.add_blocks(100, EachBlockWith::Uncle); net.sync(); assert_eq!(net.peer(1).chain.chain_info().best_block_number, 100); } { let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockID::Number(50)).unwrap()))); - net.peer_mut(0).chain.add_blocks(100, EachBlockWith::Nothing); + net.peer(0).chain.add_blocks(100, EachBlockWith::Nothing); net.sync(); assert_eq!(net.peer(1).chain.chain_info().best_block_number, 0); } @@ -140,8 +140,8 @@ fn net_hard_fork() { fn restart() { ::env_logger::init().ok(); let mut net = TestNet::new(3); - net.peer_mut(1).chain.add_blocks(1000, EachBlockWith::Uncle); - net.peer_mut(2).chain.add_blocks(1000, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(1000, EachBlockWith::Uncle); + net.peer(2).chain.add_blocks(1000, EachBlockWith::Uncle); net.sync(); @@ -166,37 +166,37 @@ fn status_empty() { #[test] fn status_packet() { let mut net = TestNet::new(2); - net.peer_mut(0).chain.add_blocks(100, EachBlockWith::Uncle); - net.peer_mut(1).chain.add_blocks(1, EachBlockWith::Uncle); + net.peer(0).chain.add_blocks(100, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(1, EachBlockWith::Uncle); net.start(); net.sync_step_peer(0); - assert_eq!(1, net.peer(0).queue.len()); - assert_eq!(0x00, net.peer(0).queue[0].packet_id); + assert_eq!(1, net.peer(0).queue.read().len()); + assert_eq!(0x00, net.peer(0).queue.read()[0].packet_id); } #[test] fn propagate_hashes() { let mut net = TestNet::new(6); - net.peer_mut(1).chain.add_blocks(10, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(10, EachBlockWith::Uncle); net.sync(); - net.peer_mut(0).chain.add_blocks(10, EachBlockWith::Uncle); + net.peer(0).chain.add_blocks(10, EachBlockWith::Uncle); net.sync(); net.trigger_chain_new_blocks(0); //first event just sets the marker net.trigger_chain_new_blocks(0); // 5 peers with NewHahses, 4 with blocks - assert_eq!(9, net.peer(0).queue.len()); + assert_eq!(9, net.peer(0).queue.read().len()); let mut hashes = 0; let mut blocks = 0; - for i in 0..net.peer(0).queue.len() { - if net.peer(0).queue[i].packet_id == 0x1 { + for i in 0..net.peer(0).queue.read().len() { + if net.peer(0).queue.read()[i].packet_id == 0x1 { hashes += 1; } - if net.peer(0).queue[i].packet_id == 0x7 { + if net.peer(0).queue.read()[i].packet_id == 0x7 { blocks += 1; } } @@ -207,24 +207,24 @@ fn propagate_hashes() { #[test] fn propagate_blocks() { let mut net = TestNet::new(20); - net.peer_mut(1).chain.add_blocks(10, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(10, EachBlockWith::Uncle); net.sync(); - net.peer_mut(0).chain.add_blocks(10, EachBlockWith::Uncle); + net.peer(0).chain.add_blocks(10, EachBlockWith::Uncle); net.trigger_chain_new_blocks(0); //first event just sets the marker net.trigger_chain_new_blocks(0); - assert!(!net.peer(0).queue.is_empty()); + assert!(!net.peer(0).queue.read().is_empty()); // NEW_BLOCK_PACKET - let blocks = net.peer(0).queue.iter().filter(|p| p.packet_id == 0x7).count(); + let blocks = net.peer(0).queue.read().iter().filter(|p| p.packet_id == 0x7).count(); assert!(blocks > 0); } #[test] fn restart_on_malformed_block() { let mut net = TestNet::new(2); - net.peer_mut(1).chain.add_blocks(10, EachBlockWith::Uncle); - net.peer_mut(1).chain.corrupt_block(6); + net.peer(1).chain.add_blocks(10, EachBlockWith::Uncle); + net.peer(1).chain.corrupt_block(6); net.sync_steps(20); assert_eq!(net.peer(0).chain.chain_info().best_block_number, 5); @@ -233,8 +233,8 @@ fn restart_on_malformed_block() { #[test] fn restart_on_broken_chain() { let mut net = TestNet::new(2); - net.peer_mut(1).chain.add_blocks(10, EachBlockWith::Uncle); - net.peer_mut(1).chain.corrupt_block_parent(6); + net.peer(1).chain.add_blocks(10, EachBlockWith::Uncle); + net.peer(1).chain.corrupt_block_parent(6); net.sync_steps(20); assert_eq!(net.peer(0).chain.chain_info().best_block_number, 5); @@ -243,8 +243,8 @@ fn restart_on_broken_chain() { #[test] fn high_td_attach() { let mut net = TestNet::new(2); - net.peer_mut(1).chain.add_blocks(10, EachBlockWith::Uncle); - net.peer_mut(1).chain.corrupt_block_parent(6); + net.peer(1).chain.add_blocks(10, EachBlockWith::Uncle); + net.peer(1).chain.corrupt_block_parent(6); net.sync_steps(20); assert_eq!(net.peer(0).chain.chain_info().best_block_number, 5); @@ -255,8 +255,8 @@ fn high_td_attach() { fn disconnect_on_unrelated_chain() { ::env_logger::init().ok(); let mut net = TestNet::new(2); - net.peer_mut(0).chain.add_blocks(200, EachBlockWith::Uncle); - net.peer_mut(1).chain.add_blocks(100, EachBlockWith::Nothing); + net.peer(0).chain.add_blocks(200, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(100, EachBlockWith::Nothing); net.sync(); assert_eq!(net.disconnect_events, vec![(0, 0)]); } diff --git a/sync/src/tests/consensus.rs b/sync/src/tests/consensus.rs new file mode 100644 index 000000000..00a036a54 --- /dev/null +++ b/sync/src/tests/consensus.rs @@ -0,0 +1,78 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +use util::*; +use ethcore::client::BlockChainClient; +use ethcore::spec::Spec; +use ethcore::miner::MinerService; +use ethcore::transaction::*; +use ethcore::account_provider::AccountProvider; +use ethkey::KeyPair; +use super::helpers::*; +use SyncConfig; + +#[test] +fn test_authority_round() { + ::env_logger::init().ok(); + + let s1 = KeyPair::from_secret("1".sha3()).unwrap(); + let s2 = KeyPair::from_secret("0".sha3()).unwrap(); + let spec_factory = || { + let spec = Spec::new_test_round(); + let account_provider = AccountProvider::transient_provider(); + account_provider.insert_account(s1.secret().clone(), "").unwrap(); + account_provider.insert_account(s2.secret().clone(), "").unwrap(); + spec.engine.register_account_provider(Arc::new(account_provider)); + spec + }; + let mut net = TestNet::new_with_spec(2, SyncConfig::default(), spec_factory); + let mut net = &mut *net; + // Push transaction to both clients. Only one of them gets lucky to mine a block. + net.peer(0).chain.miner().set_author(s1.address()); + net.peer(0).chain.engine().set_signer(s1.address(), "".to_owned()); + net.peer(1).chain.miner().set_author(s2.address()); + net.peer(1).chain.engine().set_signer(s2.address(), "".to_owned()); + let tx1 = Transaction { + nonce: 0.into(), + gas_price: 0.into(), + gas: 21000.into(), + action: Action::Call(Address::default()), + value: 0.into(), + data: Vec::new(), + }.sign(s1.secret(), None); + // exhange statuses + net.sync_steps(5); + net.peer(0).chain.miner().import_own_transaction(&net.peer(0).chain, tx1).unwrap(); + net.sync(); + assert_eq!(net.peer(0).chain.chain_info().best_block_number, 1); + assert_eq!(net.peer(1).chain.chain_info().best_block_number, 1); + + let tx2 = Transaction { + nonce: 0.into(), + gas_price: 0.into(), + gas: 21000.into(), + action: Action::Call(Address::default()), + value: 0.into(), + data: Vec::new(), + }.sign(s2.secret(), None); + net.peer(1).chain.miner().import_own_transaction(&net.peer(1).chain, tx2).unwrap(); + net.peer(1).chain.engine().step(); + net.peer(1).chain.miner().update_sealing(&net.peer(1).chain); + net.sync(); + assert_eq!(net.peer(0).chain.chain_info().best_block_number, 2); + assert_eq!(net.peer(1).chain.chain_info().best_block_number, 2); +} + diff --git a/sync/src/tests/helpers.rs b/sync/src/tests/helpers.rs index 10c1277a6..d2eed9374 100644 --- a/sync/src/tests/helpers.rs +++ b/sync/src/tests/helpers.rs @@ -17,16 +17,33 @@ use util::*; use network::*; use tests::snapshot::*; -use ethcore::client::{TestBlockChainClient, BlockChainClient}; +use ethcore::client::{TestBlockChainClient, BlockChainClient, Client as EthcoreClient, ClientConfig, ChainNotify}; use ethcore::header::BlockNumber; use ethcore::snapshot::SnapshotService; +use ethcore::spec::Spec; +use ethcore::miner::Miner; +use ethcore::db::NUM_COLUMNS; use sync_io::SyncIo; +use io::IoChannel; use api::WARP_SYNC_PROTOCOL_ID; use chain::ChainSync; use ::SyncConfig; +use devtools::{self, GuardedTempResult}; -pub struct TestIo<'p> { - pub chain: &'p mut TestBlockChainClient, +pub trait FlushingBlockChainClient: BlockChainClient { + fn flush(&self) {} +} + +impl FlushingBlockChainClient for EthcoreClient { + fn flush(&self) { + self.flush_queue(); + } +} + +impl FlushingBlockChainClient for TestBlockChainClient {} + +pub struct TestIo<'p, C> where C: FlushingBlockChainClient, C: 'p { + pub chain: &'p C, pub snapshot_service: &'p TestSnapshotService, pub queue: &'p mut VecDeque<TestPacket>, pub sender: Option<PeerId>, @@ -34,8 +51,8 @@ pub struct TestIo<'p> { overlay: RwLock<HashMap<BlockNumber, Bytes>>, } -impl<'p> TestIo<'p> { - pub fn new(chain: &'p mut TestBlockChainClient, ss: &'p TestSnapshotService, queue: &'p mut VecDeque<TestPacket>, sender: Option<PeerId>) -> TestIo<'p> { +impl<'p, C> TestIo<'p, C> where C: FlushingBlockChainClient, C: 'p { + pub fn new(chain: &'p C, ss: &'p TestSnapshotService, queue: &'p mut VecDeque<TestPacket>, sender: Option<PeerId>) -> TestIo<'p, C> { TestIo { chain: chain, snapshot_service: ss, @@ -47,7 +64,7 @@ impl<'p> TestIo<'p> { } } -impl<'p> SyncIo for TestIo<'p> { +impl<'p, C> SyncIo for TestIo<'p, C> where C: FlushingBlockChainClient, C: 'p { fn disable_peer(&mut self, peer_id: PeerId) { self.disconnect_peer(peer_id); } @@ -99,7 +116,7 @@ impl<'p> SyncIo for TestIo<'p> { } fn protocol_version(&self, protocol: &ProtocolId, peer_id: PeerId) -> u8 { - if protocol == &WARP_SYNC_PROTOCOL_ID { 1 } else { self.eth_protocol_version(peer_id) } + if protocol == &WARP_SYNC_PROTOCOL_ID { 2 } else { self.eth_protocol_version(peer_id) } } fn chain_overlay(&self) -> &RwLock<HashMap<BlockNumber, Bytes>> { @@ -113,31 +130,31 @@ pub struct TestPacket { pub recipient: PeerId, } -pub struct TestPeer { - pub chain: TestBlockChainClient, +pub struct TestPeer<C> where C: FlushingBlockChainClient { + pub chain: C, pub snapshot_service: Arc<TestSnapshotService>, pub sync: RwLock<ChainSync>, - pub queue: VecDeque<TestPacket>, + pub queue: RwLock<VecDeque<TestPacket>>, } -pub struct TestNet { - pub peers: Vec<TestPeer>, +pub struct TestNet<C> where C: FlushingBlockChainClient { + pub peers: Vec<Arc<TestPeer<C>>>, pub started: bool, pub disconnect_events: Vec<(PeerId, PeerId)>, //disconnected (initiated by, to) } -impl TestNet { - pub fn new(n: usize) -> TestNet { +impl TestNet<TestBlockChainClient> { + pub fn new(n: usize) -> TestNet<TestBlockChainClient> { Self::new_with_config(n, SyncConfig::default()) } - pub fn new_with_fork(n: usize, fork: Option<(BlockNumber, H256)>) -> TestNet { + pub fn new_with_fork(n: usize, fork: Option<(BlockNumber, H256)>) -> TestNet<TestBlockChainClient> { let mut config = SyncConfig::default(); config.fork_block = fork; Self::new_with_config(n, config) } - pub fn new_with_config(n: usize, config: SyncConfig) -> TestNet { + pub fn new_with_config(n: usize, config: SyncConfig) -> TestNet<TestBlockChainClient> { let mut net = TestNet { peers: Vec::new(), started: false, @@ -147,31 +164,77 @@ impl TestNet { let chain = TestBlockChainClient::new(); let ss = Arc::new(TestSnapshotService::new()); let sync = ChainSync::new(config.clone(), &chain); - net.peers.push(TestPeer { + net.peers.push(Arc::new(TestPeer { sync: RwLock::new(sync), snapshot_service: ss, chain: chain, - queue: VecDeque::new(), - }); + queue: RwLock::new(VecDeque::new()), + })); } net } +} - pub fn peer(&self, i: usize) -> &TestPeer { +impl TestNet<EthcoreClient> { + pub fn new_with_spec<F>(n: usize, config: SyncConfig, spec_factory: F) -> GuardedTempResult<TestNet<EthcoreClient>> + where F: Fn() -> Spec + { + let mut net = TestNet { + peers: Vec::new(), + started: false, + disconnect_events: Vec::new(), + }; + let dir = devtools::RandomTempPath::new(); + for _ in 0..n { + let mut client_dir = dir.as_path().clone(); + client_dir.push(devtools::random_filename()); + + let db_config = DatabaseConfig::with_columns(NUM_COLUMNS); + + let spec = spec_factory(); + let client = Arc::try_unwrap(EthcoreClient::new( + ClientConfig::default(), + &spec, + client_dir.as_path(), + Arc::new(Miner::with_spec(&spec)), + IoChannel::disconnected(), + &db_config + ).unwrap()).ok().unwrap(); + + let ss = Arc::new(TestSnapshotService::new()); + let sync = ChainSync::new(config.clone(), &client); + let peer = Arc::new(TestPeer { + sync: RwLock::new(sync), + snapshot_service: ss, + chain: client, + queue: RwLock::new(VecDeque::new()), + }); + peer.chain.add_notify(peer.clone()); + net.peers.push(peer); + } + GuardedTempResult::<TestNet<EthcoreClient>> { + _temp: dir, + result: Some(net) + } + } +} + +impl<C> TestNet<C> where C: FlushingBlockChainClient { + pub fn peer(&self, i: usize) -> &TestPeer<C> { &self.peers[i] } - pub fn peer_mut(&mut self, i: usize) -> &mut TestPeer { - &mut self.peers[i] + pub fn peer_mut(&mut self, i: usize) -> &mut TestPeer<C> { + Arc::get_mut(&mut self.peers[i]).unwrap() } pub fn start(&mut self) { for peer in 0..self.peers.len() { for client in 0..self.peers.len() { if peer != client { - let mut p = &mut self.peers[peer]; + let p = &self.peers[peer]; p.sync.write().update_targets(&p.chain); - p.sync.write().on_peer_connected(&mut TestIo::new(&mut p.chain, &p.snapshot_service, &mut p.queue, Some(client as PeerId)), client as PeerId); + p.sync.write().on_peer_connected(&mut TestIo::new(&p.chain, &p.snapshot_service, &mut p.queue.write(), Some(client as PeerId)), client as PeerId); } } } @@ -179,18 +242,20 @@ impl TestNet { pub fn sync_step(&mut self) { for peer in 0..self.peers.len() { - if let Some(packet) = self.peers[peer].queue.pop_front() { + let packet = self.peers[peer].queue.write().pop_front(); + if let Some(packet) = packet { let disconnecting = { - let mut p = &mut self.peers[packet.recipient]; + let p = &self.peers[packet.recipient]; + let mut queue = p.queue.write(); trace!("--- {} -> {} ---", peer, packet.recipient); let to_disconnect = { - let mut io = TestIo::new(&mut p.chain, &p.snapshot_service, &mut p.queue, Some(peer as PeerId)); + let mut io = TestIo::new(&p.chain, &p.snapshot_service, &mut queue, Some(peer as PeerId)); ChainSync::dispatch_packet(&p.sync, &mut io, peer as PeerId, packet.packet_id, &packet.data); io.to_disconnect }; for d in &to_disconnect { // notify this that disconnecting peers are disconnecting - let mut io = TestIo::new(&mut p.chain, &p.snapshot_service, &mut p.queue, Some(*d)); + let mut io = TestIo::new(&p.chain, &p.snapshot_service, &mut queue, Some(*d)); p.sync.write().on_peer_aborting(&mut io, *d); self.disconnect_events.push((peer, *d)); } @@ -198,8 +263,9 @@ impl TestNet { }; for d in &disconnecting { // notify other peers that this peer is disconnecting - let mut p = &mut self.peers[*d]; - let mut io = TestIo::new(&mut p.chain, &p.snapshot_service, &mut p.queue, Some(peer as PeerId)); + let p = &self.peers[*d]; + let mut queue = p.queue.write(); + let mut io = TestIo::new(&p.chain, &p.snapshot_service, &mut queue, Some(peer as PeerId)); p.sync.write().on_peer_aborting(&mut io, peer as PeerId); } } @@ -209,13 +275,17 @@ impl TestNet { } pub fn sync_step_peer(&mut self, peer_num: usize) { - let mut peer = self.peer_mut(peer_num); - peer.sync.write().maintain_sync(&mut TestIo::new(&mut peer.chain, &peer.snapshot_service, &mut peer.queue, None)); + let peer = self.peer(peer_num); + peer.chain.flush(); + let mut queue = peer.queue.write(); + peer.sync.write().maintain_peers(&mut TestIo::new(&peer.chain, &peer.snapshot_service, &mut queue, None)); + peer.sync.write().maintain_sync(&mut TestIo::new(&peer.chain, &peer.snapshot_service, &mut queue, None)); + peer.sync.write().propagate_new_transactions(&mut TestIo::new(&peer.chain, &peer.snapshot_service, &mut queue, None)); } pub fn restart_peer(&mut self, i: usize) { - let peer = self.peer_mut(i); - peer.sync.write().restart(&mut TestIo::new(&mut peer.chain, &peer.snapshot_service, &mut peer.queue, None)); + let peer = self.peer(i); + peer.sync.write().restart(&mut TestIo::new(&peer.chain, &peer.snapshot_service, &mut peer.queue.write(), None)); } pub fn sync(&mut self) -> u32 { @@ -239,11 +309,38 @@ impl TestNet { } pub fn done(&self) -> bool { - self.peers.iter().all(|p| p.queue.is_empty()) + self.peers.iter().all(|p| p.queue.read().is_empty()) } pub fn trigger_chain_new_blocks(&mut self, peer_id: usize) { - let mut peer = self.peer_mut(peer_id); - peer.sync.write().chain_new_blocks(&mut TestIo::new(&mut peer.chain, &peer.snapshot_service, &mut peer.queue, None), &[], &[], &[], &[], &[]); + let peer = self.peer(peer_id); + let mut queue = peer.queue.write(); + peer.sync.write().chain_new_blocks(&mut TestIo::new(&peer.chain, &peer.snapshot_service, &mut queue, None), &[], &[], &[], &[], &[]); } } + +impl ChainNotify for TestPeer<EthcoreClient> { + fn new_blocks(&self, + imported: Vec<H256>, + invalid: Vec<H256>, + enacted: Vec<H256>, + retracted: Vec<H256>, + sealed: Vec<H256>, + _duration: u64) + { + let mut queue = self.queue.write(); + let mut io = TestIo::new(&self.chain, &self.snapshot_service, &mut queue, None); + self.sync.write().chain_new_blocks( + &mut io, + &imported, + &invalid, + &enacted, + &retracted, + &sealed); + } + + fn start(&self) {} + + fn stop(&self) {} +} + diff --git a/sync/src/tests/mod.rs b/sync/src/tests/mod.rs index bdb4ae4f9..f805f6c24 100644 --- a/sync/src/tests/mod.rs +++ b/sync/src/tests/mod.rs @@ -17,4 +17,5 @@ pub mod helpers; pub mod snapshot; mod chain; +mod consensus; mod rpc; diff --git a/sync/src/tests/snapshot.rs b/sync/src/tests/snapshot.rs index 5d0b21b47..283d59ee3 100644 --- a/sync/src/tests/snapshot.rs +++ b/sync/src/tests/snapshot.rs @@ -129,7 +129,7 @@ fn snapshot_sync() { let snapshot_service = Arc::new(TestSnapshotService::new_with_snapshot(16, H256::new(), 500000)); for i in 0..4 { net.peer_mut(i).snapshot_service = snapshot_service.clone(); - net.peer_mut(i).chain.add_blocks(1, EachBlockWith::Nothing); + net.peer(i).chain.add_blocks(1, EachBlockWith::Nothing); } net.sync_steps(50); assert_eq!(net.peer(4).snapshot_service.state_restoration_chunks.lock().len(), net.peer(0).snapshot_service.manifest.as_ref().unwrap().state_hashes.len()); From b772901d7737aed1434c4669a31ddd898f9a49f7 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Fri, 9 Dec 2016 19:36:40 +0100 Subject: [PATCH 056/131] network: process packets only after connection handler finishes --- util/network/src/host.rs | 6 ++++++ util/network/src/session.rs | 42 +++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/util/network/src/host.rs b/util/network/src/host.rs index 887b7ade0..f75158e4a 100644 --- a/util/network/src/host.rs +++ b/util/network/src/host.rs @@ -868,6 +868,12 @@ impl Host { let reserved = self.reserved_nodes.read(); if let Some(h) = handlers.get(&p).clone() { h.connected(&NetworkContext::new(io, p, session.clone(), self.sessions.clone(), &reserved), &token); + + // accumulate pending packets. + if let Some(session) = session.as_ref() { + let mut session = session.lock(); + packet_data.extend(session.mark_connected(p)); + } } } for (p, packet_id, data) in packet_data { diff --git a/util/network/src/session.rs b/util/network/src/session.rs index a1336a0ad..9c8bed9da 100644 --- a/util/network/src/session.rs +++ b/util/network/src/session.rs @@ -18,6 +18,8 @@ use std::{str, io}; use std::net::SocketAddr; use std::cmp::Ordering; use std::sync::*; +use std::collections::HashMap; + use mio::*; use mio::deprecated::{Handler, EventLoop}; use mio::tcp::*; @@ -36,6 +38,14 @@ use time; const PING_TIMEOUT_SEC: u64 = 15; const PING_INTERVAL_SEC: u64 = 30; +#[derive(Debug, Clone)] +enum ProtocolState { + // Packets pending protocol on_connect event return. + Pending(Vec<(Vec<u8>, u8)>), + // Protocol connected. + Connected, +} + /// Peer session over encrypted connection. /// When created waits for Hello packet exchange and signals ready state. /// Sends and receives protocol packets and handles basic packes such as ping/pong and disconnect. @@ -49,6 +59,8 @@ pub struct Session { ping_time_ns: u64, pong_time_ns: Option<u64>, state: State, + // Protocol states -- accumulates pending packets until signaled as ready. + protocol_states: HashMap<ProtocolId, ProtocolState>, } enum State { @@ -186,6 +198,7 @@ impl Session { ping_time_ns: 0, pong_time_ns: None, expired: false, + protocol_states: HashMap::new(), }) } @@ -361,6 +374,20 @@ impl Session { self.connection().token() } + /// Signal that a subprotocol has handled the connection successfully and + /// get all pending packets in order received. + pub fn mark_connected(&mut self, protocol: ProtocolId) -> Vec<(ProtocolId, u8, Vec<u8>)> { + match self.protocol_states.insert(protocol, ProtocolState::Connected) { + None => Vec::new(), + Some(ProtocolState::Connected) => { + debug!(target: "network", "Protocol {:?} marked as connected more than once", protocol); + Vec::new() + } + Some(ProtocolState::Pending(pending)) => + pending.into_iter().map(|(data, id)| (protocol, id, data)).collect(), + } + } + fn read_packet<Message>(&mut self, io: &IoContext<Message>, packet: Packet, host: &HostInfo) -> Result<SessionData, NetworkError> where Message: Send + Sync + Clone { if packet.data.len() < 2 { @@ -409,8 +436,19 @@ impl Session { // map to protocol let protocol = self.info.capabilities[i].protocol; let pid = packet_id - self.info.capabilities[i].id_offset; - trace!(target: "network", "Packet {} mapped to {:?}:{}, i={}, capabilities={:?}", packet_id, protocol, pid, i, self.info.capabilities); - Ok(SessionData::Packet { data: packet.data, protocol: protocol, packet_id: pid } ) + + match *self.protocol_states.entry(protocol).or_insert_with(|| ProtocolState::Pending(Vec::new())) { + ProtocolState::Connected => { + trace!(target: "network", "Packet {} mapped to {:?}:{}, i={}, capabilities={:?}", packet_id, protocol, pid, i, self.info.capabilities); + Ok(SessionData::Packet { data: packet.data, protocol: protocol, packet_id: pid } ) + } + ProtocolState::Pending(ref mut pending) => { + trace!(target: "network", "Packet {} deferred until protocol connection event completion", packet_id); + pending.push((packet.data, packet_id)); + + Ok(SessionData::Continue) + } + } }, _ => { debug!(target: "network", "Unknown packet: {:?}", packet_id); From 5f1fcf95e015921673c50e5250f8ee3cfcac4751 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Fri, 9 Dec 2016 23:01:43 +0100 Subject: [PATCH 057/131] Make *ID names consistent with std Rust (Id) --- ethcore/light/src/client.rs | 6 +- ethcore/light/src/provider.rs | 14 +-- ethcore/src/account_provider/mod.rs | 2 +- ethcore/src/blockchain/blockchain.rs | 40 ++++----- ethcore/src/client/client.rs | 124 +++++++++++++------------- ethcore/src/client/test_client.rs | 92 +++++++++---------- ethcore/src/client/traits.rs | 84 ++++++++--------- ethcore/src/miner/miner.rs | 8 +- ethcore/src/snapshot/error.rs | 4 +- ethcore/src/snapshot/mod.rs | 4 +- ethcore/src/snapshot/service.rs | 4 +- ethcore/src/snapshot/tests/service.rs | 6 +- ethcore/src/snapshot/watcher.rs | 4 +- ethcore/src/tests/client.rs | 20 ++--- ethcore/src/tests/rpc.rs | 4 +- ethcore/src/trace/db.rs | 18 ++-- ethcore/src/types/filter.rs | 28 +++--- ethcore/src/types/ids.rs | 12 +-- ethcore/src/types/trace_filter.rs | 4 +- ethstore/src/dir/disk.rs | 4 +- ethstore/src/ethstore.rs | 4 +- ethstore/src/json/error.rs | 4 +- ethstore/src/json/id.rs | 48 +++++----- ethstore/src/json/key_file.rs | 14 +-- ethstore/src/json/mod.rs.in | 2 +- ethstore/src/secret_store.rs | 4 +- js/src/jsonrpc/interfaces/parity.js | 4 +- json/src/misc/account_meta.rs | 2 +- parity/blockchain.rs | 10 +-- parity/configuration.rs | 12 +-- parity/dapps.rs | 4 +- parity/helpers.rs | 22 ++--- parity/informant.rs | 4 +- parity/snapshot.rs | 4 +- rpc/src/v1/impls/eth.rs | 28 +++--- rpc/src/v1/impls/eth_filter.rs | 10 +-- rpc/src/v1/impls/traces.rs | 8 +- rpc/src/v1/tests/eth.rs | 4 +- rpc/src/v1/tests/mocked/eth.rs | 4 +- rpc/src/v1/types/block_number.rs | 24 ++--- rpc/src/v1/types/filter.rs | 12 +-- rpc/src/v1/types/trace_filter.rs | 6 +- sync/src/block_sync.rs | 6 +- sync/src/blocks.rs | 10 +-- sync/src/chain.rs | 34 +++---- sync/src/tests/chain.rs | 12 +-- 46 files changed, 389 insertions(+), 389 deletions(-) diff --git a/ethcore/light/src/client.rs b/ethcore/light/src/client.rs index 8a5c43c48..0035406dc 100644 --- a/ethcore/light/src/client.rs +++ b/ethcore/light/src/client.rs @@ -20,7 +20,7 @@ use std::sync::Arc; use ethcore::engines::Engine; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use ethcore::service::ClientIoMessage; use ethcore::block_import_error::BlockImportError; use ethcore::block_status::BlockStatus; @@ -51,7 +51,7 @@ impl Client { } /// Whether the block is already known (but not necessarily part of the canonical chain) - pub fn is_known(&self, _id: BlockID) -> bool { + pub fn is_known(&self, _id: BlockId) -> bool { false } @@ -61,7 +61,7 @@ impl Client { } /// Inquire about the status of a given block. - pub fn status(&self, _id: BlockID) -> BlockStatus { + pub fn status(&self, _id: BlockId) -> BlockStatus { BlockStatus::Unknown } diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index 264df0397..0feee1cab 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -20,7 +20,7 @@ use ethcore::blockchain_info::BlockChainInfo; use ethcore::client::{BlockChainClient, ProvingBlockChainClient}; use ethcore::transaction::SignedTransaction; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use util::{Bytes, H256}; @@ -96,7 +96,7 @@ impl<T: ProvingBlockChainClient + ?Sized> Provider for T { let best_num = self.chain_info().best_block_number; let start_num = req.block_num; - match self.block_hash(BlockID::Number(req.block_num)) { + match self.block_hash(BlockId::Number(req.block_num)) { Some(hash) if hash == req.block_hash => {} _=> { trace!(target: "les_provider", "unknown/non-canonical start block in header request: {:?}", (req.block_num, req.block_hash)); @@ -108,7 +108,7 @@ impl<T: ProvingBlockChainClient + ?Sized> Provider for T { .map(|x: u64| x.saturating_mul(req.skip)) .take_while(|x| if req.reverse { x < &start_num } else { best_num - start_num < *x }) .map(|x| if req.reverse { start_num - x } else { start_num + x }) - .map(|x| self.block_header(BlockID::Number(x))) + .map(|x| self.block_header(BlockId::Number(x))) .take_while(|x| x.is_some()) .flat_map(|x| x) .collect() @@ -116,7 +116,7 @@ impl<T: ProvingBlockChainClient + ?Sized> Provider for T { fn block_bodies(&self, req: request::Bodies) -> Vec<Bytes> { req.block_hashes.into_iter() - .map(|hash| self.block_body(BlockID::Hash(hash))) + .map(|hash| self.block_body(BlockId::Hash(hash))) .map(|body| body.unwrap_or_else(|| ::rlp::EMPTY_LIST_RLP.to_vec())) .collect() } @@ -135,8 +135,8 @@ impl<T: ProvingBlockChainClient + ?Sized> Provider for T { for request in req.requests { let proof = match request.key2 { - Some(key2) => self.prove_storage(request.key1, key2, request.from_level, BlockID::Hash(request.block)), - None => self.prove_account(request.key1, request.from_level, BlockID::Hash(request.block)), + Some(key2) => self.prove_storage(request.key1, key2, request.from_level, BlockId::Hash(request.block)), + None => self.prove_account(request.key1, request.from_level, BlockId::Hash(request.block)), }; let mut stream = RlpStream::new_list(proof.len()); @@ -153,7 +153,7 @@ impl<T: ProvingBlockChainClient + ?Sized> Provider for T { fn contract_code(&self, req: request::ContractCodes) -> Vec<Bytes> { req.code_requests.into_iter() .map(|req| { - self.code_by_hash(req.account_key, BlockID::Hash(req.block_hash)) + self.code_by_hash(req.account_key, BlockId::Hash(req.block_hash)) }) .collect() } diff --git a/ethcore/src/account_provider/mod.rs b/ethcore/src/account_provider/mod.rs index a2c83f1ce..59fbda045 100644 --- a/ethcore/src/account_provider/mod.rs +++ b/ethcore/src/account_provider/mod.rs @@ -213,7 +213,7 @@ impl AccountProvider { Ok(AccountMeta { name: try!(self.sstore.name(&account)), meta: try!(self.sstore.meta(&account)), - uuid: self.sstore.uuid(&account).ok().map(Into::into), // allowed to not have a UUID + uuid: self.sstore.uuid(&account).ok().map(Into::into), // allowed to not have a Uuid }) } diff --git a/ethcore/src/blockchain/blockchain.rs b/ethcore/src/blockchain/blockchain.rs index 0e8e0a271..c69cf3336 100644 --- a/ethcore/src/blockchain/blockchain.rs +++ b/ethcore/src/blockchain/blockchain.rs @@ -146,7 +146,7 @@ pub trait BlockProvider { } #[derive(Debug, Hash, Eq, PartialEq, Clone)] -enum CacheID { +enum CacheId { BlockHeader(H256), BlockBody(H256), BlockDetails(H256), @@ -160,7 +160,7 @@ impl bc::group::BloomGroupDatabase for BlockChain { fn blooms_at(&self, position: &bc::group::GroupPosition) -> Option<bc::group::BloomGroup> { let position = LogGroupPosition::from(position.clone()); let result = self.db.read_with_cache(db::COL_EXTRA, &self.blocks_blooms, &position).map(Into::into); - self.cache_man.lock().note_used(CacheID::BlocksBlooms(position)); + self.cache_man.lock().note_used(CacheId::BlocksBlooms(position)); result } } @@ -193,7 +193,7 @@ pub struct BlockChain { db: Arc<Database>, - cache_man: Mutex<CacheManager<CacheID>>, + cache_man: Mutex<CacheManager<CacheId>>, pending_best_block: RwLock<Option<BestBlock>>, pending_block_hashes: RwLock<HashMap<BlockNumber, H256>>, @@ -270,7 +270,7 @@ impl BlockProvider for BlockChain { None => None }; - self.cache_man.lock().note_used(CacheID::BlockHeader(hash.clone())); + self.cache_man.lock().note_used(CacheId::BlockHeader(hash.clone())); result } @@ -306,7 +306,7 @@ impl BlockProvider for BlockChain { None => None }; - self.cache_man.lock().note_used(CacheID::BlockBody(hash.clone())); + self.cache_man.lock().note_used(CacheId::BlockBody(hash.clone())); result } @@ -314,28 +314,28 @@ impl BlockProvider for BlockChain { /// Get the familial details concerning a block. fn block_details(&self, hash: &H256) -> Option<BlockDetails> { let result = self.db.read_with_cache(db::COL_EXTRA, &self.block_details, hash); - self.cache_man.lock().note_used(CacheID::BlockDetails(hash.clone())); + self.cache_man.lock().note_used(CacheId::BlockDetails(hash.clone())); result } /// Get the hash of given block's number. fn block_hash(&self, index: BlockNumber) -> Option<H256> { let result = self.db.read_with_cache(db::COL_EXTRA, &self.block_hashes, &index); - self.cache_man.lock().note_used(CacheID::BlockHashes(index)); + self.cache_man.lock().note_used(CacheId::BlockHashes(index)); result } /// Get the address of transaction with given hash. fn transaction_address(&self, hash: &H256) -> Option<TransactionAddress> { let result = self.db.read_with_cache(db::COL_EXTRA, &self.transaction_addresses, hash); - self.cache_man.lock().note_used(CacheID::TransactionAddresses(hash.clone())); + self.cache_man.lock().note_used(CacheId::TransactionAddresses(hash.clone())); result } /// Get receipts of block with given hash. fn block_receipts(&self, hash: &H256) -> Option<BlockReceipts> { let result = self.db.read_with_cache(db::COL_EXTRA, &self.block_receipts, hash); - self.cache_man.lock().note_used(CacheID::BlockReceipts(hash.clone())); + self.cache_man.lock().note_used(CacheId::BlockReceipts(hash.clone())); result } @@ -809,7 +809,7 @@ impl BlockChain { let mut write_details = self.block_details.write(); batch.extend_with_cache(db::COL_EXTRA, &mut *write_details, update, CacheUpdatePolicy::Overwrite); - self.cache_man.lock().note_used(CacheID::BlockDetails(block_hash)); + self.cache_man.lock().note_used(CacheId::BlockDetails(block_hash)); } #[cfg_attr(feature="dev", allow(similar_names))] @@ -968,15 +968,15 @@ impl BlockChain { let mut cache_man = self.cache_man.lock(); for n in pending_hashes_keys { - cache_man.note_used(CacheID::BlockHashes(n)); + cache_man.note_used(CacheId::BlockHashes(n)); } for hash in enacted_txs_keys { - cache_man.note_used(CacheID::TransactionAddresses(hash)); + cache_man.note_used(CacheId::TransactionAddresses(hash)); } for hash in pending_block_hashes { - cache_man.note_used(CacheID::BlockDetails(hash)); + cache_man.note_used(CacheId::BlockDetails(hash)); } } @@ -1244,13 +1244,13 @@ impl BlockChain { cache_man.collect_garbage(current_size, | ids | { for id in &ids { match *id { - CacheID::BlockHeader(ref h) => { block_headers.remove(h); }, - CacheID::BlockBody(ref h) => { block_bodies.remove(h); }, - CacheID::BlockDetails(ref h) => { block_details.remove(h); } - CacheID::BlockHashes(ref h) => { block_hashes.remove(h); } - CacheID::TransactionAddresses(ref h) => { transaction_addresses.remove(h); } - CacheID::BlocksBlooms(ref h) => { blocks_blooms.remove(h); } - CacheID::BlockReceipts(ref h) => { block_receipts.remove(h); } + CacheId::BlockHeader(ref h) => { block_headers.remove(h); }, + CacheId::BlockBody(ref h) => { block_bodies.remove(h); }, + CacheId::BlockDetails(ref h) => { block_details.remove(h); } + CacheId::BlockHashes(ref h) => { block_hashes.remove(h); } + CacheId::TransactionAddresses(ref h) => { transaction_addresses.remove(h); } + CacheId::BlocksBlooms(ref h) => { blocks_blooms.remove(h); } + CacheId::BlockReceipts(ref h) => { block_receipts.remove(h); } } } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 30b5b4653..acd4984ab 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -50,7 +50,7 @@ use log_entry::LocalizedLogEntry; use verification::queue::BlockQueue; use blockchain::{BlockChain, BlockProvider, TreeRoute, ImportRoute}; use client::{ - BlockID, TransactionID, UncleID, TraceId, ClientConfig, BlockChainClient, + BlockId, TransactionId, UncleId, TraceId, ClientConfig, BlockChainClient, MiningBlockChainClient, TraceFilter, CallAnalytics, BlockImportError, Mode, ChainNotify, PruningInfo, ProvingBlockChainClient, }; @@ -580,13 +580,13 @@ impl Client { /// Attempt to get a copy of a specific block's final state. /// - /// This will not fail if given BlockID::Latest. + /// This will not fail if given BlockId::Latest. /// Otherwise, this can fail (but may not) if the DB prunes state. - pub fn state_at(&self, id: BlockID) -> Option<State> { + pub fn state_at(&self, id: BlockId) -> Option<State> { // fast path for latest state. match id.clone() { - BlockID::Pending => return self.miner.pending_state().or_else(|| Some(self.state())), - BlockID::Latest => return Some(self.state()), + BlockId::Pending => return self.miner.pending_state().or_else(|| Some(self.state())), + BlockId::Latest => return Some(self.state()), _ => {}, } @@ -611,15 +611,15 @@ impl Client { /// Attempt to get a copy of a specific block's beginning state. /// - /// This will not fail if given BlockID::Latest. + /// This will not fail if given BlockId::Latest. /// Otherwise, this can fail (but may not) if the DB prunes state. - pub fn state_at_beginning(&self, id: BlockID) -> Option<State> { + pub fn state_at_beginning(&self, id: BlockId) -> Option<State> { // fast path for latest state. match id { - BlockID::Pending => self.state_at(BlockID::Latest), + BlockId::Pending => self.state_at(BlockId::Latest), id => match self.block_number(id) { None | Some(0) => None, - Some(n) => self.state_at(BlockID::Number(n - 1)), + Some(n) => self.state_at(BlockId::Number(n - 1)), } } } @@ -689,18 +689,18 @@ impl Client { } /// Look up the block number for the given block ID. - pub fn block_number(&self, id: BlockID) -> Option<BlockNumber> { + pub fn block_number(&self, id: BlockId) -> Option<BlockNumber> { match id { - BlockID::Number(number) => Some(number), - BlockID::Hash(ref hash) => self.chain.read().block_number(hash), - BlockID::Earliest => Some(0), - BlockID::Latest | BlockID::Pending => Some(self.chain.read().best_block_number()), + BlockId::Number(number) => Some(number), + BlockId::Hash(ref hash) => self.chain.read().block_number(hash), + BlockId::Earliest => Some(0), + BlockId::Latest | BlockId::Pending => Some(self.chain.read().best_block_number()), } } /// Take a snapshot at the given block. /// If the ID given is "latest", this will default to 1000 blocks behind. - pub fn take_snapshot<W: snapshot_io::SnapshotWriter + Send>(&self, writer: W, at: BlockID, p: &snapshot::Progress) -> Result<(), EthcoreError> { + pub fn take_snapshot<W: snapshot_io::SnapshotWriter + Send>(&self, writer: W, at: BlockId, p: &snapshot::Progress) -> Result<(), EthcoreError> { let db = self.state_db.lock().journal_db().boxed_clone(); let best_block_number = self.chain_info().best_block_number; let block_number = try!(self.block_number(at).ok_or(snapshot::Error::InvalidStartingBlock(at))); @@ -712,13 +712,13 @@ impl Client { let history = ::std::cmp::min(self.history, 1000); let start_hash = match at { - BlockID::Latest => { + BlockId::Latest => { let start_num = match db.earliest_era() { Some(era) => ::std::cmp::max(era, best_block_number - history), None => best_block_number - history, }; - match self.block_hash(BlockID::Number(start_num)) { + match self.block_hash(BlockId::Number(start_num)) { Some(h) => h, None => return Err(snapshot::Error::InvalidStartingBlock(at).into()), } @@ -739,19 +739,19 @@ impl Client { self.history } - fn block_hash(chain: &BlockChain, id: BlockID) -> Option<H256> { + fn block_hash(chain: &BlockChain, id: BlockId) -> Option<H256> { match id { - BlockID::Hash(hash) => Some(hash), - BlockID::Number(number) => chain.block_hash(number), - BlockID::Earliest => chain.block_hash(0), - BlockID::Latest | BlockID::Pending => Some(chain.best_block_hash()), + BlockId::Hash(hash) => Some(hash), + BlockId::Number(number) => chain.block_hash(number), + BlockId::Earliest => chain.block_hash(0), + BlockId::Latest | BlockId::Pending => Some(chain.best_block_hash()), } } - fn transaction_address(&self, id: TransactionID) -> Option<TransactionAddress> { + fn transaction_address(&self, id: TransactionId) -> Option<TransactionAddress> { match id { - TransactionID::Hash(ref hash) => self.chain.read().transaction_address(hash), - TransactionID::Location(id, index) => Self::block_hash(&self.chain.read(), id).map(|hash| TransactionAddress { + TransactionId::Hash(ref hash) => self.chain.read().transaction_address(hash), + TransactionId::Location(id, index) => Self::block_hash(&self.chain.read(), id).map(|hash| TransactionAddress { block_hash: hash, index: index, }) @@ -805,7 +805,7 @@ impl snapshot::DatabaseRestore for Client { impl BlockChainClient for Client { - fn call(&self, t: &SignedTransaction, block: BlockID, analytics: CallAnalytics) -> Result<Executed, CallError> { + fn call(&self, t: &SignedTransaction, block: BlockId, analytics: CallAnalytics) -> Result<Executed, CallError> { let header = try!(self.block_header(block).ok_or(CallError::StatePruned)); let view = HeaderView::new(&header); let last_hashes = self.build_last_hashes(view.parent_hash()); @@ -841,11 +841,11 @@ impl BlockChainClient for Client { Ok(ret) } - fn replay(&self, id: TransactionID, analytics: CallAnalytics) -> Result<Executed, CallError> { + fn replay(&self, id: TransactionId, analytics: CallAnalytics) -> Result<Executed, CallError> { let address = try!(self.transaction_address(id).ok_or(CallError::TransactionNotFound)); - let header_data = try!(self.block_header(BlockID::Hash(address.block_hash)).ok_or(CallError::StatePruned)); - let body_data = try!(self.block_body(BlockID::Hash(address.block_hash)).ok_or(CallError::StatePruned)); - let mut state = try!(self.state_at_beginning(BlockID::Hash(address.block_hash)).ok_or(CallError::StatePruned)); + let header_data = try!(self.block_header(BlockId::Hash(address.block_hash)).ok_or(CallError::StatePruned)); + let body_data = try!(self.block_body(BlockId::Hash(address.block_hash)).ok_or(CallError::StatePruned)); + let mut state = try!(self.state_at_beginning(BlockId::Hash(address.block_hash)).ok_or(CallError::StatePruned)); let txs = BodyView::new(&body_data).transactions(); if address.index >= txs.len() { @@ -918,18 +918,18 @@ impl BlockChainClient for Client { self.chain.read().best_block_header() } - fn block_header(&self, id: BlockID) -> Option<Bytes> { + fn block_header(&self, id: BlockId) -> Option<Bytes> { let chain = self.chain.read(); Self::block_hash(&chain, id).and_then(|hash| chain.block_header_data(&hash)) } - fn block_body(&self, id: BlockID) -> Option<Bytes> { + fn block_body(&self, id: BlockId) -> Option<Bytes> { let chain = self.chain.read(); Self::block_hash(&chain, id).and_then(|hash| chain.block_body(&hash)) } - fn block(&self, id: BlockID) -> Option<Bytes> { - if let BlockID::Pending = id { + fn block(&self, id: BlockId) -> Option<Bytes> { + if let BlockId::Pending = id { if let Some(block) = self.miner.pending_block() { return Some(block.rlp_bytes(Seal::Without)); } @@ -940,7 +940,7 @@ impl BlockChainClient for Client { }) } - fn block_status(&self, id: BlockID) -> BlockStatus { + fn block_status(&self, id: BlockId) -> BlockStatus { let chain = self.chain.read(); match Self::block_hash(&chain, id) { Some(ref hash) if chain.is_known(hash) => BlockStatus::InChain, @@ -949,42 +949,42 @@ impl BlockChainClient for Client { } } - fn block_total_difficulty(&self, id: BlockID) -> Option<U256> { - if let BlockID::Pending = id { + fn block_total_difficulty(&self, id: BlockId) -> Option<U256> { + if let BlockId::Pending = id { if let Some(block) = self.miner.pending_block() { - return Some(*block.header.difficulty() + self.block_total_difficulty(BlockID::Latest).expect("blocks in chain have details; qed")); + return Some(*block.header.difficulty() + self.block_total_difficulty(BlockId::Latest).expect("blocks in chain have details; qed")); } } let chain = self.chain.read(); Self::block_hash(&chain, id).and_then(|hash| chain.block_details(&hash)).map(|d| d.total_difficulty) } - fn nonce(&self, address: &Address, id: BlockID) -> Option<U256> { + fn nonce(&self, address: &Address, id: BlockId) -> Option<U256> { self.state_at(id).map(|s| s.nonce(address)) } - fn storage_root(&self, address: &Address, id: BlockID) -> Option<H256> { + fn storage_root(&self, address: &Address, id: BlockId) -> Option<H256> { self.state_at(id).and_then(|s| s.storage_root(address)) } - fn block_hash(&self, id: BlockID) -> Option<H256> { + fn block_hash(&self, id: BlockId) -> Option<H256> { let chain = self.chain.read(); Self::block_hash(&chain, id) } - fn code(&self, address: &Address, id: BlockID) -> Option<Option<Bytes>> { + fn code(&self, address: &Address, id: BlockId) -> Option<Option<Bytes>> { self.state_at(id).map(|s| s.code(address).map(|c| (*c).clone())) } - fn balance(&self, address: &Address, id: BlockID) -> Option<U256> { + fn balance(&self, address: &Address, id: BlockId) -> Option<U256> { self.state_at(id).map(|s| s.balance(address)) } - fn storage_at(&self, address: &Address, position: &H256, id: BlockID) -> Option<H256> { + fn storage_at(&self, address: &Address, position: &H256, id: BlockId) -> Option<H256> { self.state_at(id).map(|s| s.storage_at(address, position)) } - fn list_accounts(&self, id: BlockID, after: Option<&Address>, count: u64) -> Option<Vec<Address>> { + fn list_accounts(&self, id: BlockId, after: Option<&Address>, count: u64) -> Option<Vec<Address>> { if !self.factories.trie.is_fat() { trace!(target: "fatdb", "list_accounts: Not a fat DB"); return None; @@ -1022,7 +1022,7 @@ impl BlockChainClient for Client { Some(accounts) } - fn list_storage(&self, id: BlockID, account: &Address, after: Option<&H256>, count: u64) -> Option<Vec<H256>> { + fn list_storage(&self, id: BlockId, account: &Address, after: Option<&H256>, count: u64) -> Option<Vec<H256>> { if !self.factories.trie.is_fat() { trace!(target: "fatdb", "list_stroage: Not a fat DB"); return None; @@ -1066,20 +1066,20 @@ impl BlockChainClient for Client { Some(keys) } - fn transaction(&self, id: TransactionID) -> Option<LocalizedTransaction> { + fn transaction(&self, id: TransactionId) -> Option<LocalizedTransaction> { self.transaction_address(id).and_then(|address| self.chain.read().transaction(&address)) } - fn transaction_block(&self, id: TransactionID) -> Option<H256> { + fn transaction_block(&self, id: TransactionId) -> Option<H256> { self.transaction_address(id).map(|addr| addr.block_hash) } - fn uncle(&self, id: UncleID) -> Option<Bytes> { + fn uncle(&self, id: UncleId) -> Option<Bytes> { let index = id.position; self.block_body(id.block).and_then(|body| BodyView::new(&body).uncle_rlp_at(index)) } - fn transaction_receipt(&self, id: TransactionID) -> Option<LocalizedReceipt> { + fn transaction_receipt(&self, id: TransactionId) -> Option<LocalizedReceipt> { let chain = self.chain.read(); self.transaction_address(id) .and_then(|address| chain.block_number(&address.block_hash).and_then(|block_number| { @@ -1163,7 +1163,7 @@ impl BlockChainClient for Client { if self.chain.read().is_known(&unverified.hash()) { return Err(BlockImportError::Import(ImportError::AlreadyInChain)); } - if self.block_status(BlockID::Hash(unverified.parent_hash())) == BlockStatus::Unknown { + if self.block_status(BlockId::Hash(unverified.parent_hash())) == BlockStatus::Unknown { return Err(BlockImportError::Block(BlockError::UnknownParent(unverified.parent_hash()))); } } @@ -1177,7 +1177,7 @@ impl BlockChainClient for Client { if self.chain.read().is_known(&header.hash()) { return Err(BlockImportError::Import(ImportError::AlreadyInChain)); } - if self.block_status(BlockID::Hash(header.parent_hash())) == BlockStatus::Unknown { + if self.block_status(BlockId::Hash(header.parent_hash())) == BlockStatus::Unknown { return Err(BlockImportError::Block(BlockError::UnknownParent(header.parent_hash()))); } } @@ -1200,7 +1200,7 @@ impl BlockChainClient for Client { self.engine.additional_params().into_iter().collect() } - fn blocks_with_bloom(&self, bloom: &H2048, from_block: BlockID, to_block: BlockID) -> Option<Vec<BlockNumber>> { + fn blocks_with_bloom(&self, bloom: &H2048, from_block: BlockId, to_block: BlockId) -> Option<Vec<BlockNumber>> { match (self.block_number(from_block), self.block_number(to_block)) { (Some(from), Some(to)) => Some(self.chain.read().blocks_with_bloom(bloom, from, to)), _ => None @@ -1242,20 +1242,20 @@ impl BlockChainClient for Client { let trace_address = trace.address; self.transaction_address(trace.transaction) .and_then(|tx_address| { - self.block_number(BlockID::Hash(tx_address.block_hash)) + self.block_number(BlockId::Hash(tx_address.block_hash)) .and_then(|number| self.tracedb.read().trace(number, tx_address.index, trace_address)) }) } - fn transaction_traces(&self, transaction: TransactionID) -> Option<Vec<LocalizedTrace>> { + fn transaction_traces(&self, transaction: TransactionId) -> Option<Vec<LocalizedTrace>> { self.transaction_address(transaction) .and_then(|tx_address| { - self.block_number(BlockID::Hash(tx_address.block_hash)) + self.block_number(BlockId::Hash(tx_address.block_hash)) .and_then(|number| self.tracedb.read().transaction_traces(number, tx_address.index)) }) } - fn block_traces(&self, block: BlockID) -> Option<Vec<LocalizedTrace>> { + fn block_traces(&self, block: BlockId) -> Option<Vec<LocalizedTrace>> { self.block_number(block) .and_then(|number| self.tracedb.read().block_traces(number)) } @@ -1290,13 +1290,13 @@ impl BlockChainClient for Client { self.engine.signing_network_id(&self.latest_env_info()) } - fn block_extra_info(&self, id: BlockID) -> Option<BTreeMap<String, String>> { + fn block_extra_info(&self, id: BlockId) -> Option<BTreeMap<String, String>> { self.block_header(id) .map(|block| decode(&block)) .map(|header| self.engine.extra_info(&header)) } - fn uncle_extra_info(&self, id: UncleID) -> Option<BTreeMap<String, String>> { + fn uncle_extra_info(&self, id: UncleId) -> Option<BTreeMap<String, String>> { self.uncle(id) .map(|header| self.engine.extra_info(&decode(&header))) } @@ -1392,19 +1392,19 @@ impl MayPanic for Client { } impl ProvingBlockChainClient for Client { - fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockID) -> Vec<Bytes> { + fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockId) -> Vec<Bytes> { self.state_at(id) .and_then(move |state| state.prove_storage(key1, key2, from_level).ok()) .unwrap_or_else(Vec::new) } - fn prove_account(&self, key1: H256, from_level: u32, id: BlockID) -> Vec<Bytes> { + fn prove_account(&self, key1: H256, from_level: u32, id: BlockId) -> Vec<Bytes> { self.state_at(id) .and_then(move |state| state.prove_account(key1, from_level).ok()) .unwrap_or_else(Vec::new) } - fn code_by_hash(&self, account_key: H256, id: BlockID) -> Bytes { + fn code_by_hash(&self, account_key: H256, id: BlockId) -> Bytes { self.state_at(id) .and_then(move |state| state.code_by_address_hash(account_key).ok()) .and_then(|x| x) diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 433a5166f..e61fe729c 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -24,8 +24,8 @@ use devtools::*; use transaction::{Transaction, LocalizedTransaction, SignedTransaction, Action}; use blockchain::TreeRoute; use client::{ - BlockChainClient, MiningBlockChainClient, BlockChainInfo, BlockStatus, BlockID, - TransactionID, UncleID, TraceId, TraceFilter, LastHashes, CallAnalytics, BlockImportError, + BlockChainClient, MiningBlockChainClient, BlockChainInfo, BlockStatus, BlockId, + TransactionId, UncleId, TraceId, TraceFilter, LastHashes, CallAnalytics, BlockImportError, }; use db::{NUM_COLUMNS, COL_STATE}; use header::{Header as BlockHeader, BlockNumber}; @@ -73,7 +73,7 @@ pub struct TestBlockChainClient { /// Execution result. pub execution_result: RwLock<Option<Result<Executed, CallError>>>, /// Transaction receipts. - pub receipts: RwLock<HashMap<TransactionID, LocalizedReceipt>>, + pub receipts: RwLock<HashMap<TransactionId, LocalizedReceipt>>, /// Logs pub logs: RwLock<Vec<LocalizedLogEntry>>, /// Block queue size. @@ -158,7 +158,7 @@ impl TestBlockChainClient { } /// Set the transaction receipt result - pub fn set_transaction_receipt(&self, id: TransactionID, receipt: LocalizedReceipt) { + pub fn set_transaction_receipt(&self, id: TransactionId, receipt: LocalizedReceipt) { self.receipts.write().insert(id, receipt); } @@ -256,8 +256,8 @@ impl TestBlockChainClient { /// Make a bad block by setting invalid extra data. pub fn corrupt_block(&self, n: BlockNumber) { - let hash = self.block_hash(BlockID::Number(n)).unwrap(); - let mut header: BlockHeader = decode(&self.block_header(BlockID::Number(n)).unwrap()); + let hash = self.block_hash(BlockId::Number(n)).unwrap(); + let mut header: BlockHeader = decode(&self.block_header(BlockId::Number(n)).unwrap()); header.set_extra_data(b"This extra data is way too long to be considered valid".to_vec()); let mut rlp = RlpStream::new_list(3); rlp.append(&header); @@ -268,8 +268,8 @@ impl TestBlockChainClient { /// Make a bad block by setting invalid parent hash. pub fn corrupt_block_parent(&self, n: BlockNumber) { - let hash = self.block_hash(BlockID::Number(n)).unwrap(); - let mut header: BlockHeader = decode(&self.block_header(BlockID::Number(n)).unwrap()); + let hash = self.block_hash(BlockId::Number(n)).unwrap(); + let mut header: BlockHeader = decode(&self.block_header(BlockId::Number(n)).unwrap()); header.set_parent_hash(H256::from(42)); let mut rlp = RlpStream::new_list(3); rlp.append(&header); @@ -285,12 +285,12 @@ impl TestBlockChainClient { blocks_read[&index].clone() } - fn block_hash(&self, id: BlockID) -> Option<H256> { + fn block_hash(&self, id: BlockId) -> Option<H256> { match id { - BlockID::Hash(hash) => Some(hash), - BlockID::Number(n) => self.numbers.read().get(&(n as usize)).cloned(), - BlockID::Earliest => self.numbers.read().get(&0).cloned(), - BlockID::Latest | BlockID::Pending => self.numbers.read().get(&(self.numbers.read().len() - 1)).cloned() + BlockId::Hash(hash) => Some(hash), + BlockId::Number(n) => self.numbers.read().get(&(n as usize)).cloned(), + BlockId::Earliest => self.numbers.read().get(&0).cloned(), + BlockId::Latest | BlockId::Pending => self.numbers.read().get(&(self.numbers.read().len() - 1)).cloned() } } @@ -363,46 +363,46 @@ impl MiningBlockChainClient for TestBlockChainClient { } impl BlockChainClient for TestBlockChainClient { - fn call(&self, _t: &SignedTransaction, _block: BlockID, _analytics: CallAnalytics) -> Result<Executed, CallError> { + fn call(&self, _t: &SignedTransaction, _block: BlockId, _analytics: CallAnalytics) -> Result<Executed, CallError> { self.execution_result.read().clone().unwrap() } - fn replay(&self, _id: TransactionID, _analytics: CallAnalytics) -> Result<Executed, CallError> { + fn replay(&self, _id: TransactionId, _analytics: CallAnalytics) -> Result<Executed, CallError> { self.execution_result.read().clone().unwrap() } - fn block_total_difficulty(&self, _id: BlockID) -> Option<U256> { + fn block_total_difficulty(&self, _id: BlockId) -> Option<U256> { Some(U256::zero()) } - fn block_hash(&self, id: BlockID) -> Option<H256> { + fn block_hash(&self, id: BlockId) -> Option<H256> { Self::block_hash(self, id) } - fn nonce(&self, address: &Address, id: BlockID) -> Option<U256> { + fn nonce(&self, address: &Address, id: BlockId) -> Option<U256> { match id { - BlockID::Latest => Some(self.nonces.read().get(address).cloned().unwrap_or(self.spec.params.account_start_nonce)), + BlockId::Latest => Some(self.nonces.read().get(address).cloned().unwrap_or(self.spec.params.account_start_nonce)), _ => None, } } - fn storage_root(&self, _address: &Address, _id: BlockID) -> Option<H256> { + fn storage_root(&self, _address: &Address, _id: BlockId) -> Option<H256> { None } fn latest_nonce(&self, address: &Address) -> U256 { - self.nonce(address, BlockID::Latest).unwrap() + self.nonce(address, BlockId::Latest).unwrap() } - fn code(&self, address: &Address, id: BlockID) -> Option<Option<Bytes>> { + fn code(&self, address: &Address, id: BlockId) -> Option<Option<Bytes>> { match id { - BlockID::Latest => Some(self.code.read().get(address).cloned()), + BlockId::Latest => Some(self.code.read().get(address).cloned()), _ => None, } } - fn balance(&self, address: &Address, id: BlockID) -> Option<U256> { - if let BlockID::Latest = id { + fn balance(&self, address: &Address, id: BlockId) -> Option<U256> { + if let BlockId::Latest = id { Some(self.balances.read().get(address).cloned().unwrap_or_else(U256::zero)) } else { None @@ -410,45 +410,45 @@ impl BlockChainClient for TestBlockChainClient { } fn latest_balance(&self, address: &Address) -> U256 { - self.balance(address, BlockID::Latest).unwrap() + self.balance(address, BlockId::Latest).unwrap() } - fn storage_at(&self, address: &Address, position: &H256, id: BlockID) -> Option<H256> { - if let BlockID::Latest = id { + fn storage_at(&self, address: &Address, position: &H256, id: BlockId) -> Option<H256> { + if let BlockId::Latest = id { Some(self.storage.read().get(&(address.clone(), position.clone())).cloned().unwrap_or_else(H256::new)) } else { None } } - fn list_accounts(&self, _id: BlockID, _after: Option<&Address>, _count: u64) -> Option<Vec<Address>> { + fn list_accounts(&self, _id: BlockId, _after: Option<&Address>, _count: u64) -> Option<Vec<Address>> { None } - fn list_storage(&self, _id: BlockID, _account: &Address, _after: Option<&H256>, _count: u64) -> Option<Vec<H256>> { + fn list_storage(&self, _id: BlockId, _account: &Address, _after: Option<&H256>, _count: u64) -> Option<Vec<H256>> { None } - fn transaction(&self, _id: TransactionID) -> Option<LocalizedTransaction> { + fn transaction(&self, _id: TransactionId) -> Option<LocalizedTransaction> { None // Simple default. } - fn transaction_block(&self, _id: TransactionID) -> Option<H256> { + fn transaction_block(&self, _id: TransactionId) -> Option<H256> { None // Simple default. } - fn uncle(&self, _id: UncleID) -> Option<Bytes> { + fn uncle(&self, _id: UncleId) -> Option<Bytes> { None // Simple default. } - fn uncle_extra_info(&self, _id: UncleID) -> Option<BTreeMap<String, String>> { + fn uncle_extra_info(&self, _id: UncleId) -> Option<BTreeMap<String, String>> { None } - fn transaction_receipt(&self, id: TransactionID) -> Option<LocalizedReceipt> { + fn transaction_receipt(&self, id: TransactionId) -> Option<LocalizedReceipt> { self.receipts.read().get(&id).cloned() } - fn blocks_with_bloom(&self, _bloom: &H2048, _from_block: BlockID, _to_block: BlockID) -> Option<Vec<BlockNumber>> { + fn blocks_with_bloom(&self, _bloom: &H2048, _from_block: BlockId, _to_block: BlockId) -> Option<Vec<BlockNumber>> { unimplemented!(); } @@ -466,14 +466,14 @@ impl BlockChainClient for TestBlockChainClient { } fn best_block_header(&self) -> Bytes { - self.block_header(BlockID::Hash(self.chain_info().best_block_hash)).expect("Best block always have header.") + self.block_header(BlockId::Hash(self.chain_info().best_block_hash)).expect("Best block always have header.") } - fn block_header(&self, id: BlockID) -> Option<Bytes> { + fn block_header(&self, id: BlockId) -> Option<Bytes> { self.block_hash(id).and_then(|hash| self.blocks.read().get(&hash).map(|r| Rlp::new(r).at(0).as_raw().to_vec())) } - fn block_body(&self, id: BlockID) -> Option<Bytes> { + fn block_body(&self, id: BlockId) -> Option<Bytes> { self.block_hash(id).and_then(|hash| self.blocks.read().get(&hash).map(|r| { let mut stream = RlpStream::new_list(2); stream.append_raw(Rlp::new(r).at(1).as_raw(), 1); @@ -482,21 +482,21 @@ impl BlockChainClient for TestBlockChainClient { })) } - fn block(&self, id: BlockID) -> Option<Bytes> { + fn block(&self, id: BlockId) -> Option<Bytes> { self.block_hash(id).and_then(|hash| self.blocks.read().get(&hash).cloned()) } - fn block_extra_info(&self, id: BlockID) -> Option<BTreeMap<String, String>> { + fn block_extra_info(&self, id: BlockId) -> Option<BTreeMap<String, String>> { self.block(id) .map(|block| BlockView::new(&block).header()) .map(|header| self.spec.engine.extra_info(&header)) } - fn block_status(&self, id: BlockID) -> BlockStatus { + fn block_status(&self, id: BlockId) -> BlockStatus { match id { - BlockID::Number(number) if (number as usize) < self.blocks.read().len() => BlockStatus::InChain, - BlockID::Hash(ref hash) if self.blocks.read().get(hash).is_some() => BlockStatus::InChain, + BlockId::Number(number) if (number as usize) < self.blocks.read().len() => BlockStatus::InChain, + BlockId::Hash(ref hash) if self.blocks.read().get(hash).is_some() => BlockStatus::InChain, _ => BlockStatus::Unknown } } @@ -649,11 +649,11 @@ impl BlockChainClient for TestBlockChainClient { unimplemented!(); } - fn transaction_traces(&self, _trace: TransactionID) -> Option<Vec<LocalizedTrace>> { + fn transaction_traces(&self, _trace: TransactionId) -> Option<Vec<LocalizedTrace>> { unimplemented!(); } - fn block_traces(&self, _trace: BlockID) -> Option<Vec<LocalizedTrace>> { + fn block_traces(&self, _trace: BlockId) -> Option<Vec<LocalizedTrace>> { unimplemented!(); } diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index e23a564d4..ad21d2ba5 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -50,93 +50,93 @@ pub trait BlockChainClient : Sync + Send { fn keep_alive(&self) {} /// Get raw block header data by block id. - fn block_header(&self, id: BlockID) -> Option<Bytes>; + fn block_header(&self, id: BlockId) -> Option<Bytes>; /// Get raw block body data by block id. /// Block body is an RLP list of two items: uncles and transactions. - fn block_body(&self, id: BlockID) -> Option<Bytes>; + fn block_body(&self, id: BlockId) -> Option<Bytes>; /// Get raw block data by block header hash. - fn block(&self, id: BlockID) -> Option<Bytes>; + fn block(&self, id: BlockId) -> Option<Bytes>; /// Get block status by block header hash. - fn block_status(&self, id: BlockID) -> BlockStatus; + fn block_status(&self, id: BlockId) -> BlockStatus; /// Get block total difficulty. - fn block_total_difficulty(&self, id: BlockID) -> Option<U256>; + fn block_total_difficulty(&self, id: BlockId) -> Option<U256>; /// Attempt to get address nonce at given block. - /// May not fail on BlockID::Latest. - fn nonce(&self, address: &Address, id: BlockID) -> Option<U256>; + /// May not fail on BlockId::Latest. + fn nonce(&self, address: &Address, id: BlockId) -> Option<U256>; /// Attempt to get address storage root at given block. - /// May not fail on BlockID::Latest. - fn storage_root(&self, address: &Address, id: BlockID) -> Option<H256>; + /// May not fail on BlockId::Latest. + fn storage_root(&self, address: &Address, id: BlockId) -> Option<H256>; /// Get address nonce at the latest block's state. fn latest_nonce(&self, address: &Address) -> U256 { - self.nonce(address, BlockID::Latest) - .expect("nonce will return Some when given BlockID::Latest. nonce was given BlockID::Latest. \ + self.nonce(address, BlockId::Latest) + .expect("nonce will return Some when given BlockId::Latest. nonce was given BlockId::Latest. \ Therefore nonce has returned Some; qed") } /// Get block hash. - fn block_hash(&self, id: BlockID) -> Option<H256>; + fn block_hash(&self, id: BlockId) -> Option<H256>; /// Get address code at given block's state. - fn code(&self, address: &Address, id: BlockID) -> Option<Option<Bytes>>; + fn code(&self, address: &Address, id: BlockId) -> Option<Option<Bytes>>; /// Get address code at the latest block's state. fn latest_code(&self, address: &Address) -> Option<Bytes> { - self.code(address, BlockID::Latest) - .expect("code will return Some if given BlockID::Latest; qed") + self.code(address, BlockId::Latest) + .expect("code will return Some if given BlockId::Latest; qed") } /// Get address balance at the given block's state. /// - /// May not return None if given BlockID::Latest. + /// May not return None if given BlockId::Latest. /// Returns None if and only if the block's root hash has been pruned from the DB. - fn balance(&self, address: &Address, id: BlockID) -> Option<U256>; + fn balance(&self, address: &Address, id: BlockId) -> Option<U256>; /// Get address balance at the latest block's state. fn latest_balance(&self, address: &Address) -> U256 { - self.balance(address, BlockID::Latest) - .expect("balance will return Some if given BlockID::Latest. balance was given BlockID::Latest \ + self.balance(address, BlockId::Latest) + .expect("balance will return Some if given BlockId::Latest. balance was given BlockId::Latest \ Therefore balance has returned Some; qed") } /// Get value of the storage at given position at the given block's state. /// - /// May not return None if given BlockID::Latest. + /// May not return None if given BlockId::Latest. /// Returns None if and only if the block's root hash has been pruned from the DB. - fn storage_at(&self, address: &Address, position: &H256, id: BlockID) -> Option<H256>; + fn storage_at(&self, address: &Address, position: &H256, id: BlockId) -> Option<H256>; /// Get value of the storage at given position at the latest block's state. fn latest_storage_at(&self, address: &Address, position: &H256) -> H256 { - self.storage_at(address, position, BlockID::Latest) - .expect("storage_at will return Some if given BlockID::Latest. storage_at was given BlockID::Latest. \ + self.storage_at(address, position, BlockId::Latest) + .expect("storage_at will return Some if given BlockId::Latest. storage_at was given BlockId::Latest. \ Therefore storage_at has returned Some; qed") } /// Get a list of all accounts in the block `id`, if fat DB is in operation, otherwise `None`. /// If `after` is set the list starts with the following item. - fn list_accounts(&self, id: BlockID, after: Option<&Address>, count: u64) -> Option<Vec<Address>>; + fn list_accounts(&self, id: BlockId, after: Option<&Address>, count: u64) -> Option<Vec<Address>>; /// Get a list of all storage keys in the block `id`, if fat DB is in operation, otherwise `None`. /// If `after` is set the list starts with the following item. - fn list_storage(&self, id: BlockID, account: &Address, after: Option<&H256>, count: u64) -> Option<Vec<H256>>; + fn list_storage(&self, id: BlockId, account: &Address, after: Option<&H256>, count: u64) -> Option<Vec<H256>>; /// Get transaction with given hash. - fn transaction(&self, id: TransactionID) -> Option<LocalizedTransaction>; + fn transaction(&self, id: TransactionId) -> Option<LocalizedTransaction>; /// Get the hash of block that contains the transaction, if any. - fn transaction_block(&self, id: TransactionID) -> Option<H256>; + fn transaction_block(&self, id: TransactionId) -> Option<H256>; /// Get uncle with given id. - fn uncle(&self, id: UncleID) -> Option<Bytes>; + fn uncle(&self, id: UncleId) -> Option<Bytes>; /// Get transaction receipt with given hash. - fn transaction_receipt(&self, id: TransactionID) -> Option<LocalizedReceipt>; + fn transaction_receipt(&self, id: TransactionId) -> Option<LocalizedReceipt>; /// Get a tree route between `from` and `to`. /// See `BlockChain::tree_route`. @@ -173,16 +173,16 @@ pub trait BlockChainClient : Sync + Send { fn best_block_header(&self) -> Bytes; /// Returns numbers of blocks containing given bloom. - fn blocks_with_bloom(&self, bloom: &H2048, from_block: BlockID, to_block: BlockID) -> Option<Vec<BlockNumber>>; + fn blocks_with_bloom(&self, bloom: &H2048, from_block: BlockId, to_block: BlockId) -> Option<Vec<BlockNumber>>; /// Returns logs matching given filter. fn logs(&self, filter: Filter) -> Vec<LocalizedLogEntry>; /// Makes a non-persistent transaction call. - fn call(&self, t: &SignedTransaction, block: BlockID, analytics: CallAnalytics) -> Result<Executed, CallError>; + fn call(&self, t: &SignedTransaction, block: BlockId, analytics: CallAnalytics) -> Result<Executed, CallError>; /// Replays a given transaction for inspection. - fn replay(&self, t: TransactionID, analytics: CallAnalytics) -> Result<Executed, CallError>; + fn replay(&self, t: TransactionId, analytics: CallAnalytics) -> Result<Executed, CallError>; /// Returns traces matching given filter. fn filter_traces(&self, filter: TraceFilter) -> Option<Vec<LocalizedTrace>>; @@ -191,10 +191,10 @@ pub trait BlockChainClient : Sync + Send { fn trace(&self, trace: TraceId) -> Option<LocalizedTrace>; /// Returns traces created by transaction. - fn transaction_traces(&self, trace: TransactionID) -> Option<Vec<LocalizedTrace>>; + fn transaction_traces(&self, trace: TransactionId) -> Option<Vec<LocalizedTrace>>; /// Returns traces created by transaction from block. - fn block_traces(&self, trace: BlockID) -> Option<Vec<LocalizedTrace>>; + fn block_traces(&self, trace: BlockId) -> Option<Vec<LocalizedTrace>>; /// Get last hashes starting from best block. fn last_hashes(&self) -> LastHashes; @@ -211,7 +211,7 @@ pub trait BlockChainClient : Sync + Send { let mut corpus = Vec::new(); while corpus.is_empty() { for _ in 0..sample_size { - let block_bytes = self.block(BlockID::Hash(h)).expect("h is either the best_block_hash or an ancestor; qed"); + let block_bytes = self.block(BlockId::Hash(h)).expect("h is either the best_block_hash or an ancestor; qed"); let block = BlockView::new(&block_bytes); let header = block.header_view(); if header.number() == 0 { @@ -249,11 +249,11 @@ pub trait BlockChainClient : Sync + Send { /// Set the mode. fn set_mode(&self, mode: Mode); - /// Returns engine-related extra info for `BlockID`. - fn block_extra_info(&self, id: BlockID) -> Option<BTreeMap<String, String>>; + /// Returns engine-related extra info for `BlockId`. + fn block_extra_info(&self, id: BlockId) -> Option<BTreeMap<String, String>>; - /// Returns engine-related extra info for `UncleID`. - fn uncle_extra_info(&self, id: UncleID) -> Option<BTreeMap<String, String>>; + /// Returns engine-related extra info for `UncleId`. + fn uncle_extra_info(&self, id: UncleId) -> Option<BTreeMap<String, String>>; /// Returns information about pruning/data availability. fn pruning_info(&self) -> PruningInfo; @@ -288,15 +288,15 @@ pub trait ProvingBlockChainClient: BlockChainClient { /// Returns a vector of raw trie nodes (in order from the root) proving the storage query. /// Nodes after `from_level` may be omitted. /// An empty vector indicates unservable query. - fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockID) -> Vec<Bytes>; + fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockId) -> Vec<Bytes>; /// Prove account existence at a specific block id. /// The key is the keccak hash of the account's address. /// Returns a vector of raw trie nodes (in order from the root) proving the query. /// Nodes after `from_level` may be omitted. /// An empty vector indicates unservable query. - fn prove_account(&self, key1: H256, from_level: u32, id: BlockID) -> Vec<Bytes>; + fn prove_account(&self, key1: H256, from_level: u32, id: BlockId) -> Vec<Bytes>; /// Get code by address hash. - fn code_by_hash(&self, account_key: H256, id: BlockID) -> Bytes; + fn code_by_hash(&self, account_key: H256, id: BlockId) -> Bytes; } \ No newline at end of file diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index b171856b9..ad541391d 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -23,7 +23,7 @@ use account_provider::{AccountProvider, Error as AccountError}; use views::{BlockView, HeaderView}; use header::Header; use state::{State, CleanupMode}; -use client::{MiningBlockChainClient, Executive, Executed, EnvInfo, TransactOptions, BlockID, CallAnalytics, TransactionID}; +use client::{MiningBlockChainClient, Executive, Executed, EnvInfo, TransactOptions, BlockId, CallAnalytics, TransactionId}; use client::TransactionImportResult; use executive::contract_address; use block::{ClosedBlock, SealedBlock, IsBlock, Block}; @@ -585,7 +585,7 @@ impl Miner { let best_block_header: Header = ::rlp::decode(&chain.best_block_header()); transactions.into_iter() .map(|tx| { - if chain.transaction_block(TransactionID::Hash(tx.hash())).is_some() { + if chain.transaction_block(TransactionId::Hash(tx.hash())).is_some() { debug!(target: "miner", "Rejected tx {:?}: already in the blockchain", tx.hash()); return Err(Error::Transaction(TransactionError::AlreadyImported)); } @@ -701,7 +701,7 @@ impl MinerService for Miner { Ok(ret) }, None => { - chain.call(t, BlockID::Latest, analytics) + chain.call(t, BlockId::Latest, analytics) } } } @@ -1094,7 +1094,7 @@ impl MinerService for Miner { fn fetch_transactions(chain: &MiningBlockChainClient, hash: &H256) -> Vec<SignedTransaction> { let block = chain - .block(BlockID::Hash(*hash)) + .block(BlockId::Hash(*hash)) // Client should send message after commit to db and inserting to chain. .expect("Expected in-chain blocks."); let block = BlockView::new(&block); diff --git a/ethcore/src/snapshot/error.rs b/ethcore/src/snapshot/error.rs index d417695f0..cc84d8e48 100644 --- a/ethcore/src/snapshot/error.rs +++ b/ethcore/src/snapshot/error.rs @@ -18,7 +18,7 @@ use std::fmt; -use ids::BlockID; +use ids::BlockId; use util::H256; use util::trie::TrieError; @@ -28,7 +28,7 @@ use rlp::DecoderError; #[derive(Debug)] pub enum Error { /// Invalid starting block for snapshot. - InvalidStartingBlock(BlockID), + InvalidStartingBlock(BlockId), /// Block not found. BlockNotFound(H256), /// Incomplete chain. diff --git a/ethcore/src/snapshot/mod.rs b/ethcore/src/snapshot/mod.rs index 408941309..9b45f2687 100644 --- a/ethcore/src/snapshot/mod.rs +++ b/ethcore/src/snapshot/mod.rs @@ -27,7 +27,7 @@ use account_db::{AccountDB, AccountDBMut}; use blockchain::{BlockChain, BlockProvider}; use engines::Engine; use header::Header; -use ids::BlockID; +use ids::BlockId; use views::BlockView; use util::{Bytes, Hashable, HashDB, DBValue, snappy, U256, Uint}; @@ -129,7 +129,7 @@ pub fn take_snapshot<W: SnapshotWriter + Send>( p: &Progress ) -> Result<(), Error> { let start_header = try!(chain.block_header(&block_at) - .ok_or(Error::InvalidStartingBlock(BlockID::Hash(block_at)))); + .ok_or(Error::InvalidStartingBlock(BlockId::Hash(block_at)))); let state_root = start_header.state_root(); let number = start_header.number(); diff --git a/ethcore/src/snapshot/service.rs b/ethcore/src/snapshot/service.rs index 89ee68de0..05c4c1f9f 100644 --- a/ethcore/src/snapshot/service.rs +++ b/ethcore/src/snapshot/service.rs @@ -30,7 +30,7 @@ use blockchain::BlockChain; use client::{BlockChainClient, Client}; use engines::Engine; use error::Error; -use ids::BlockID; +use ids::BlockId; use service::ClientIoMessage; use io::IoChannel; @@ -354,7 +354,7 @@ impl Service { let writer = try!(LooseWriter::new(temp_dir.clone())); let guard = Guard::new(temp_dir.clone()); - let res = client.take_snapshot(writer, BlockID::Number(num), &self.progress); + let res = client.take_snapshot(writer, BlockId::Number(num), &self.progress); self.taking_snapshot.store(false, Ordering::SeqCst); if let Err(e) = res { diff --git a/ethcore/src/snapshot/tests/service.rs b/ethcore/src/snapshot/tests/service.rs index e136985c6..efdb12323 100644 --- a/ethcore/src/snapshot/tests/service.rs +++ b/ethcore/src/snapshot/tests/service.rs @@ -19,7 +19,7 @@ use std::sync::Arc; use client::{BlockChainClient, Client}; -use ids::BlockID; +use ids::BlockId; use snapshot::service::{Service, ServiceParams}; use snapshot::{self, ManifestData, SnapshotService}; use spec::Spec; @@ -96,8 +96,8 @@ fn restored_is_equivalent() { assert_eq!(service.status(), ::snapshot::RestorationStatus::Inactive); for x in 0..NUM_BLOCKS { - let block1 = client.block(BlockID::Number(x as u64)).unwrap(); - let block2 = client2.block(BlockID::Number(x as u64)).unwrap(); + let block1 = client.block(BlockId::Number(x as u64)).unwrap(); + let block2 = client2.block(BlockId::Number(x as u64)).unwrap(); assert_eq!(block1, block2); } diff --git a/ethcore/src/snapshot/watcher.rs b/ethcore/src/snapshot/watcher.rs index 43439e437..ab4dde134 100644 --- a/ethcore/src/snapshot/watcher.rs +++ b/ethcore/src/snapshot/watcher.rs @@ -18,7 +18,7 @@ use util::Mutex; use client::{BlockChainClient, Client, ChainNotify}; -use ids::BlockID; +use ids::BlockId; use service::ClientIoMessage; use views::HeaderView; @@ -43,7 +43,7 @@ impl<F> Oracle for StandardOracle<F> where F: Send + Sync + Fn() -> bool { fn to_number(&self, hash: H256) -> Option<u64> { - self.client.block_header(BlockID::Hash(hash)).map(|h| HeaderView::new(&h).number()) + self.client.block_header(BlockId::Hash(hash)).map(|h| HeaderView::new(&h).number()) } fn is_major_importing(&self) -> bool { diff --git a/ethcore/src/tests/client.rs b/ethcore/src/tests/client.rs index 427082823..0b688345d 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. use io::IoChannel; -use client::{BlockChainClient, MiningBlockChainClient, Client, ClientConfig, BlockID}; +use client::{BlockChainClient, MiningBlockChainClient, Client, ClientConfig, BlockId}; use state::CleanupMode; use ethereum; use block::IsBlock; @@ -99,7 +99,7 @@ fn imports_good_block() { client.flush_queue(); client.import_verified_blocks(); - let block = client.block_header(BlockID::Number(1)).unwrap(); + let block = client.block_header(BlockId::Number(1)).unwrap(); assert!(!block.is_empty()); } @@ -117,7 +117,7 @@ fn query_none_block() { IoChannel::disconnected(), &db_config ).unwrap(); - let non_existant = client.block_header(BlockID::Number(188)); + let non_existant = client.block_header(BlockId::Number(188)); assert!(non_existant.is_none()); } @@ -125,7 +125,7 @@ fn query_none_block() { fn query_bad_block() { let client_result = get_test_client_with_blocks(vec![get_bad_state_dummy_block()]); let client = client_result.reference(); - let bad_block:Option<Bytes> = client.block_header(BlockID::Number(1)); + let bad_block:Option<Bytes> = client.block_header(BlockId::Number(1)); assert!(bad_block.is_none()); } @@ -146,8 +146,8 @@ fn returns_logs() { let client_result = get_test_client_with_blocks(vec![dummy_block.clone()]); let client = client_result.reference(); let logs = client.logs(Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: None, topics: vec![], limit: None, @@ -161,8 +161,8 @@ fn returns_logs_with_limit() { let client_result = get_test_client_with_blocks(vec![dummy_block.clone()]); let client = client_result.reference(); let logs = client.logs(Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: None, topics: vec![], limit: Some(2), @@ -176,7 +176,7 @@ fn returns_block_body() { let client_result = get_test_client_with_blocks(vec![dummy_block.clone()]); let client = client_result.reference(); let block = BlockView::new(&dummy_block); - let body = client.block_body(BlockID::Hash(block.header().hash())).unwrap(); + let body = client.block_body(BlockId::Hash(block.header().hash())).unwrap(); let body = Rlp::new(&body); assert_eq!(body.item_count(), 2); assert_eq!(body.at(0).as_raw()[..], block.rlp().at(1).as_raw()[..]); @@ -187,7 +187,7 @@ fn returns_block_body() { fn imports_block_sequence() { let client_result = generate_dummy_client(6); let client = client_result.reference(); - let block = client.block_header(BlockID::Number(5)).unwrap(); + let block = client.block_header(BlockId::Number(5)).unwrap(); assert!(!block.is_empty()); } diff --git a/ethcore/src/tests/rpc.rs b/ethcore/src/tests/rpc.rs index b021e750d..2da94b3d0 100644 --- a/ethcore/src/tests/rpc.rs +++ b/ethcore/src/tests/rpc.rs @@ -19,7 +19,7 @@ use nanoipc; use std::sync::Arc; use std::sync::atomic::{Ordering, AtomicBool}; -use client::{Client, BlockChainClient, ClientConfig, BlockID}; +use client::{Client, BlockChainClient, ClientConfig, BlockId}; use client::remote::RemoteClient; use tests::helpers::*; use devtools::*; @@ -71,7 +71,7 @@ fn can_query_block() { run_test_worker(scope, stop_guard.share(), socket_path); let remote_client = nanoipc::generic_client::<RemoteClient<_>>(socket_path).unwrap(); - let non_existant_block = remote_client.block_header(BlockID::Number(999)); + let non_existant_block = remote_client.block_header(BlockId::Number(999)); assert!(non_existant_block.is_none()); }) diff --git a/ethcore/src/trace/db.rs b/ethcore/src/trace/db.rs index 14129d4d9..174c9b386 100644 --- a/ethcore/src/trace/db.rs +++ b/ethcore/src/trace/db.rs @@ -94,7 +94,7 @@ impl Key<blooms::BloomGroup> for TraceGroupPosition { } #[derive(Debug, Hash, Eq, PartialEq)] -enum CacheID { +enum CacheId { Trace(H256), Bloom(TraceGroupPosition), } @@ -104,7 +104,7 @@ pub struct TraceDB<T> where T: DatabaseExtras { // cache traces: RwLock<HashMap<H256, FlatBlockTraces>>, blooms: RwLock<HashMap<TraceGroupPosition, blooms::BloomGroup>>, - cache_manager: RwLock<CacheManager<CacheID>>, + cache_manager: RwLock<CacheManager<CacheId>>, // db tracesdb: Arc<Database>, // config, @@ -119,7 +119,7 @@ impl<T> BloomGroupDatabase for TraceDB<T> where T: DatabaseExtras { fn blooms_at(&self, position: &GroupPosition) -> Option<BloomGroup> { let position = TraceGroupPosition::from(position.clone()); let result = self.tracesdb.read_with_cache(db::COL_TRACE, &self.blooms, &position).map(Into::into); - self.note_used(CacheID::Bloom(position)); + self.note_used(CacheId::Bloom(position)); result } } @@ -152,7 +152,7 @@ impl<T> TraceDB<T> where T: DatabaseExtras { } /// Let the cache system know that a cacheable item has been used. - fn note_used(&self, id: CacheID) { + fn note_used(&self, id: CacheId) { let mut cache_manager = self.cache_manager.write(); cache_manager.note_used(id); } @@ -168,8 +168,8 @@ impl<T> TraceDB<T> where T: DatabaseExtras { cache_manager.collect_garbage(current_size, | ids | { for id in &ids { match *id { - CacheID::Trace(ref h) => { traces.remove(h); }, - CacheID::Bloom(ref h) => { blooms.remove(h); }, + CacheId::Trace(ref h) => { traces.remove(h); }, + CacheId::Bloom(ref h) => { blooms.remove(h); }, } } traces.shrink_to_fit(); @@ -182,7 +182,7 @@ impl<T> TraceDB<T> where T: DatabaseExtras { /// Returns traces for block with hash. fn traces(&self, block_hash: &H256) -> Option<FlatBlockTraces> { let result = self.tracesdb.read_with_cache(db::COL_TRACE, &self.traces, block_hash); - self.note_used(CacheID::Trace(block_hash.clone())); + self.note_used(CacheId::Trace(block_hash.clone())); result } @@ -289,7 +289,7 @@ impl<T> TraceDatabase for TraceDB<T> where T: DatabaseExtras { batch.extend_with_cache(db::COL_TRACE, &mut *blooms, blooms_to_insert, CacheUpdatePolicy::Remove); // note_used must be called after locking blooms to avoid cache/traces deadlock on garbage collection for key in blooms_keys { - self.note_used(CacheID::Bloom(key)); + self.note_used(CacheId::Bloom(key)); } } @@ -300,7 +300,7 @@ impl<T> TraceDatabase for TraceDB<T> where T: DatabaseExtras { // cause this value might be queried by hash later batch.write_with_cache(db::COL_TRACE, &mut *traces, request.block_hash, request.traces, CacheUpdatePolicy::Overwrite); // note_used must be called after locking traces to avoid cache/traces deadlock on garbage collection - self.note_used(CacheID::Trace(request.block_hash.clone())); + self.note_used(CacheId::Trace(request.block_hash.clone())); } } diff --git a/ethcore/src/types/filter.rs b/ethcore/src/types/filter.rs index e3487e5f6..ecc997f71 100644 --- a/ethcore/src/types/filter.rs +++ b/ethcore/src/types/filter.rs @@ -18,17 +18,17 @@ use util::{Address, H256, Hashable, H2048}; use util::bloom::Bloomable; -use client::BlockID; +use client::BlockId; use log_entry::LogEntry; /// Blockchain Filter. #[derive(Binary, Debug, PartialEq)] pub struct Filter { /// Blockchain will be searched from this block. - pub from_block: BlockID, + pub from_block: BlockId, /// Till this block. - pub to_block: BlockID, + pub to_block: BlockId, /// Search addresses. /// @@ -114,14 +114,14 @@ impl Filter { mod tests { use util::FixedHash; use filter::Filter; - use client::BlockID; + use client::BlockId; use log_entry::LogEntry; #[test] fn test_bloom_possibilities_none() { let none_filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: None, topics: vec![None, None, None, None], limit: None, @@ -136,8 +136,8 @@ mod tests { #[test] fn test_bloom_possibilities_single_address_and_topic() { let filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec!["b372018f3be9e171df0581136b59d2faf73a7d5d".into()]), topics: vec![ Some(vec!["ff74e91598aed6ae5d2fdcf8b24cd2c7be49a0808112a305069355b7160f23f9".into()]), @@ -155,8 +155,8 @@ mod tests { #[test] fn test_bloom_possibilities_single_address_and_many_topics() { let filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec!["b372018f3be9e171df0581136b59d2faf73a7d5d".into()]), topics: vec![ Some(vec!["ff74e91598aed6ae5d2fdcf8b24cd2c7be49a0808112a305069355b7160f23f9".into()]), @@ -174,8 +174,8 @@ mod tests { #[test] fn test_bloom_possibilites_multiple_addresses_and_topics() { let filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec![ "b372018f3be9e171df0581136b59d2faf73a7d5d".into(), "b372018f3be9e171df0581136b59d2faf73a7d5d".into(), @@ -204,8 +204,8 @@ mod tests { #[test] fn test_filter_matches() { let filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec!["b372018f3be9e171df0581136b59d2faf73a7d5d".into()]), topics: vec![ Some(vec!["ff74e91598aed6ae5d2fdcf8b24cd2c7be49a0808112a305069355b7160f23f9".into()]), diff --git a/ethcore/src/types/ids.rs b/ethcore/src/types/ids.rs index 1fe81f392..2c3c777b4 100644 --- a/ethcore/src/types/ids.rs +++ b/ethcore/src/types/ids.rs @@ -21,7 +21,7 @@ use header::BlockNumber; /// Uniquely identifies block. #[derive(Debug, PartialEq, Copy, Clone, Hash, Eq, Binary)] -pub enum BlockID { +pub enum BlockId { /// Block's sha3. /// Querying by hash is always faster. Hash(H256), @@ -37,28 +37,28 @@ pub enum BlockID { /// Uniquely identifies transaction. #[derive(Debug, PartialEq, Clone, Hash, Eq, Binary)] -pub enum TransactionID { +pub enum TransactionId { /// Transaction's sha3. Hash(H256), /// Block id and transaction index within this block. /// Querying by block position is always faster. - Location(BlockID, usize) + Location(BlockId, usize) } /// Uniquely identifies Trace. #[derive(Binary)] pub struct TraceId { /// Transaction - pub transaction: TransactionID, + pub transaction: TransactionId, /// Trace address within transaction. pub address: Vec<usize>, } /// Uniquely identifies Uncle. #[derive(Debug, PartialEq, Eq, Copy, Clone, Binary)] -pub struct UncleID { +pub struct UncleId { /// Block id. - pub block: BlockID, + pub block: BlockId, /// Position in block. pub position: usize } diff --git a/ethcore/src/types/trace_filter.rs b/ethcore/src/types/trace_filter.rs index c17cc9e85..af9d7c3ee 100644 --- a/ethcore/src/types/trace_filter.rs +++ b/ethcore/src/types/trace_filter.rs @@ -18,13 +18,13 @@ use std::ops::Range; use util::{Address}; -use types::ids::BlockID; +use types::ids::BlockId; /// Easy to use trace filter. #[derive(Binary)] pub struct Filter { /// Range of filtering. - pub range: Range<BlockID>, + pub range: Range<BlockId>, /// From address. pub from_address: Vec<Address>, /// To address. diff --git a/ethstore/src/dir/disk.rs b/ethstore/src/dir/disk.rs index 56b2c1ccb..c86123d1a 100644 --- a/ethstore/src/dir/disk.rs +++ b/ethstore/src/dir/disk.rs @@ -20,7 +20,7 @@ use std::collections::HashMap; use time; use ethkey::Address; use {json, SafeAccount, Error}; -use json::UUID; +use json::Uuid; use super::KeyDirectory; const IGNORED_FILES: &'static [&'static str] = &["thumbs.db", "address_book.json"]; @@ -113,7 +113,7 @@ impl KeyDirectory for DiskDirectory { // build file path let filename = account.filename.as_ref().cloned().unwrap_or_else(|| { let timestamp = time::strftime("%Y-%m-%dT%H-%M-%S", &time::now_utc()).expect("Time-format string is valid."); - format!("UTC--{}Z--{}", timestamp, UUID::from(account.id)) + format!("UTC--{}Z--{}", timestamp, Uuid::from(account.id)) }); // update account filename diff --git a/ethstore/src/ethstore.rs b/ethstore/src/ethstore.rs index 4991c4714..3747431fb 100644 --- a/ethstore/src/ethstore.rs +++ b/ethstore/src/ethstore.rs @@ -24,7 +24,7 @@ use dir::KeyDirectory; use account::SafeAccount; use {Error, SecretStore}; use json; -use json::UUID; +use json::Uuid; use parking_lot::RwLock; use presale::PresaleWallet; use import; @@ -154,7 +154,7 @@ impl SecretStore for EthStore { account.public(password) } - fn uuid(&self, address: &Address) -> Result<UUID, Error> { + fn uuid(&self, address: &Address) -> Result<Uuid, Error> { let account = try!(self.get(address)); Ok(account.id.into()) } diff --git a/ethstore/src/json/error.rs b/ethstore/src/json/error.rs index 5e077cfad..a3ea4d326 100644 --- a/ethstore/src/json/error.rs +++ b/ethstore/src/json/error.rs @@ -21,7 +21,7 @@ pub enum Error { UnsupportedCipher, InvalidCipherParams, UnsupportedKdf, - InvalidUUID, + InvalidUuid, UnsupportedVersion, InvalidCiphertext, InvalidH256, @@ -31,7 +31,7 @@ pub enum Error { impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { match *self { - Error::InvalidUUID => write!(f, "Invalid UUID"), + Error::InvalidUuid => write!(f, "Invalid Uuid"), Error::UnsupportedVersion => write!(f, "Unsupported version"), Error::UnsupportedKdf => write!(f, "Unsupported kdf"), Error::InvalidCiphertext => write!(f, "Invalid ciphertext"), diff --git a/ethstore/src/json/id.rs b/ethstore/src/json/id.rs index ff282a9f8..664716d95 100644 --- a/ethstore/src/json/id.rs +++ b/ethstore/src/json/id.rs @@ -23,15 +23,15 @@ use super::Error; /// Universaly unique identifier. #[derive(Debug, PartialEq)] -pub struct UUID([u8; 16]); +pub struct Uuid([u8; 16]); -impl From<[u8; 16]> for UUID { +impl From<[u8; 16]> for Uuid { fn from(uuid: [u8; 16]) -> Self { - UUID(uuid) + Uuid(uuid) } } -impl<'a> Into<String> for &'a UUID { +impl<'a> Into<String> for &'a Uuid { fn into(self) -> String { let d1 = &self.0[0..4]; let d2 = &self.0[4..6]; @@ -42,44 +42,44 @@ impl<'a> Into<String> for &'a UUID { } } -impl Into<String> for UUID { +impl Into<String> for Uuid { fn into(self) -> String { Into::into(&self) } } -impl Into<[u8; 16]> for UUID { +impl Into<[u8; 16]> for Uuid { fn into(self) -> [u8; 16] { self.0 } } -impl fmt::Display for UUID { +impl fmt::Display for Uuid { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - let s: String = (self as &UUID).into(); + let s: String = (self as &Uuid).into(); write!(f, "{}", s) } } fn copy_into(from: &str, into: &mut [u8]) -> Result<(), Error> { - let from = try!(from.from_hex().map_err(|_| Error::InvalidUUID)); + let from = try!(from.from_hex().map_err(|_| Error::InvalidUuid)); if from.len() != into.len() { - return Err(Error::InvalidUUID); + return Err(Error::InvalidUuid); } into.copy_from_slice(&from); Ok(()) } -impl str::FromStr for UUID { +impl str::FromStr for Uuid { type Err = Error; fn from_str(s: &str) -> Result<Self, Self::Err> { let parts: Vec<&str> = s.split("-").collect(); if parts.len() != 5 { - return Err(Error::InvalidUUID); + return Err(Error::InvalidUuid); } let mut uuid = [0u8; 16]; @@ -90,17 +90,17 @@ impl str::FromStr for UUID { try!(copy_into(parts[3], &mut uuid[8..10])); try!(copy_into(parts[4], &mut uuid[10..16])); - Ok(UUID(uuid)) + Ok(Uuid(uuid)) } } -impl From<&'static str> for UUID { +impl From<&'static str> for Uuid { fn from(s: &'static str) -> Self { s.parse().expect(&format!("invalid string literal for {}: '{}'", stringify!(Self), s)) } } -impl Serialize for UUID { +impl Serialize for Uuid { fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer { let s: String = self.into(); @@ -108,17 +108,17 @@ impl Serialize for UUID { } } -impl Deserialize for UUID { +impl Deserialize for Uuid { fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: Deserializer { - deserializer.deserialize(UUIDVisitor) + deserializer.deserialize(UuidVisitor) } } -struct UUIDVisitor; +struct UuidVisitor; -impl Visitor for UUIDVisitor { - type Value = UUID; +impl Visitor for UuidVisitor { + type Value = Uuid; fn visit_str<E>(&mut self, value: &str) -> Result<Self::Value, E> where E: SerdeError { value.parse().map_err(SerdeError::custom) @@ -131,18 +131,18 @@ impl Visitor for UUIDVisitor { #[cfg(test)] mod tests { - use super::UUID; + use super::Uuid; #[test] fn uuid_from_str() { - let uuid: UUID = "3198bc9c-6672-5ab3-d995-4942343ae5b6".into(); - assert_eq!(uuid, UUID::from([0x31, 0x98, 0xbc, 0x9c, 0x66, 0x72, 0x5a, 0xb3, 0xd9, 0x95, 0x49, 0x42, 0x34, 0x3a, 0xe5, 0xb6])); + let uuid: Uuid = "3198bc9c-6672-5ab3-d995-4942343ae5b6".into(); + assert_eq!(uuid, Uuid::from([0x31, 0x98, 0xbc, 0x9c, 0x66, 0x72, 0x5a, 0xb3, 0xd9, 0x95, 0x49, 0x42, 0x34, 0x3a, 0xe5, 0xb6])); } #[test] fn uuid_from_and_to_str() { let from = "3198bc9c-6672-5ab3-d995-4942343ae5b6"; - let uuid: UUID = from.into(); + let uuid: Uuid = from.into(); let to: String = uuid.into(); assert_eq!(from, &to); } diff --git a/ethstore/src/json/key_file.rs b/ethstore/src/json/key_file.rs index 6e37c7c89..093479b3a 100644 --- a/ethstore/src/json/key_file.rs +++ b/ethstore/src/json/key_file.rs @@ -18,11 +18,11 @@ use std::io::{Read, Write}; use serde::{Deserialize, Deserializer, Error}; use serde::de::{Visitor, MapVisitor}; use serde_json; -use super::{UUID, Version, Crypto, H160}; +use super::{Uuid, Version, Crypto, H160}; #[derive(Debug, PartialEq, Serialize)] pub struct KeyFile { - pub id: UUID, + pub id: Uuid, pub version: Version, pub crypto: Crypto, pub address: H160, @@ -31,7 +31,7 @@ pub struct KeyFile { } enum KeyFileField { - ID, + Id, Version, Crypto, Address, @@ -56,7 +56,7 @@ impl Visitor for KeyFileFieldVisitor { where E: Error { match value { - "id" => Ok(KeyFileField::ID), + "id" => Ok(KeyFileField::Id), "version" => Ok(KeyFileField::Version), "crypto" => Ok(KeyFileField::Crypto), "Crypto" => Ok(KeyFileField::Crypto), @@ -94,7 +94,7 @@ impl Visitor for KeyFileVisitor { loop { match try!(visitor.visit_key()) { - Some(KeyFileField::ID) => { id = Some(try!(visitor.visit_value())); } + Some(KeyFileField::Id) => { id = Some(try!(visitor.visit_value())); } Some(KeyFileField::Version) => { version = Some(try!(visitor.visit_value())); } Some(KeyFileField::Crypto) => { crypto = Some(try!(visitor.visit_value())); } Some(KeyFileField::Address) => { address = Some(try!(visitor.visit_value())); } @@ -153,7 +153,7 @@ impl KeyFile { mod tests { use std::str::FromStr; use serde_json; - use json::{KeyFile, UUID, Version, Crypto, Cipher, Aes128Ctr, Kdf, Scrypt}; + use json::{KeyFile, Uuid, Version, Crypto, Cipher, Aes128Ctr, Kdf, Scrypt}; #[test] fn basic_keyfile() { @@ -183,7 +183,7 @@ mod tests { }"#; let expected = KeyFile { - id: UUID::from_str("8777d9f6-7860-4b9b-88b7-0b57ee6b3a73").unwrap(), + id: Uuid::from_str("8777d9f6-7860-4b9b-88b7-0b57ee6b3a73").unwrap(), version: Version::V3, address: "6edddfc6349aff20bc6467ccf276c5b52487f7a8".into(), crypto: Crypto { diff --git a/ethstore/src/json/mod.rs.in b/ethstore/src/json/mod.rs.in index 133d9821e..8ad48b994 100644 --- a/ethstore/src/json/mod.rs.in +++ b/ethstore/src/json/mod.rs.in @@ -14,7 +14,7 @@ pub use self::cipher::{Cipher, CipherSer, CipherSerParams, Aes128Ctr}; pub use self::crypto::{Crypto, CipherText}; pub use self::error::Error; pub use self::hash::{H128, H160, H256}; -pub use self::id::UUID; +pub use self::id::Uuid; pub use self::kdf::{Kdf, KdfSer, Prf, Pbkdf2, Scrypt, KdfSerParams}; pub use self::key_file::KeyFile; pub use self::presale::{PresaleWallet, Encseed}; diff --git a/ethstore/src/secret_store.rs b/ethstore/src/secret_store.rs index 06f38922b..bf0a4ec44 100644 --- a/ethstore/src/secret_store.rs +++ b/ethstore/src/secret_store.rs @@ -16,7 +16,7 @@ use ethkey::{Address, Message, Signature, Secret, Public}; use Error; -use json::UUID; +use json::Uuid; pub trait SecretStore: Send + Sync { fn insert_account(&self, secret: Secret, password: &str) -> Result<Address, Error>; @@ -30,7 +30,7 @@ pub trait SecretStore: Send + Sync { fn public(&self, account: &Address, password: &str) -> Result<Public, Error>; fn accounts(&self) -> Result<Vec<Address>, Error>; - fn uuid(&self, account: &Address) -> Result<UUID, Error>; + fn uuid(&self, account: &Address) -> Result<Uuid, Error>; fn name(&self, account: &Address) -> Result<String, Error>; fn meta(&self, account: &Address) -> Result<String, Error>; diff --git a/js/src/jsonrpc/interfaces/parity.js b/js/src/jsonrpc/interfaces/parity.js index 067ced1fc..76886af35 100644 --- a/js/src/jsonrpc/interfaces/parity.js +++ b/js/src/jsonrpc/interfaces/parity.js @@ -43,7 +43,7 @@ export default { }, uuid: { type: String, - desc: 'The account UUID, or null if not available/unknown/not applicable.' + desc: 'The account Uuid, or null if not available/unknown/not applicable.' } } } @@ -66,7 +66,7 @@ export default { }, uuid: { type: String, - desc: 'The account UUID, or null if not available/unknown/not applicable.' + desc: 'The account Uuid, or null if not available/unknown/not applicable.' } } } diff --git a/json/src/misc/account_meta.rs b/json/src/misc/account_meta.rs index 400f9b8df..a347a8cf6 100644 --- a/json/src/misc/account_meta.rs +++ b/json/src/misc/account_meta.rs @@ -29,7 +29,7 @@ pub struct AccountMeta { pub name: String, /// The rest of the metadata of the account. pub meta: String, - /// The 128-bit UUID of the account, if it has one (brain-wallets don't). + /// The 128-bit Uuid of the account, if it has one (brain-wallets don't). pub uuid: Option<String>, } diff --git a/parity/blockchain.rs b/parity/blockchain.rs index 0750d369d..a9d81e5c3 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -25,7 +25,7 @@ use io::{PanicHandler, ForwardPanic}; use util::{ToPretty, Uint, U256, H256, Address, Hashable}; use rlp::PayloadInfo; use ethcore::service::ClientService; -use ethcore::client::{Mode, DatabaseCompactionProfile, VMType, BlockImportError, BlockChainClient, BlockID}; +use ethcore::client::{Mode, DatabaseCompactionProfile, VMType, BlockImportError, BlockChainClient, BlockId}; use ethcore::error::ImportError; use ethcore::miner::Miner; use ethcore::verification::queue::VerifierSettings; @@ -101,8 +101,8 @@ pub struct ExportBlockchain { pub wal: bool, pub fat_db: Switch, pub tracing: Switch, - pub from_block: BlockID, - pub to_block: BlockID, + pub from_block: BlockId, + pub to_block: BlockId, pub check_seal: bool, } @@ -119,7 +119,7 @@ pub struct ExportState { pub wal: bool, pub fat_db: Switch, pub tracing: Switch, - pub at: BlockID, + pub at: BlockId, pub storage: bool, pub code: bool, pub min_balance: Option<U256>, @@ -384,7 +384,7 @@ fn execute_export(cmd: ExportBlockchain) -> Result<String, String> { if i % 10000 == 0 { info!("#{}", i); } - let b = try!(client.block(BlockID::Number(i)).ok_or("Error exporting incomplete chain")); + let b = try!(client.block(BlockId::Number(i)).ok_or("Error exporting incomplete chain")); match format { DataFormat::Binary => { out.write(&b).expect("Couldn't write to stream."); } DataFormat::Hex => { out.write_fmt(format_args!("{}", b.pretty())).expect("Couldn't write to stream."); } diff --git a/parity/configuration.rs b/parity/configuration.rs index 60116ef99..5b7c34c27 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -729,7 +729,7 @@ mod tests { use super::*; use cli::Args; use ethcore_rpc::NetworkSettings; - use ethcore::client::{VMType, BlockID}; + use ethcore::client::{VMType, BlockId}; use ethcore::miner::{MinerOptions, PrioritizationStrategy}; use helpers::{replace_home, default_network_config}; use run::RunCmd; @@ -838,8 +838,8 @@ mod tests { wal: true, tracing: Default::default(), fat_db: Default::default(), - from_block: BlockID::Number(1), - to_block: BlockID::Latest, + from_block: BlockId::Number(1), + to_block: BlockId::Latest, check_seal: true, }))); } @@ -860,7 +860,7 @@ mod tests { wal: true, tracing: Default::default(), fat_db: Default::default(), - at: BlockID::Latest, + at: BlockId::Latest, storage: true, code: true, min_balance: None, @@ -884,8 +884,8 @@ mod tests { wal: true, tracing: Default::default(), fat_db: Default::default(), - from_block: BlockID::Number(1), - to_block: BlockID::Latest, + from_block: BlockId::Number(1), + to_block: BlockId::Latest, check_seal: true, }))); } diff --git a/parity/dapps.rs b/parity/dapps.rs index 16ae4dd98..ec6fd8846 100644 --- a/parity/dapps.rs +++ b/parity/dapps.rs @@ -106,7 +106,7 @@ mod server { use util::{Bytes, Address, U256}; use ethcore::transaction::{Transaction, Action}; - use ethcore::client::{Client, BlockChainClient, BlockID}; + use ethcore::client::{Client, BlockChainClient, BlockId}; use rpc_apis; use ethcore_rpc::is_major_importing; @@ -182,7 +182,7 @@ mod server { data: data, }.fake_sign(from); - self.client.call(&transaction, BlockID::Latest, Default::default()) + self.client.call(&transaction, BlockId::Latest, Default::default()) .map_err(|e| format!("{:?}", e)) .map(|executed| { executed.output diff --git a/parity/helpers.rs b/parity/helpers.rs index 654270b64..60a04bc45 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -20,7 +20,7 @@ use std::time::Duration; use std::fs::File; use util::{clean_0x, U256, Uint, Address, path, CompactionProfile}; use util::journaldb::Algorithm; -use ethcore::client::{Mode, BlockID, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType}; +use ethcore::client::{Mode, BlockId, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType}; use ethcore::miner::{PendingSet, GasLimit, PrioritizationStrategy}; use cache::CacheConfig; use dir::DatabaseDirectories; @@ -62,13 +62,13 @@ pub fn to_mode(s: &str, timeout: u64, alarm: u64) -> Result<Mode, String> { } } -pub fn to_block_id(s: &str) -> Result<BlockID, String> { +pub fn to_block_id(s: &str) -> Result<BlockId, String> { if s == "latest" { - Ok(BlockID::Latest) + Ok(BlockId::Latest) } else if let Ok(num) = s.parse() { - Ok(BlockID::Number(num)) + Ok(BlockId::Number(num)) } else if let Ok(hash) = s.parse() { - Ok(BlockID::Hash(hash)) + Ok(BlockId::Hash(hash)) } else { Err("Invalid block.".into()) } @@ -327,7 +327,7 @@ mod tests { use std::io::Write; use devtools::RandomTempPath; use util::{U256}; - use ethcore::client::{Mode, BlockID}; + use ethcore::client::{Mode, BlockId}; use ethcore::miner::PendingSet; use super::{to_duration, to_mode, to_block_id, to_u256, to_pending_set, to_address, to_addresses, to_price, geth_ipc_path, to_bootnodes, password_from_file}; @@ -361,13 +361,13 @@ mod tests { #[test] fn test_to_block_id() { - assert_eq!(to_block_id("latest").unwrap(), BlockID::Latest); - assert_eq!(to_block_id("0").unwrap(), BlockID::Number(0)); - assert_eq!(to_block_id("2").unwrap(), BlockID::Number(2)); - assert_eq!(to_block_id("15").unwrap(), BlockID::Number(15)); + assert_eq!(to_block_id("latest").unwrap(), BlockId::Latest); + assert_eq!(to_block_id("0").unwrap(), BlockId::Number(0)); + assert_eq!(to_block_id("2").unwrap(), BlockId::Number(2)); + assert_eq!(to_block_id("15").unwrap(), BlockId::Number(15)); assert_eq!( to_block_id("9fc84d84f6a785dc1bd5abacfcf9cbdd3b6afb80c0f799bfb2fd42c44a0c224e").unwrap(), - BlockID::Hash("9fc84d84f6a785dc1bd5abacfcf9cbdd3b6afb80c0f799bfb2fd42c44a0c224e".parse().unwrap()) + BlockId::Hash("9fc84d84f6a785dc1bd5abacfcf9cbdd3b6afb80c0f799bfb2fd42c44a0c224e".parse().unwrap()) ); } diff --git a/parity/informant.rs b/parity/informant.rs index d3e3c8a20..1caeb1b7c 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -184,12 +184,12 @@ impl ChainNotify for Informant { let ripe = Instant::now() > *last_import + Duration::from_secs(1) && !importing; let txs_imported = imported.iter() .take(imported.len() - if ripe {1} else {0}) - .filter_map(|h| self.client.block(BlockID::Hash(*h))) + .filter_map(|h| self.client.block(BlockId::Hash(*h))) .map(|b| BlockView::new(&b).transactions_count()) .sum(); if ripe { - if let Some(block) = imported.last().and_then(|h| self.client.block(BlockID::Hash(*h))) { + if let Some(block) = imported.last().and_then(|h| self.client.block(BlockId::Hash(*h))) { let view = BlockView::new(&block); let header = view.header(); let tx_count = view.transactions_count(); diff --git a/parity/snapshot.rs b/parity/snapshot.rs index d8323084d..804047596 100644 --- a/parity/snapshot.rs +++ b/parity/snapshot.rs @@ -26,7 +26,7 @@ use ethcore::snapshot::service::Service as SnapshotService; use ethcore::service::ClientService; use ethcore::client::{Mode, DatabaseCompactionProfile, VMType}; use ethcore::miner::Miner; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use cache::CacheConfig; use params::{SpecType, Pruning, Switch, tracing_switch_to_bool, fatdb_switch_to_bool}; @@ -60,7 +60,7 @@ pub struct SnapshotCommand { pub file_path: Option<String>, pub wal: bool, pub kind: Kind, - pub block_at: BlockID, + pub block_at: BlockId, } // helper for reading chunks from arbitrary reader and feeding them into the diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index 6b9f47de3..d68d59e59 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -32,7 +32,7 @@ use util::sha3::*; use util::{FromHex, Mutex}; use rlp::{self, UntrustedRlp, View}; use ethcore::account_provider::AccountProvider; -use ethcore::client::{MiningBlockChainClient, BlockID, TransactionID, UncleID}; +use ethcore::client::{MiningBlockChainClient, BlockId, TransactionId, UncleId}; use ethcore::header::{Header as BlockHeader, BlockNumber as EthBlockNumber}; use ethcore::block::IsBlock; use ethcore::views::*; @@ -119,7 +119,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM> EthClient<C, SN, S, M, EM> where } } - fn block(&self, id: BlockID, include_txs: bool) -> Result<Option<RichBlock>, Error> { + fn block(&self, id: BlockId, include_txs: bool) -> Result<Option<RichBlock>, Error> { let client = take_weak!(self.client); match (client.block(id.clone()), client.block_total_difficulty(id)) { (Some(bytes), Some(total_difficulty)) => { @@ -159,20 +159,20 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM> EthClient<C, SN, S, M, EM> where } } - fn transaction(&self, id: TransactionID) -> Result<Option<Transaction>, Error> { + fn transaction(&self, id: TransactionId) -> Result<Option<Transaction>, Error> { match take_weak!(self.client).transaction(id) { Some(t) => Ok(Some(Transaction::from(t))), None => Ok(None), } } - fn uncle(&self, id: UncleID) -> Result<Option<RichBlock>, Error> { + fn uncle(&self, id: UncleId) -> Result<Option<RichBlock>, Error> { let client = take_weak!(self.client); let uncle: BlockHeader = match client.uncle(id) { Some(rlp) => rlp::decode(&rlp), None => { return Ok(None); } }; - let parent_difficulty = match client.block_total_difficulty(BlockID::Hash(uncle.parent_hash().clone())) { + let parent_difficulty = match client.block_total_difficulty(BlockId::Hash(uncle.parent_hash().clone())) { Some(difficulty) => difficulty, None => { return Ok(None); } }; @@ -393,7 +393,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM> Eth for EthClient<C, SN, S, M, EM> where fn block_transaction_count_by_hash(&self, hash: RpcH256) -> Result<Option<RpcU256>, Error> { try!(self.active()); Ok( - take_weak!(self.client).block(BlockID::Hash(hash.into())) + take_weak!(self.client).block(BlockId::Hash(hash.into())) .map(|bytes| BlockView::new(&bytes).transactions_count().into()) ) } @@ -416,7 +416,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM> Eth for EthClient<C, SN, S, M, EM> where try!(self.active()); Ok( - take_weak!(self.client).block(BlockID::Hash(hash.into())) + take_weak!(self.client).block(BlockId::Hash(hash.into())) .map(|bytes| BlockView::new(&bytes).uncles_count().into()) ) } @@ -449,7 +449,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM> Eth for EthClient<C, SN, S, M, EM> where fn block_by_hash(&self, hash: RpcH256, include_txs: bool) -> Result<Option<RichBlock>, Error> { try!(self.active()); - self.block(BlockID::Hash(hash.into()), include_txs) + self.block(BlockId::Hash(hash.into()), include_txs) } fn block_by_number(&self, num: BlockNumber, include_txs: bool) -> Result<Option<RichBlock>, Error> { @@ -463,19 +463,19 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM> Eth for EthClient<C, SN, S, M, EM> where let hash: H256 = hash.into(); let miner = take_weak!(self.miner); let client = take_weak!(self.client); - Ok(try!(self.transaction(TransactionID::Hash(hash))).or_else(|| miner.transaction(client.chain_info().best_block_number, &hash).map(Into::into))) + Ok(try!(self.transaction(TransactionId::Hash(hash))).or_else(|| miner.transaction(client.chain_info().best_block_number, &hash).map(Into::into))) } fn transaction_by_block_hash_and_index(&self, hash: RpcH256, index: Index) -> Result<Option<Transaction>, Error> { try!(self.active()); - self.transaction(TransactionID::Location(BlockID::Hash(hash.into()), index.value())) + self.transaction(TransactionId::Location(BlockId::Hash(hash.into()), index.value())) } fn transaction_by_block_number_and_index(&self, num: BlockNumber, index: Index) -> Result<Option<Transaction>, Error> { try!(self.active()); - self.transaction(TransactionID::Location(num.into(), index.value())) + self.transaction(TransactionId::Location(num.into(), index.value())) } fn transaction_receipt(&self, hash: RpcH256) -> Result<Option<Receipt>, Error> { @@ -488,7 +488,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM> Eth for EthClient<C, SN, S, M, EM> where (Some(receipt), true) => Ok(Some(receipt.into())), _ => { let client = take_weak!(self.client); - let receipt = client.transaction_receipt(TransactionID::Hash(hash)); + let receipt = client.transaction_receipt(TransactionId::Hash(hash)); Ok(receipt.map(Into::into)) } } @@ -497,13 +497,13 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM> Eth for EthClient<C, SN, S, M, EM> where fn uncle_by_block_hash_and_index(&self, hash: RpcH256, index: Index) -> Result<Option<RichBlock>, Error> { try!(self.active()); - self.uncle(UncleID { block: BlockID::Hash(hash.into()), position: index.value() }) + self.uncle(UncleId { block: BlockId::Hash(hash.into()), position: index.value() }) } fn uncle_by_block_number_and_index(&self, num: BlockNumber, index: Index) -> Result<Option<RichBlock>, Error> { try!(self.active()); - self.uncle(UncleID { block: num.into(), position: index.value() }) + self.uncle(UncleId { block: num.into(), position: index.value() }) } fn compilers(&self) -> Result<Vec<String>, Error> { diff --git a/rpc/src/v1/impls/eth_filter.rs b/rpc/src/v1/impls/eth_filter.rs index dd1c937ac..695ff5251 100644 --- a/rpc/src/v1/impls/eth_filter.rs +++ b/rpc/src/v1/impls/eth_filter.rs @@ -21,7 +21,7 @@ use std::collections::HashSet; use jsonrpc_core::*; use ethcore::miner::MinerService; use ethcore::filter::Filter as EthcoreFilter; -use ethcore::client::{BlockChainClient, BlockID}; +use ethcore::client::{BlockChainClient, BlockId}; use util::Mutex; use v1::traits::EthFilter; use v1::types::{BlockNumber, Index, Filter, FilterChanges, Log, H256 as RpcH256, U256 as RpcU256}; @@ -98,7 +98,7 @@ impl<C, M> EthFilter for EthFilterClient<C, M> // + 1, cause we want to return hashes including current block hash. let current_number = client.chain_info().best_block_number + 1; let hashes = (*block_number..current_number).into_iter() - .map(BlockID::Number) + .map(BlockId::Number) .filter_map(|id| client.block_hash(id)) .map(Into::into) .collect::<Vec<RpcH256>>(); @@ -140,10 +140,10 @@ impl<C, M> EthFilter for EthFilterClient<C, M> // build appropriate filter let mut filter: EthcoreFilter = filter.clone().into(); - filter.from_block = BlockID::Number(*block_number); - filter.to_block = BlockID::Latest; + filter.from_block = BlockId::Number(*block_number); + filter.to_block = BlockId::Latest; - // retrieve logs in range from_block..min(BlockID::Latest..to_block) + // retrieve logs in range from_block..min(BlockId::Latest..to_block) let mut logs = client.logs(filter.clone()) .into_iter() .map(From::from) diff --git a/rpc/src/v1/impls/traces.rs b/rpc/src/v1/impls/traces.rs index e85d961a1..0b287ce29 100644 --- a/rpc/src/v1/impls/traces.rs +++ b/rpc/src/v1/impls/traces.rs @@ -19,7 +19,7 @@ use std::sync::{Weak, Arc}; use jsonrpc_core::*; use rlp::{UntrustedRlp, View}; -use ethcore::client::{BlockChainClient, CallAnalytics, TransactionID, TraceId}; +use ethcore::client::{BlockChainClient, CallAnalytics, TransactionId, TraceId}; use ethcore::miner::MinerService; use ethcore::transaction::{Transaction as EthTransaction, SignedTransaction, Action}; use v1::traits::Traces; @@ -100,7 +100,7 @@ impl<C, M> Traces for TracesClient<C, M> where C: BlockChainClient + 'static, M: from_params::<(H256,)>(params) .and_then(|(transaction_hash,)| { let client = take_weak!(self.client); - let traces = client.transaction_traces(TransactionID::Hash(transaction_hash.into())); + let traces = client.transaction_traces(TransactionId::Hash(transaction_hash.into())); let traces = traces.map_or_else(Vec::new, |traces| traces.into_iter().map(LocalizedTrace::from).collect()); Ok(to_value(&traces)) }) @@ -112,7 +112,7 @@ impl<C, M> Traces for TracesClient<C, M> where C: BlockChainClient + 'static, M: .and_then(|(transaction_hash, address)| { let client = take_weak!(self.client); let id = TraceId { - transaction: TransactionID::Hash(transaction_hash.into()), + transaction: TransactionId::Hash(transaction_hash.into()), address: address.into_iter().map(|i| i.value()).collect() }; let trace = client.trace(id); @@ -153,7 +153,7 @@ impl<C, M> Traces for TracesClient<C, M> where C: BlockChainClient + 'static, M: try!(self.active()); from_params::<(H256, _)>(params) .and_then(|(transaction_hash, flags)| { - match take_weak!(self.client).replay(TransactionID::Hash(transaction_hash.into()), to_call_analytics(flags)) { + match take_weak!(self.client).replay(TransactionId::Hash(transaction_hash.into()), to_call_analytics(flags)) { Ok(e) => Ok(to_value(&TraceResults::from(e))), _ => Ok(Value::Null), } diff --git a/rpc/src/v1/tests/eth.rs b/rpc/src/v1/tests/eth.rs index 3aa83fec9..428cae3e0 100644 --- a/rpc/src/v1/tests/eth.rs +++ b/rpc/src/v1/tests/eth.rs @@ -19,7 +19,7 @@ use std::sync::Arc; use std::time::Duration; use ethcore::client::{BlockChainClient, Client, ClientConfig}; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use ethcore::spec::{Genesis, Spec}; use ethcore::block::Block; use ethcore::views::BlockView; @@ -425,7 +425,7 @@ fn verify_transaction_counts(name: String, chain: BlockChain) { assert_eq!(tester.handler.handle_request_sync(&req), Some(res)); // uncles can share block numbers, so skip them. - if tester.client.block_hash(BlockID::Number(number)) == Some(hash) { + if tester.client.block_hash(BlockId::Number(number)) == Some(hash) { let (req, res) = by_number(number, count, &mut id); assert_eq!(tester.handler.handle_request_sync(&req), Some(res)); } diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index 05c95346d..7a7a1f682 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -24,7 +24,7 @@ use rlp; use util::{Uint, U256, Address, H256, FixedHash, Mutex}; use ethcore::account_provider::AccountProvider; -use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionID}; +use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionId}; use ethcore::log_entry::{LocalizedLogEntry, LogEntry}; use ethcore::receipt::LocalizedReceipt; use ethcore::transaction::{Transaction, Action}; @@ -952,7 +952,7 @@ fn rpc_eth_transaction_receipt() { let hash = H256::from_str("b903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238").unwrap(); let tester = EthTester::default(); - tester.client.set_transaction_receipt(TransactionID::Hash(hash), receipt); + tester.client.set_transaction_receipt(TransactionId::Hash(hash), receipt); let request = r#"{ "jsonrpc": "2.0", diff --git a/rpc/src/v1/types/block_number.rs b/rpc/src/v1/types/block_number.rs index 01625f8ed..0a2b2f305 100644 --- a/rpc/src/v1/types/block_number.rs +++ b/rpc/src/v1/types/block_number.rs @@ -16,7 +16,7 @@ use serde::{Deserialize, Deserializer, Error}; use serde::de::Visitor; -use ethcore::client::BlockID; +use ethcore::client::BlockId; /// Represents rpc api block number param. #[derive(Debug, PartialEq, Clone)] @@ -64,20 +64,20 @@ impl Visitor for BlockNumberVisitor { } } -impl Into<BlockID> for BlockNumber { - fn into(self) -> BlockID { +impl Into<BlockId> for BlockNumber { + fn into(self) -> BlockId { match self { - BlockNumber::Num(n) => BlockID::Number(n), - BlockNumber::Earliest => BlockID::Earliest, - BlockNumber::Latest => BlockID::Latest, - BlockNumber::Pending => BlockID::Pending, + BlockNumber::Num(n) => BlockId::Number(n), + BlockNumber::Earliest => BlockId::Earliest, + BlockNumber::Latest => BlockId::Latest, + BlockNumber::Pending => BlockId::Pending, } } } #[cfg(test)] mod tests { - use ethcore::client::BlockID; + use ethcore::client::BlockId; use super::*; use serde_json; @@ -90,10 +90,10 @@ mod tests { #[test] fn block_number_into() { - assert_eq!(BlockID::Number(100), BlockNumber::Num(100).into()); - assert_eq!(BlockID::Earliest, BlockNumber::Earliest.into()); - assert_eq!(BlockID::Latest, BlockNumber::Latest.into()); - assert_eq!(BlockID::Pending, BlockNumber::Pending.into()); + assert_eq!(BlockId::Number(100), BlockNumber::Num(100).into()); + assert_eq!(BlockId::Earliest, BlockNumber::Earliest.into()); + assert_eq!(BlockId::Latest, BlockNumber::Latest.into()); + assert_eq!(BlockId::Pending, BlockNumber::Pending.into()); } } diff --git a/rpc/src/v1/types/filter.rs b/rpc/src/v1/types/filter.rs index bcc4d2e8d..5254b1602 100644 --- a/rpc/src/v1/types/filter.rs +++ b/rpc/src/v1/types/filter.rs @@ -18,7 +18,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer, Error}; use serde_json::value; use jsonrpc_core::Value; use ethcore::filter::Filter as EthFilter; -use ethcore::client::BlockID; +use ethcore::client::BlockId; use v1::types::{BlockNumber, H160, H256, Log}; /// Variadic value @@ -73,8 +73,8 @@ pub struct Filter { impl Into<EthFilter> for Filter { fn into(self) -> EthFilter { EthFilter { - from_block: self.from_block.map_or_else(|| BlockID::Latest, Into::into), - to_block: self.to_block.map_or_else(|| BlockID::Latest, Into::into), + from_block: self.from_block.map_or_else(|| BlockId::Latest, Into::into), + to_block: self.to_block.map_or_else(|| BlockId::Latest, Into::into), address: self.address.and_then(|address| match address { VariadicValue::Null => None, VariadicValue::Single(a) => Some(vec![a.into()]), @@ -128,7 +128,7 @@ mod tests { use super::{VariadicValue, Topic, Filter}; use v1::types::BlockNumber; use ethcore::filter::Filter as EthFilter; - use ethcore::client::BlockID; + use ethcore::client::BlockId; #[test] fn topic_deserialization() { @@ -173,8 +173,8 @@ mod tests { let eth_filter: EthFilter = filter.into(); assert_eq!(eth_filter, EthFilter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec![]), topics: vec![ None, diff --git a/rpc/src/v1/types/trace_filter.rs b/rpc/src/v1/types/trace_filter.rs index 6c7460f9b..2517b1585 100644 --- a/rpc/src/v1/types/trace_filter.rs +++ b/rpc/src/v1/types/trace_filter.rs @@ -16,7 +16,7 @@ //! Trace filter deserialization. -use ethcore::client::BlockID; +use ethcore::client::BlockId; use ethcore::client; use v1::types::{BlockNumber, H160}; @@ -40,8 +40,8 @@ pub struct TraceFilter { impl Into<client::TraceFilter> for TraceFilter { fn into(self) -> client::TraceFilter { - let start = self.from_block.map_or(BlockID::Latest, Into::into); - let end = self.to_block.map_or(BlockID::Latest, Into::into); + let start = self.from_block.map_or(BlockId::Latest, Into::into); + let end = self.to_block.map_or(BlockId::Latest, Into::into); client::TraceFilter { range: start..end, from_address: self.from_address.map_or_else(Vec::new, |x| x.into_iter().map(Into::into).collect()), diff --git a/sync/src/block_sync.rs b/sync/src/block_sync.rs index eea977906..79c7a65a9 100644 --- a/sync/src/block_sync.rs +++ b/sync/src/block_sync.rs @@ -22,7 +22,7 @@ use util::*; use rlp::*; use ethcore::views::{BlockView}; use ethcore::header::{BlockNumber, Header as BlockHeader}; -use ethcore::client::{BlockStatus, BlockID, BlockImportError}; +use ethcore::client::{BlockStatus, BlockId, BlockImportError}; use ethcore::block::Block; use ethcore::error::{ImportError, BlockError}; use sync_io::SyncIo; @@ -225,7 +225,7 @@ impl BlockDownloader { trace!(target: "sync", "Error decoding block header RLP: {:?}", e); BlockDownloaderImportError::Invalid })); - match io.chain().block_status(BlockID::Hash(hash.clone())) { + match io.chain().block_status(BlockId::Hash(hash.clone())) { BlockStatus::InChain | BlockStatus::Queued => { match self.state { State::Blocks => trace!(target: "sync", "Header already in chain {} ({})", number, hash), @@ -353,7 +353,7 @@ impl BlockDownloader { debug!(target: "sync", "Could not revert to previous ancient block, last: {} ({})", self.last_imported_block, self.last_imported_hash); self.reset(); } else { - match io.chain().block_hash(BlockID::Number(self.last_imported_block - 1)) { + match io.chain().block_hash(BlockId::Number(self.last_imported_block - 1)) { Some(h) => { self.last_imported_block -= 1; self.last_imported_hash = h; diff --git a/sync/src/blocks.rs b/sync/src/blocks.rs index bf0c4b244..bcb9973dc 100644 --- a/sync/src/blocks.rs +++ b/sync/src/blocks.rs @@ -475,7 +475,7 @@ impl BlockCollection { #[cfg(test)] mod test { use super::BlockCollection; - use ethcore::client::{TestBlockChainClient, EachBlockWith, BlockID, BlockChainClient}; + use ethcore::client::{TestBlockChainClient, EachBlockWith, BlockId, BlockChainClient}; use ethcore::views::HeaderView; use ethcore::header::BlockNumber; use util::*; @@ -497,7 +497,7 @@ mod test { assert!(is_empty(&bc)); let client = TestBlockChainClient::new(); client.add_blocks(100, EachBlockWith::Nothing); - let hashes = (0 .. 100).map(|i| (&client as &BlockChainClient).block_hash(BlockID::Number(i)).unwrap()).collect(); + let hashes = (0 .. 100).map(|i| (&client as &BlockChainClient).block_hash(BlockId::Number(i)).unwrap()).collect(); bc.reset_to(hashes); assert!(!is_empty(&bc)); bc.clear(); @@ -511,7 +511,7 @@ mod test { let client = TestBlockChainClient::new(); let nblocks = 200; client.add_blocks(nblocks, EachBlockWith::Nothing); - let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockID::Number(i as BlockNumber)).unwrap()).collect(); + let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockId::Number(i as BlockNumber)).unwrap()).collect(); let headers: Vec<_> = blocks.iter().map(|b| Rlp::new(b).at(0).as_raw().to_vec()).collect(); let hashes: Vec<_> = headers.iter().map(|h| HeaderView::new(h).sha3()).collect(); let heads: Vec<_> = hashes.iter().enumerate().filter_map(|(i, h)| if i % 20 == 0 { Some(h.clone()) } else { None }).collect(); @@ -564,7 +564,7 @@ mod test { let client = TestBlockChainClient::new(); let nblocks = 200; client.add_blocks(nblocks, EachBlockWith::Nothing); - let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockID::Number(i as BlockNumber)).unwrap()).collect(); + let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockId::Number(i as BlockNumber)).unwrap()).collect(); let headers: Vec<_> = blocks.iter().map(|b| Rlp::new(b).at(0).as_raw().to_vec()).collect(); let hashes: Vec<_> = headers.iter().map(|h| HeaderView::new(h).sha3()).collect(); let heads: Vec<_> = hashes.iter().enumerate().filter_map(|(i, h)| if i % 20 == 0 { Some(h.clone()) } else { None }).collect(); @@ -586,7 +586,7 @@ mod test { let client = TestBlockChainClient::new(); let nblocks = 200; client.add_blocks(nblocks, EachBlockWith::Nothing); - let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockID::Number(i as BlockNumber)).unwrap()).collect(); + let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockId::Number(i as BlockNumber)).unwrap()).collect(); let headers: Vec<_> = blocks.iter().map(|b| Rlp::new(b).at(0).as_raw().to_vec()).collect(); let hashes: Vec<_> = headers.iter().map(|h| HeaderView::new(h).sha3()).collect(); let heads: Vec<_> = hashes.iter().enumerate().filter_map(|(i, h)| if i % 20 == 0 { Some(h.clone()) } else { None }).collect(); diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 2d53ad5ee..b3bf57158 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -94,7 +94,7 @@ use rlp::*; use network::*; use ethcore::views::{HeaderView}; use ethcore::header::{BlockNumber, Header as BlockHeader}; -use ethcore::client::{BlockChainClient, BlockStatus, BlockID, BlockChainInfo, BlockImportError}; +use ethcore::client::{BlockChainClient, BlockStatus, BlockId, BlockChainInfo, BlockImportError}; use ethcore::error::*; use ethcore::snapshot::{ManifestData, RestorationStatus}; use sync_io::SyncIo; @@ -934,7 +934,7 @@ impl ChainSync { io.disable_peer(peer_id); continue; } - match io.chain().block_status(BlockID::Hash(hash.clone())) { + match io.chain().block_status(BlockId::Hash(hash.clone())) { BlockStatus::InChain => { trace!(target: "sync", "New block hash already in chain {:?}", hash); }, @@ -1155,7 +1155,7 @@ impl ChainSync { return; } - let have_latest = io.chain().block_status(BlockID::Hash(peer_latest)) != BlockStatus::Unknown; + let have_latest = io.chain().block_status(BlockId::Hash(peer_latest)) != BlockStatus::Unknown; if !have_latest && (higher_difficulty || force || self.state == SyncState::NewBlocks) { // check if got new blocks to download trace!(target: "sync", "Syncing with {}, force={}, td={:?}, our td={}, state={:?}", peer_id, force, peer_difficulty, syncing_difficulty, self.state); @@ -1450,11 +1450,11 @@ impl ChainSync { // id is a hash let hash: H256 = try!(r.val_at(0)); trace!(target: "sync", "{} -> GetBlockHeaders (hash: {}, max: {}, skip: {}, reverse:{})", peer_id, hash, max_headers, skip, reverse); - match io.chain().block_header(BlockID::Hash(hash)) { + match io.chain().block_header(BlockId::Hash(hash)) { Some(hdr) => { let number = From::from(HeaderView::new(&hdr).number()); debug_assert_eq!(HeaderView::new(&hdr).sha3(), hash); - if max_headers == 1 || io.chain().block_hash(BlockID::Number(number)) != Some(hash) { + if max_headers == 1 || io.chain().block_hash(BlockId::Number(number)) != Some(hash) { // Non canonical header or single header requested // TODO: handle single-step reverse hashchains of non-canon hashes trace!(target:"sync", "Returning single header: {:?}", hash); @@ -1487,7 +1487,7 @@ impl ChainSync { trace!(target: "sync", "{}: Returning cached fork header", peer_id); data.extend_from_slice(hdr); count += 1; - } else if let Some(mut hdr) = io.chain().block_header(BlockID::Number(number)) { + } else if let Some(mut hdr) = io.chain().block_header(BlockId::Number(number)) { data.append(&mut hdr); count += 1; } else { @@ -1521,7 +1521,7 @@ impl ChainSync { let mut added = 0usize; let mut data = Bytes::new(); for i in 0..count { - if let Some(mut hdr) = io.chain().block_body(BlockID::Hash(try!(r.val_at::<H256>(i)))) { + if let Some(mut hdr) = io.chain().block_body(BlockId::Hash(try!(r.val_at::<H256>(i)))) { data.append(&mut hdr); added += 1; } @@ -1778,7 +1778,7 @@ impl ChainSync { let mut rlp_stream = RlpStream::new_list(blocks.len()); for block_hash in blocks { let mut hash_rlp = RlpStream::new_list(2); - let number = HeaderView::new(&chain.block_header(BlockID::Hash(block_hash.clone())) + let number = HeaderView::new(&chain.block_header(BlockId::Hash(block_hash.clone())) .expect("chain.tree_route and chain.find_uncles only return hahses of blocks that are in the blockchain. qed.")).number(); hash_rlp.append(&block_hash); hash_rlp.append(&number); @@ -1795,7 +1795,7 @@ impl ChainSync { /// creates latest block rlp for the given client fn create_latest_block_rlp(chain: &BlockChainClient) -> Bytes { let mut rlp_stream = RlpStream::new_list(2); - rlp_stream.append_raw(&chain.block(BlockID::Hash(chain.chain_info().best_block_hash)).expect("Best block always exists"), 1); + rlp_stream.append_raw(&chain.block(BlockId::Hash(chain.chain_info().best_block_hash)).expect("Best block always exists"), 1); rlp_stream.append(&chain.chain_info().total_difficulty); rlp_stream.out() } @@ -1803,8 +1803,8 @@ impl ChainSync { /// creates latest block rlp for the given client fn create_new_block_rlp(chain: &BlockChainClient, hash: &H256) -> Bytes { let mut rlp_stream = RlpStream::new_list(2); - rlp_stream.append_raw(&chain.block(BlockID::Hash(hash.clone())).expect("Block has just been sealed; qed"), 1); - rlp_stream.append(&chain.block_total_difficulty(BlockID::Hash(hash.clone())).expect("Block has just been sealed; qed.")); + rlp_stream.append_raw(&chain.block(BlockId::Hash(hash.clone())).expect("Block has just been sealed; qed"), 1); + rlp_stream.append(&chain.block_total_difficulty(BlockId::Hash(hash.clone())).expect("Block has just been sealed; qed.")); rlp_stream.out() } @@ -1812,7 +1812,7 @@ impl ChainSync { fn get_lagging_peers(&mut self, chain_info: &BlockChainInfo, io: &SyncIo) -> Vec<PeerId> { let latest_hash = chain_info.best_block_hash; self.peers.iter_mut().filter_map(|(&id, ref mut peer_info)| - match io.chain().block_status(BlockID::Hash(peer_info.latest_hash.clone())) { + match io.chain().block_status(BlockId::Hash(peer_info.latest_hash.clone())) { BlockStatus::InChain => { if peer_info.latest_hash != latest_hash { Some(id) @@ -1863,7 +1863,7 @@ impl ChainSync { fn propagate_new_hashes(&mut self, chain_info: &BlockChainInfo, io: &mut SyncIo, peers: &[PeerId]) -> usize { trace!(target: "sync", "Sending NewHashes to {:?}", peers); let mut sent = 0; - let last_parent = HeaderView::new(&io.chain().block_header(BlockID::Hash(chain_info.best_block_hash.clone())) + let last_parent = HeaderView::new(&io.chain().block_header(BlockId::Hash(chain_info.best_block_hash.clone())) .expect("Best block always exists")).parent_hash(); for peer_id in peers { sent += match ChainSync::create_new_hashes_rlp(io.chain(), &last_parent, &chain_info.best_block_hash) { @@ -2125,7 +2125,7 @@ mod tests { let mut client = TestBlockChainClient::new(); client.add_blocks(100, EachBlockWith::Nothing); - let blocks: Vec<_> = (0 .. 100).map(|i| (&client as &BlockChainClient).block(BlockID::Number(i as BlockNumber)).unwrap()).collect(); + let blocks: Vec<_> = (0 .. 100).map(|i| (&client as &BlockChainClient).block(BlockId::Number(i as BlockNumber)).unwrap()).collect(); let headers: Vec<_> = blocks.iter().map(|b| Rlp::new(b).at(0).as_raw().to_vec()).collect(); let hashes: Vec<_> = headers.iter().map(|h| HeaderView::new(h).sha3()).collect(); @@ -2298,7 +2298,7 @@ mod tests { let mut client = TestBlockChainClient::new(); client.add_blocks(100, EachBlockWith::Uncle); let mut queue = VecDeque::new(); - let hash = client.block_hash(BlockID::Number(99)).unwrap(); + let hash = client.block_hash(BlockId::Number(99)).unwrap(); let mut sync = dummy_sync_with_peer(client.block_hash_delta_minus(5), &client); let chain_info = client.chain_info(); let ss = TestSnapshotService::new(); @@ -2556,7 +2556,7 @@ mod tests { // Add some balance to clients and reset nonces for h in &[good_blocks[0], retracted_blocks[0]] { - let block = client.block(BlockID::Hash(*h)).unwrap(); + let block = client.block(BlockId::Hash(*h)).unwrap(); let view = BlockView::new(&block); client.set_balance(view.transactions()[0].sender().unwrap(), U256::from(1_000_000_000)); client.set_nonce(view.transactions()[0].sender().unwrap(), U256::from(0)); @@ -2575,7 +2575,7 @@ mod tests { } // We need to update nonce status (because we say that the block has been imported) for h in &[good_blocks[0]] { - let block = client.block(BlockID::Hash(*h)).unwrap(); + let block = client.block(BlockId::Hash(*h)).unwrap(); let view = BlockView::new(&block); client.set_nonce(view.transactions()[0].sender().unwrap(), U256::from(1)); } diff --git a/sync/src/tests/chain.rs b/sync/src/tests/chain.rs index 361d53e29..02b9063fa 100644 --- a/sync/src/tests/chain.rs +++ b/sync/src/tests/chain.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. use util::*; -use ethcore::client::{TestBlockChainClient, BlockChainClient, BlockID, EachBlockWith}; +use ethcore::client::{TestBlockChainClient, BlockChainClient, BlockId, EachBlockWith}; use chain::{SyncState}; use super::helpers::*; use SyncConfig; @@ -27,7 +27,7 @@ fn two_peers() { net.peer(1).chain.add_blocks(1000, EachBlockWith::Uncle); net.peer(2).chain.add_blocks(1000, EachBlockWith::Uncle); net.sync(); - assert!(net.peer(0).chain.block(BlockID::Number(1000)).is_some()); + assert!(net.peer(0).chain.block(BlockId::Number(1000)).is_some()); assert_eq!(*net.peer(0).chain.blocks.read(), *net.peer(1).chain.blocks.read()); } @@ -37,7 +37,7 @@ fn long_chain() { let mut net = TestNet::new(2); net.peer(1).chain.add_blocks(50000, EachBlockWith::Nothing); net.sync(); - assert!(net.peer(0).chain.block(BlockID::Number(50000)).is_some()); + assert!(net.peer(0).chain.block(BlockId::Number(50000)).is_some()); assert_eq!(*net.peer(0).chain.blocks.read(), *net.peer(1).chain.blocks.read()); } @@ -71,7 +71,7 @@ fn empty_blocks() { net.peer(2).chain.add_blocks(5, with); } net.sync(); - assert!(net.peer(0).chain.block(BlockID::Number(1000)).is_some()); + assert!(net.peer(0).chain.block(BlockId::Number(1000)).is_some()); assert_eq!(*net.peer(0).chain.blocks.read(), *net.peer(1).chain.blocks.read()); } @@ -123,13 +123,13 @@ fn net_hard_fork() { let ref_client = TestBlockChainClient::new(); ref_client.add_blocks(50, EachBlockWith::Uncle); { - let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockID::Number(50)).unwrap()))); + let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockId::Number(50)).unwrap()))); net.peer(0).chain.add_blocks(100, EachBlockWith::Uncle); net.sync(); assert_eq!(net.peer(1).chain.chain_info().best_block_number, 100); } { - let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockID::Number(50)).unwrap()))); + let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockId::Number(50)).unwrap()))); net.peer(0).chain.add_blocks(100, EachBlockWith::Nothing); net.sync(); assert_eq!(net.peer(1).chain.chain_info().best_block_number, 0); From 5c555aa18f158a3824259696ebce14d10a174fad Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 01:25:23 +0100 Subject: [PATCH 058/131] Fixes error in Transfer modal (mix between props and own property) (#3788) --- js/src/modals/Transfer/store.js | 6 ++---- js/src/modals/Transfer/transfer.js | 11 +++++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/js/src/modals/Transfer/store.js b/js/src/modals/Transfer/store.js index cbb10f17f..3a8f54f92 100644 --- a/js/src/modals/Transfer/store.js +++ b/js/src/modals/Transfer/store.js @@ -107,10 +107,9 @@ export default class TransferStore { constructor (api, props) { this.api = api; - const { account, balance, gasLimit, senders, onClose, newError, sendersBalances } = props; + const { account, balance, gasLimit, senders, newError, sendersBalances } = props; this.account = account; this.balance = balance; - this.onClose = onClose; this.isWallet = account && account.wallet; this.newError = newError; @@ -136,8 +135,7 @@ export default class TransferStore { this.stage -= 1; } - @action onClose = () => { - this.onClose && this.onClose(); + @action handleClose = () => { this.stage = 0; } diff --git a/js/src/modals/Transfer/transfer.js b/js/src/modals/Transfer/transfer.js index 00e84adaf..0c96a1168 100644 --- a/js/src/modals/Transfer/transfer.js +++ b/js/src/modals/Transfer/transfer.js @@ -208,7 +208,7 @@ class Transfer extends Component { <Button icon={ <ContentClear /> } label='Cancel' - onClick={ this.store.onClose } /> + onClick={ this.handleClose } /> ); const nextBtn = ( <Button @@ -234,7 +234,7 @@ class Transfer extends Component { <Button icon={ <ActionDoneAll /> } label='Close' - onClick={ this.store.onClose } /> + onClick={ this.handleClose } /> ); switch (stage) { @@ -264,6 +264,13 @@ class Transfer extends Component { </div> ); } + + handleClose = () => { + const { onClose } = this.props; + + this.store.handleClose(); + typeof onClose === 'function' && onClose(); + } } function mapStateToProps (initState, initProps) { From 923f85d90deb4c33609c0413765a8d648d241bc1 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 01:26:03 +0100 Subject: [PATCH 059/131] Update Material-UI (#3785) * Update MUI => Fixes wrong error styled inputs * Update postcss import --- js/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/package.json b/js/package.json index 46b0233a0..524c280dc 100644 --- a/js/package.json +++ b/js/package.json @@ -101,8 +101,8 @@ "mock-local-storage": "1.0.2", "mock-socket": "6.0.3", "nock": "9.0.2", - "postcss-import": "8.1.0", - "postcss-loader": "1.1.1", + "postcss-import": "9.0.0", + "postcss-loader": "1.2.0", "postcss-nested": "1.0.0", "postcss-simple-vars": "3.0.0", "progress": "1.1.8", @@ -139,7 +139,7 @@ "js-sha3": "0.5.5", "lodash": "4.17.2", "marked": "0.3.6", - "material-ui": "0.16.4", + "material-ui": "0.16.5", "material-ui-chip-input": "0.11.1", "mobx": "2.6.4", "mobx-react": "4.0.3", From 6655e7e3c0e2c3c23e4f3ba80c5886cf0fb78172 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 01:26:28 +0100 Subject: [PATCH 060/131] Add support for wallets without getOwner() interface (#3779) * Make Wallet Mist compatible #3282 * Owners icons on load * Fix oversized logo on load * Don't fetch registry twice (even when pending) * Better logging... * Better contract view : show if no events // show loading events * Better decimal typed input * PR grumble --- js/src/contracts/registry.js | 38 +++++---- .../modals/CreateWallet/createWalletStore.js | 3 +- js/src/redux/providers/personal.js | 3 - js/src/redux/providers/signer.js | 3 - js/src/redux/providers/status.js | 3 - js/src/ui/Form/Input/input.js | 38 +++++---- js/src/ui/Form/TypedInput/typedInput.js | 52 ++++++++++--- js/src/ui/Page/page.css | 6 +- js/src/util/wallets.js | 77 ++++++++++++++++++- js/src/views/Accounts/Summary/summary.js | 11 ++- js/src/views/Application/TabBar/tabBar.js | 2 +- js/src/views/Contract/Events/events.js | 34 ++++++-- js/src/views/Contract/Queries/queries.js | 4 + js/src/views/Contract/contract.js | 24 ++++-- js/src/views/Wallet/Details/details.js | 4 +- 15 files changed, 228 insertions(+), 74 deletions(-) diff --git a/js/src/contracts/registry.js b/js/src/contracts/registry.js index 2f61f7f4a..9354a59e5 100644 --- a/js/src/contracts/registry.js +++ b/js/src/contracts/registry.js @@ -19,7 +19,10 @@ import * as abis from './abi'; export default class Registry { constructor (api) { this._api = api; - this._contracts = []; + + this._contracts = {}; + this._pendingContracts = {}; + this._instance = null; this._fetching = false; this._queue = []; @@ -59,20 +62,25 @@ export default class Registry { getContract (_name) { const name = _name.toLowerCase(); - return new Promise((resolve, reject) => { - if (this._contracts[name]) { - resolve(this._contracts[name]); - return; - } + if (this._contracts[name]) { + return Promise.resolve(this._contracts[name]); + } - this - .lookupAddress(name) - .then((address) => { - this._contracts[name] = this._api.newContract(abis[name], address); - resolve(this._contracts[name]); - }) - .catch(reject); - }); + if (this._pendingContracts[name]) { + return this._pendingContracts[name]; + } + + const promise = this + .lookupAddress(name) + .then((address) => { + this._contracts[name] = this._api.newContract(abis[name], address); + delete this._pendingContracts[name]; + return this._contracts[name]; + }); + + this._pendingContracts[name] = promise; + + return promise; } getContractInstance (_name) { @@ -89,7 +97,7 @@ export default class Registry { return instance.getAddress.call({}, [sha3, 'A']); }) .then((address) => { - console.log('lookupAddress', name, sha3, address); + console.log('[lookupAddress]', `(${sha3}) ${name}: ${address}`); return address; }); } diff --git a/js/src/modals/CreateWallet/createWalletStore.js b/js/src/modals/CreateWallet/createWalletStore.js index 3edf8f638..b28bfbd26 100644 --- a/js/src/modals/CreateWallet/createWalletStore.js +++ b/js/src/modals/CreateWallet/createWalletStore.js @@ -23,6 +23,7 @@ import { wallet as walletAbi } from '~/contracts/abi'; import { wallet as walletCode, walletLibraryRegKey, fullWalletCode } from '~/contracts/code/wallet'; import { validateUint, validateAddress, validateName } from '~/util/validation'; +import { toWei } from '~/api/util/wei'; import WalletsUtils from '~/util/wallets'; const STEPS = { @@ -47,7 +48,7 @@ export default class CreateWalletStore { address: '', owners: [], required: 1, - daylimit: 0, + daylimit: toWei(1), name: '', description: '' diff --git a/js/src/redux/providers/personal.js b/js/src/redux/providers/personal.js index e061051b0..7629c4f46 100644 --- a/js/src/redux/providers/personal.js +++ b/js/src/redux/providers/personal.js @@ -36,9 +36,6 @@ export default class Personal { } this._store.dispatch(personalAccountsInfo(accountsInfo)); - }) - .then((subscriptionId) => { - console.log('personal._subscribeAccountsInfo', 'subscriptionId', subscriptionId); }); } diff --git a/js/src/redux/providers/signer.js b/js/src/redux/providers/signer.js index 5ece371c2..11b30c6b4 100644 --- a/js/src/redux/providers/signer.js +++ b/js/src/redux/providers/signer.js @@ -34,9 +34,6 @@ export default class Signer { } this._store.dispatch(signerRequestsToConfirm(pending || [])); - }) - .then((subscriptionId) => { - console.log('signer._subscribeRequestsToConfirm', 'subscriptionId', subscriptionId); }); } } diff --git a/js/src/redux/providers/status.js b/js/src/redux/providers/status.js index 936fe3f25..830192bbe 100644 --- a/js/src/redux/providers/status.js +++ b/js/src/redux/providers/status.js @@ -59,9 +59,6 @@ export default class Status { .catch((error) => { console.warn('status._subscribeBlockNumber', 'getBlockByNumber', error); }); - }) - .then((subscriptionId) => { - console.log('status._subscribeBlockNumber', 'subscriptionId', subscriptionId); }); } diff --git a/js/src/ui/Form/Input/input.js b/js/src/ui/Form/Input/input.js index 701851ef9..f25ce207c 100644 --- a/js/src/ui/Form/Input/input.js +++ b/js/src/ui/Form/Input/input.js @@ -113,32 +113,38 @@ export default class Input extends Component { <TextField autoComplete='off' className={ className } - style={ textFieldStyle } - - readOnly={ readOnly } - errorText={ error } + floatingLabelFixed floatingLabelText={ label } - fullWidth + hintText={ hint } + id={ NAME_ID } + inputStyle={ inputStyle } + fullWidth + + max={ max } + min={ min } + multiLine={ multiLine } name={ NAME_ID } - id={ NAME_ID } - rows={ rows } - type={ type || 'text' } - underlineDisabledStyle={ UNDERLINE_DISABLED } - underlineStyle={ readOnly ? UNDERLINE_READONLY : UNDERLINE_NORMAL } - underlineFocusStyle={ readOnly ? { display: 'none' } : null } - underlineShow={ !hideUnderline } - value={ value } + onBlur={ this.onBlur } onChange={ this.onChange } onKeyDown={ this.onKeyDown } onPaste={ this.onPaste } - inputStyle={ inputStyle } - min={ min } - max={ max } + + readOnly={ readOnly } + rows={ rows } + style={ textFieldStyle } + type={ type || 'text' } + + underlineDisabledStyle={ UNDERLINE_DISABLED } + underlineStyle={ readOnly ? UNDERLINE_READONLY : UNDERLINE_NORMAL } + underlineFocusStyle={ readOnly ? { display: 'none' } : null } + underlineShow={ !hideUnderline } + + value={ value } > { children } </TextField> diff --git a/js/src/ui/Form/TypedInput/typedInput.js b/js/src/ui/Form/TypedInput/typedInput.js index a81ec7b79..a54032999 100644 --- a/js/src/ui/Form/TypedInput/typedInput.js +++ b/js/src/ui/Form/TypedInput/typedInput.js @@ -53,13 +53,13 @@ export default class TypedInput extends Component { }; state = { - isEth: true, + isEth: false, ethValue: 0 }; - componentDidMount () { + componentWillMount () { if (this.props.isEth && this.props.value) { - this.setState({ ethValue: fromWei(this.props.value) }); + this.setState({ isEth: true, ethValue: fromWei(this.props.value) }); } } @@ -164,28 +164,32 @@ export default class TypedInput extends Component { } if (type === ABI_TYPES.INT) { - return this.renderNumber(); + return this.renderEth(); } if (type === ABI_TYPES.FIXED) { - return this.renderNumber(); + return this.renderFloat(); } return this.renderDefault(); } renderEth () { - const { ethValue } = this.state; + const { ethValue, isEth } = this.state; const value = ethValue && typeof ethValue.toNumber === 'function' ? ethValue.toNumber() : ethValue; + const input = isEth + ? this.renderFloat(value, this.onEthValueChange) + : this.renderInteger(value, this.onEthValueChange); + return ( <div className={ styles.ethInput }> <div className={ styles.input }> - { this.renderNumber(value, this.onEthValueChange) } - { this.state.isEth ? (<div className={ styles.label }>ETH</div>) : null } + { input } + { isEth ? (<div className={ styles.label }>ETH</div>) : null } </div> <div className={ styles.toggle }> <Toggle @@ -198,8 +202,9 @@ export default class TypedInput extends Component { ); } - renderNumber (value = this.props.value, onChange = this.onChange) { + renderInteger (value = this.props.value, onChange = this.onChange) { const { label, error, param, hint, min, max } = this.props; + const realValue = value && typeof value.toNumber === 'function' ? value.toNumber() : value; @@ -212,6 +217,35 @@ export default class TypedInput extends Component { error={ error } onChange={ onChange } type='number' + step={ 1 } + min={ min !== null ? min : (param.signed ? null : 0) } + max={ max !== null ? max : null } + /> + ); + } + + /** + * Decimal numbers have to be input via text field + * because of some react issues with input number fields. + * Once the issue is fixed, this could be a number again. + * + * @see https://github.com/facebook/react/issues/1549 + */ + renderFloat (value = this.props.value, onChange = this.onChange) { + const { label, error, param, hint, min, max } = this.props; + + const realValue = value && typeof value.toNumber === 'function' + ? value.toNumber() + : value; + + return ( + <Input + label={ label } + hint={ hint } + value={ realValue } + error={ error } + onChange={ onChange } + type='text' min={ min !== null ? min : (param.signed ? null : 0) } max={ max !== null ? max : null } /> diff --git a/js/src/ui/Page/page.css b/js/src/ui/Page/page.css index 9b7cfd62b..72a78dc22 100644 --- a/js/src/ui/Page/page.css +++ b/js/src/ui/Page/page.css @@ -17,8 +17,8 @@ .layout { padding: 0.25em 0.25em 1em 0.25em; -} -.layout>div { - padding-bottom: 0.75em; + > * { + margin-bottom: 0.75em; + } } diff --git a/js/src/util/wallets.js b/js/src/util/wallets.js index c335ce03c..1f0bc6735 100644 --- a/js/src/util/wallets.js +++ b/js/src/util/wallets.js @@ -14,9 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import { range } from 'lodash'; +import { range, uniq } from 'lodash'; import { bytesToHex, toHex } from '~/api/util/format'; +import { validateAddress } from '~/util/validation'; export default class WalletsUtils { @@ -26,10 +27,82 @@ export default class WalletsUtils { static fetchOwners (walletContract) { const walletInstance = walletContract.instance; + return walletInstance .m_numOwners.call() .then((mNumOwners) => { - return Promise.all(range(mNumOwners.toNumber()).map((idx) => walletInstance.getOwner.call({}, [ idx ]))); + const promises = range(mNumOwners.toNumber()) + .map((idx) => walletInstance.getOwner.call({}, [ idx ])); + + return Promise + .all(promises) + .then((owners) => { + const uniqOwners = uniq(owners); + + // If all owners are the zero account : must be Mist wallet contract + if (uniqOwners.length === 1 && /^(0x)?0*$/.test(owners[0])) { + return WalletsUtils.fetchMistOwners(walletContract, mNumOwners.toNumber()); + } + + return owners; + }); + }); + } + + static fetchMistOwners (walletContract, mNumOwners) { + const walletAddress = walletContract.address; + + return WalletsUtils + .getMistOwnersOffset(walletContract) + .then((result) => { + if (!result || result.offset === -1) { + return []; + } + + const owners = [ result.address ]; + + if (mNumOwners === 1) { + return owners; + } + + const initOffset = result.offset + 1; + let promise = Promise.resolve(); + + range(initOffset, initOffset + mNumOwners - 1).forEach((offset) => { + promise = promise + .then(() => { + return walletContract.api.eth.getStorageAt(walletAddress, offset); + }) + .then((result) => { + const resultAddress = '0x' + (result || '').slice(-40); + const { address } = validateAddress(resultAddress); + + owners.push(address); + }); + }); + + return promise.then(() => owners); + }); + } + + static getMistOwnersOffset (walletContract, offset = 3) { + return walletContract.api.eth + .getStorageAt(walletContract.address, offset) + .then((result) => { + if (result && !/^(0x)?0*$/.test(result)) { + const resultAddress = '0x' + result.slice(-40); + const { address, addressError } = validateAddress(resultAddress); + + if (!addressError) { + return { offset, address }; + } + } + + if (offset >= 100) { + return { offset: -1 }; + } + + return WalletsUtils.getMistOwnersOffset(walletContract, offset + 1); }); } diff --git a/js/src/views/Accounts/Summary/summary.js b/js/src/views/Accounts/Summary/summary.js index aeff8a2e5..3183a2903 100644 --- a/js/src/views/Accounts/Summary/summary.js +++ b/js/src/views/Accounts/Summary/summary.js @@ -75,6 +75,13 @@ export default class Summary extends Component { return true; } + const prevOwners = this.props.owners; + const nextOwners = nextProps.owners; + + if (!isEqual(prevOwners, nextOwners)) { + return true; + } + return false; } @@ -123,8 +130,8 @@ export default class Summary extends Component { return ( <div className={ styles.owners }> { - ownersValid.map((owner) => ( - <div key={ owner.address }> + ownersValid.map((owner, index) => ( + <div key={ `${index}_${owner.address}` }> <div data-tip data-for={ `owner_${owner.address}` } diff --git a/js/src/views/Application/TabBar/tabBar.js b/js/src/views/Application/TabBar/tabBar.js index 8a79f216e..9d9f55874 100644 --- a/js/src/views/Application/TabBar/tabBar.js +++ b/js/src/views/Application/TabBar/tabBar.js @@ -188,7 +188,7 @@ class TabBar extends Component { return ( <ToolbarGroup> <div className={ styles.logo }> - <img src={ imagesEthcoreBlock } /> + <img src={ imagesEthcoreBlock } height={ 28 } /> </div> </ToolbarGroup> ); diff --git a/js/src/views/Contract/Events/events.js b/js/src/views/Contract/Events/events.js index 69ae8fd6a..c29e624bf 100644 --- a/js/src/views/Contract/Events/events.js +++ b/js/src/views/Contract/Events/events.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { uniq } from 'lodash'; -import { Container } from '~/ui'; +import { Container, Loading } from '~/ui'; import Event from './Event'; import styles from '../contract.css'; @@ -25,18 +25,38 @@ import styles from '../contract.css'; export default class Events extends Component { static contextTypes = { api: PropTypes.object - } + }; static propTypes = { - events: PropTypes.array, - isTest: PropTypes.bool.isRequired - } + isTest: PropTypes.bool.isRequired, + isLoading: PropTypes.bool, + events: PropTypes.array + }; + + static defaultProps = { + isLoading: false, + events: [] + }; render () { - const { events, isTest } = this.props; + const { events, isTest, isLoading } = this.props; + + if (isLoading) { + return ( + <Container title='events'> + <div> + <Loading size={ 2 } /> + </div> + </Container> + ); + } if (!events || !events.length) { - return null; + return ( + <Container title='events'> + <p>No events has been sent from this contract.</p> + </Container> + ); } const eventsKey = uniq(events.map((e) => e.key)); diff --git a/js/src/views/Contract/Queries/queries.js b/js/src/views/Contract/Queries/queries.js index 9a13037f6..1bfd2fa5f 100644 --- a/js/src/views/Contract/Queries/queries.js +++ b/js/src/views/Contract/Queries/queries.js @@ -54,6 +54,10 @@ export default class Queries extends Component { .filter((fn) => fn.inputs.length > 0) .map((fn) => this.renderInputQuery(fn)); + if (queries.length + noInputQueries.length + withInputQueries.length === 0) { + return null; + } + return ( <Container title='queries'> <div className={ styles.methods }> diff --git a/js/src/views/Contract/contract.js b/js/src/views/Contract/contract.js index 35ad95fe2..4f7570ebd 100644 --- a/js/src/views/Contract/contract.js +++ b/js/src/views/Contract/contract.js @@ -40,7 +40,7 @@ import styles from './contract.css'; class Contract extends Component { static contextTypes = { api: React.PropTypes.object.isRequired - } + }; static propTypes = { setVisibleAccounts: PropTypes.func.isRequired, @@ -50,7 +50,7 @@ class Contract extends Component { contracts: PropTypes.object, isTest: PropTypes.bool, params: PropTypes.object - } + }; state = { contract: null, @@ -64,8 +64,9 @@ class Contract extends Component { allEvents: [], minedEvents: [], pendingEvents: [], - queryValues: {} - } + queryValues: {}, + loadingEvents: true + }; componentDidMount () { const { api } = this.context; @@ -115,7 +116,7 @@ class Contract extends Component { render () { const { balances, contracts, params, isTest } = this.props; - const { allEvents, contract, queryValues } = this.state; + const { allEvents, contract, queryValues, loadingEvents } = this.state; const account = contracts[params.address]; const balance = balances[params.address]; @@ -134,12 +135,17 @@ class Contract extends Component { account={ account } balance={ balance } /> + <Queries contract={ contract } - values={ queryValues } /> + values={ queryValues } + /> + <Events isTest={ isTest } - events={ allEvents } /> + isLoading={ loadingEvents } + events={ allEvents } + /> { this.renderDetails(account) } </Page> @@ -358,6 +364,10 @@ class Contract extends Component { } _receiveEvents = (error, logs) => { + if (this.state.loadingEvents) { + this.setState({ loadingEvents: false }); + } + if (error) { console.error('_receiveEvents', error); return; diff --git a/js/src/views/Wallet/Details/details.js b/js/src/views/Wallet/Details/details.js index 547b02601..fb08bbde2 100644 --- a/js/src/views/Wallet/Details/details.js +++ b/js/src/views/Wallet/Details/details.js @@ -55,9 +55,9 @@ export default class WalletDetails extends Component { return null; } - const ownersList = owners.map((address) => ( + const ownersList = owners.map((address, idx) => ( <InputAddress - key={ address } + key={ `${idx}_${address}` } value={ address } disabled text From b9c04fcd0090a93fe0365a5d5bc2dafac184d6e4 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 01:26:47 +0100 Subject: [PATCH 061/131] Fixes to the Wallet UI (#3787) * Correct number of transactions for contracts * Remove daily limit info if set to 0 * Hide tx count for contracts --- js/src/views/Account/Header/header.js | 10 ++++++---- js/src/views/Contract/contract.js | 1 + js/src/views/Wallet/wallet.js | 9 ++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/js/src/views/Account/Header/header.js b/js/src/views/Account/Header/header.js index b126951b2..6ce88aef4 100644 --- a/js/src/views/Account/Header/header.js +++ b/js/src/views/Account/Header/header.js @@ -31,12 +31,14 @@ export default class Header extends Component { account: PropTypes.object, balance: PropTypes.object, className: PropTypes.string, - children: PropTypes.node + children: PropTypes.node, + isContract: PropTypes.bool }; static defaultProps = { className: '', - children: null + children: null, + isContract: false }; render () { @@ -88,9 +90,9 @@ export default class Header extends Component { } renderTxCount () { - const { balance } = this.props; + const { balance, isContract } = this.props; - if (!balance) { + if (!balance || isContract) { return null; } diff --git a/js/src/views/Contract/contract.js b/js/src/views/Contract/contract.js index 4f7570ebd..e501e4fe5 100644 --- a/js/src/views/Contract/contract.js +++ b/js/src/views/Contract/contract.js @@ -134,6 +134,7 @@ class Contract extends Component { <Header account={ account } balance={ balance } + isContract /> <Queries diff --git a/js/src/views/Wallet/wallet.js b/js/src/views/Wallet/wallet.js index e67eaefdb..1a5fbeecd 100644 --- a/js/src/views/Wallet/wallet.js +++ b/js/src/views/Wallet/wallet.js @@ -127,6 +127,7 @@ class Wallet extends Component { className={ styles.header } account={ wallet } balance={ balance } + isContract > { this.renderInfos() } </Header> @@ -152,7 +153,13 @@ class Wallet extends Component { return null; } - const limit = api.util.fromWei(dailylimit.limit).toFormat(3); + const _limit = api.util.fromWei(dailylimit.limit); + + if (_limit.equals(0)) { + return null; + } + + const limit = _limit.toFormat(3); const spent = api.util.fromWei(dailylimit.spent).toFormat(3); const date = moment(dailylimit.last.toNumber() * 24 * 3600 * 1000); From f6564dcc2f61f892d9a85f057209db5f802cf5b0 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 01:32:39 +0100 Subject: [PATCH 062/131] Fix dapps separation --- js/src/views/Dapps/dapps.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/js/src/views/Dapps/dapps.js b/js/src/views/Dapps/dapps.js index cf847202a..b0b731b93 100644 --- a/js/src/views/Dapps/dapps.js +++ b/js/src/views/Dapps/dapps.js @@ -72,9 +72,17 @@ export default class Dapps extends Component { ] } /> <Page> - { this.renderList(this.store.visibleLocal) } - { this.renderList(this.store.visibleBuiltin) } - { this.renderList(this.store.visibleNetwork, externalOverlay) } + <div> + { this.renderList(this.store.visibleLocal) } + </div> + + <div> + { this.renderList(this.store.visibleBuiltin) } + </div> + + <div> + { this.renderList(this.store.visibleNetwork, externalOverlay) } + </div> </Page> </div> ); From 0d9b1882a31346ab5ab831ea373767c22723b2f9 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 01:56:38 +0100 Subject: [PATCH 063/131] Treat tabs as real link (enable Ctrl+Click for new Tab) --- js/src/views/Application/TabBar/tabBar.css | 31 +++++++---- js/src/views/Application/TabBar/tabBar.js | 64 +++++----------------- 2 files changed, 33 insertions(+), 62 deletions(-) diff --git a/js/src/views/Application/TabBar/tabBar.css b/js/src/views/Application/TabBar/tabBar.css index b11df4e40..7b74622d3 100644 --- a/js/src/views/Application/TabBar/tabBar.css +++ b/js/src/views/Application/TabBar/tabBar.css @@ -30,24 +30,31 @@ } } -.tabs button, +.tabLink { + display: flex; + + > * { + flex: 1; + } + + &:hover { + background: rgba(0, 0, 0, 0.4) !important; + } + + &.tabactive, &.tabactive:hover { + color: white !important; + background: rgba(0, 0, 0, 0.25) !important; + border-radius: 4px 4px 0 0; + } +} + +.tabLink, .settings, .logo, .last { background: rgba(0, 0, 0, 0.5) !important; /* rgba(0, 0, 0, 0.25) !important; */ } -.tabs button:hover { - background: rgba(0, 0, 0, 0.4) !important; -} - -button.tabactive, -button.tabactive:hover { - color: white !important; - background: rgba(0, 0, 0, 0.25) !important; - border-radius: 4px 4px 0 0; -} - .tabbarTooltip { left: 3.3em; top: 0.5em; diff --git a/js/src/views/Application/TabBar/tabBar.js b/js/src/views/Application/TabBar/tabBar.js index 9d9f55874..ccf1290c5 100644 --- a/js/src/views/Application/TabBar/tabBar.js +++ b/js/src/views/Application/TabBar/tabBar.js @@ -16,6 +16,7 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; +import { Link } from 'react-router'; import { bindActionCreators } from 'redux'; import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar'; import { Tab as MUITab } from 'material-ui/Tabs'; @@ -40,8 +41,7 @@ class Tab extends Component { active: PropTypes.bool, view: PropTypes.object, children: PropTypes.node, - pendings: PropTypes.number, - onChange: PropTypes.func + pendings: PropTypes.number }; shouldComponentUpdate (nextProps) { @@ -60,7 +60,6 @@ class Tab extends Component { selected={ active } icon={ view.icon } label={ label } - onTouchTap={ this.handleClick } > { children } </MUITab> @@ -118,11 +117,6 @@ class Tab extends Component { return this.renderLabel(label, null); } - - handleClick = () => { - const { onChange, view } = this.props; - onChange(view); - } } class TabBar extends Component { @@ -142,34 +136,12 @@ class TabBar extends Component { pending: [] }; - state = { - activeViewId: '' - }; - - setActiveView (props = this.props) { - const { hash, views } = props; - const view = views.find((view) => view.value === hash); - - this.setState({ activeViewId: view.id }); - } - - componentWillMount () { - this.setActiveView(); - } - - componentWillReceiveProps (nextProps) { - if (nextProps.hash !== this.props.hash) { - this.setActiveView(nextProps); - } - } - shouldComponentUpdate (nextProps, nextState) { const prevViews = this.props.views.map((v) => v.id).sort(); const nextViews = nextProps.views.map((v) => v.id).sort(); return (nextProps.hash !== this.props.hash) || (nextProps.pending.length !== this.props.pending.length) || - (nextState.activeViewId !== this.state.activeViewId) || (!isEqual(prevViews, nextViews)); } @@ -206,7 +178,6 @@ class TabBar extends Component { renderTabs () { const { views, pending } = this.props; - const { activeViewId } = this.state; const items = views .map((view, index) => { @@ -216,36 +187,29 @@ class TabBar extends Component { ) : null; - const active = activeViewId === view.id; - return ( - <Tab - active={ active } - view={ view } - onChange={ this.onChange } + <Link key={ view.id } - pendings={ pending.length } + to={ view.route } + activeClassName={ styles.tabactive } + className={ styles.tabLink } > - { body } - </Tab> + <Tab + view={ view } + pendings={ pending.length } + > + { body } + </Tab> + </Link> ); }); return ( - <div - className={ styles.tabs } - onChange={ this.onChange }> + <div className={ styles.tabs }> { items } </div> ); } - - onChange = (view) => { - const { router } = this.context; - - router.push(view.route); - this.setState({ activeViewId: view.id }); - } } function mapStateToProps (state) { From 5f09eb9d04e238e9097f37468d68c4dc9ab93bd6 Mon Sep 17 00:00:00 2001 From: keorn <pczaban@gmail.com> Date: Sat, 10 Dec 2016 10:38:10 +0100 Subject: [PATCH 064/131] update tests to new spec (#3790) --- ethcore/src/engines/authority_round.rs | 28 ++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs index 21a6e4761..98190c1ea 100644 --- a/ethcore/src/engines/authority_round.rs +++ b/ethcore/src/engines/authority_round.rs @@ -347,7 +347,6 @@ mod tests { use tests::helpers::*; use account_provider::AccountProvider; use spec::Spec; - use std::time::UNIX_EPOCH; #[test] fn has_valid_metadata() { @@ -442,13 +441,30 @@ mod tests { let engine = Spec::new_test_round().engine; let signature = tap.sign(addr, Some("0".into()), header.bare_hash()).unwrap(); - let time = UNIX_EPOCH.elapsed().unwrap().as_secs(); // Two authorities. - let mut step = time - time % 2; - header.set_seal(vec![encode(&step).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); + // Spec starts with step 2. + header.set_seal(vec![encode(&2usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); assert!(engine.verify_block_seal(&header).is_err()); - step = step + 1; - header.set_seal(vec![encode(&step).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); + header.set_seal(vec![encode(&1usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); assert!(engine.verify_block_seal(&header).is_ok()); } + + #[test] + fn rejects_future_block() { + let mut header: Header = Header::default(); + let tap = AccountProvider::transient_provider(); + let addr = tap.insert_account("0".sha3(), "0").unwrap(); + + header.set_author(addr); + + let engine = Spec::new_test_round().engine; + + let signature = tap.sign(addr, Some("0".into()), header.bare_hash()).unwrap(); + // Two authorities. + // Spec starts with step 2. + header.set_seal(vec![encode(&1usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); + assert!(engine.verify_block_seal(&header).is_ok()); + header.set_seal(vec![encode(&5usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); + assert!(engine.verify_block_seal(&header).is_err()); + } } From 6eb63a7316c3605c107a8288ce36b641ab2ea23d Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jacogr@gmail.com> Date: Sat, 10 Dec 2016 10:49:39 +0100 Subject: [PATCH 065/131] Update CI builds (#3780) * Only run languages tests in appropriate areas * Drop echo --- .gitlab-ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d27b58f9a..6df465035 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -423,12 +423,8 @@ test-rust-stable: before_script: - git submodule update --init --recursive - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v ^js/ | wc -l) - - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - - echo "rust/js modified: $RUST_FILES_MODIFIED / $JS_FILES_MODIFIED" - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - export RUST_BACKTRACE=1 - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi - if [ "$RUST_FILES_MODIFIED" = 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi tags: - rust @@ -439,11 +435,8 @@ js-test: before_script: - git submodule update --init --recursive - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - - echo $JS_FILES_MODIFIED - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - - export RUST_BACKTRACE=1 - - echo $JS_FILES_MODIFIED - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi tags: - rust From 51b9034a5e7a0839945e79e237d154f470c20466 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 12:44:48 +0100 Subject: [PATCH 066/131] Don't show addresses while loading balances (fix flash of unsorted) --- js/src/views/Addresses/addresses.js | 37 +++++++++++++++++++---------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/js/src/views/Addresses/addresses.js b/js/src/views/Addresses/addresses.js index 5e0ed4e18..a3e52ec55 100644 --- a/js/src/views/Addresses/addresses.js +++ b/js/src/views/Addresses/addresses.js @@ -23,7 +23,7 @@ import { uniq, isEqual } from 'lodash'; import List from '../Accounts/List'; import Summary from '../Accounts/Summary'; import { AddAddress } from '~/modals'; -import { Actionbar, ActionbarExport, ActionbarImport, ActionbarSearch, ActionbarSort, Button, Page } from '~/ui'; +import { Actionbar, ActionbarExport, ActionbarImport, ActionbarSearch, ActionbarSort, Button, Page, Loading } from '~/ui'; import { setVisibleAccounts } from '~/redux/providers/personalActions'; import styles from './addresses.css'; @@ -72,27 +72,40 @@ class Addresses extends Component { } render () { - const { balances, contacts, hasContacts } = this.props; - const { searchValues, sortOrder } = this.state; - return ( <div> { this.renderActionbar() } { this.renderAddAddress() } <Page> - <List - link='address' - search={ searchValues } - accounts={ contacts } - balances={ balances } - empty={ !hasContacts } - order={ sortOrder } - handleAddSearchToken={ this.onAddSearchToken } /> + { this.renderAccountsList() } </Page> </div> ); } + renderAccountsList () { + const { balances, contacts, hasContacts } = this.props; + const { searchValues, sortOrder } = this.state; + + if (hasContacts && Object.keys(balances).length === 0) { + return ( + <Loading size={ 3 } /> + ); + } + + return ( + <List + link='address' + search={ searchValues } + accounts={ contacts } + balances={ balances } + empty={ !hasContacts } + order={ sortOrder } + handleAddSearchToken={ this.onAddSearchToken } + /> + ); + } + renderSortButton () { const onChange = (sortOrder) => { this.setState({ sortOrder }); From 7eb30b12494a257b1ea35c38d6ba38565d5e1b81 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Sat, 10 Dec 2016 13:52:43 +0100 Subject: [PATCH 067/131] Fix build. --- ethcore/light/src/net/tests/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 6e2bc9f33..29c1a819a 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -19,7 +19,7 @@ use ethcore::blockchain_info::BlockChainInfo; use ethcore::client::{BlockChainClient, EachBlockWith, TestBlockChainClient}; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use ethcore::transaction::SignedTransaction; use network::PeerId; From 0977b82eeb5b647e2c2b5b5a204c1f8620a6105f Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Sat, 10 Dec 2016 13:54:17 +0100 Subject: [PATCH 068/131] More fixes. --- ethcore/light/src/net/tests/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 29c1a819a..876432ce2 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -94,7 +94,7 @@ impl Provider for TestProvider { let best_num = self.0.client.chain_info().best_block_number; let start_num = req.block_num; - match self.0.client.block_hash(BlockID::Number(req.block_num)) { + match self.0.client.block_hash(BlockId::Number(req.block_num)) { Some(hash) if hash == req.block_hash => {} _=> { trace!(target: "les_provider", "unknown/non-canonical start block in header request: {:?}", (req.block_num, req.block_hash)); @@ -106,7 +106,7 @@ impl Provider for TestProvider { .map(|x: u64| x.saturating_mul(req.skip + 1)) .take_while(|x| if req.reverse { x < &start_num } else { best_num - start_num >= *x }) .map(|x| if req.reverse { start_num - x } else { start_num + x }) - .map(|x| self.0.client.block_header(BlockID::Number(x))) + .map(|x| self.0.client.block_header(BlockId::Number(x))) .take_while(|x| x.is_some()) .flat_map(|x| x) .collect() @@ -114,7 +114,7 @@ impl Provider for TestProvider { fn block_bodies(&self, req: request::Bodies) -> Vec<Bytes> { req.block_hashes.into_iter() - .map(|hash| self.0.client.block_body(BlockID::Hash(hash))) + .map(|hash| self.0.client.block_body(BlockId::Hash(hash))) .map(|body| body.unwrap_or_else(|| ::rlp::EMPTY_LIST_RLP.to_vec())) .collect() } @@ -285,7 +285,7 @@ fn get_block_headers() { let request = Headers { block_num: 1, - block_hash: provider.client.block_hash(BlockID::Number(1)).unwrap(), + block_hash: provider.client.block_hash(BlockId::Number(1)).unwrap(), max: 10, skip: 0, reverse: false, @@ -294,7 +294,7 @@ fn get_block_headers() { let request_body = encode_request(&Request::Headers(request.clone()), req_id); let response = { - let headers: Vec<_> = (0..10).map(|i| provider.client.block_header(BlockID::Number(i + 1)).unwrap()).collect(); + let headers: Vec<_> = (0..10).map(|i| provider.client.block_header(BlockId::Number(i + 1)).unwrap()).collect(); assert_eq!(headers.len(), 10); let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Headers, 10); @@ -334,14 +334,14 @@ fn get_block_bodies() { } let request = request::Bodies { - block_hashes: (0..10).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()).collect(), + block_hashes: (0..10).map(|i| provider.client.block_hash(BlockId::Number(i)).unwrap()).collect(), }; let req_id = 111; let request_body = encode_request(&Request::Bodies(request.clone()), req_id); let response = { - let bodies: Vec<_> = (0..10).map(|i| provider.client.block_body(BlockID::Number(i + 1)).unwrap()).collect(); + let bodies: Vec<_> = (0..10).map(|i| provider.client.block_body(BlockId::Number(i + 1)).unwrap()).collect(); assert_eq!(bodies.len(), 10); let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Bodies, 10); @@ -382,7 +382,7 @@ fn get_block_receipts() { // find the first 10 block hashes starting with `f` because receipts are only provided // by the test client in that case. - let block_hashes: Vec<_> = (0..1000).map(|i| provider.client.block_hash(BlockID::Number(i)).unwrap()) + let block_hashes: Vec<_> = (0..1000).map(|i| provider.client.block_hash(BlockId::Number(i)).unwrap()) .filter(|hash| format!("{}", hash).starts_with("f")).take(10).collect(); let request = request::Receipts { From 591d086f42d4ba5e92936df277f14054e42050d2 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 14:19:15 +0100 Subject: [PATCH 069/131] Better use of React-Router (maintaining old routes) --- js/src/main.js | 59 +++++++++++++++++++----- js/src/views/Accounts/Summary/summary.js | 2 +- js/src/views/Addresses/addresses.js | 2 +- js/src/views/Contracts/contracts.js | 2 +- 4 files changed, 51 insertions(+), 14 deletions(-) diff --git a/js/src/main.js b/js/src/main.js index d508c50fc..c1dda9d57 100644 --- a/js/src/main.js +++ b/js/src/main.js @@ -15,7 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; -import { Redirect, Router, Route } from 'react-router'; +import { Redirect, Router, Route, IndexRoute } from 'react-router'; import { Accounts, Account, Addresses, Address, Application, Contract, Contracts, WriteContract, Wallet, Dapp, Dapps, Settings, SettingsBackground, SettingsParity, SettingsProxy, SettingsViews, Signer, Status } from '~/views'; @@ -26,6 +26,23 @@ export default class MainApplication extends Component { routerHistory: PropTypes.any.isRequired }; + handleDeprecatedRoute = (nextState, replace) => { + const { address } = nextState.params; + const redirectMap = { + account: 'accounts', + address: 'addresses', + contract: 'contracts' + }; + + const oldRoute = nextState.routes[0].path; + const newRoute = Object.keys(redirectMap).reduce((newRoute, key) => { + return newRoute.replace(new RegExp(`^/${key}`), '/' + redirectMap[key]); + }, oldRoute); + + console.warn(`Route "${oldRoute}" is deprecated. Please use "${newRoute}"`); + replace(newRoute.replace(':address', address)); + } + render () { const { routerHistory } = this.props; @@ -34,26 +51,46 @@ export default class MainApplication extends Component { <Redirect from='/' to='/accounts' /> <Redirect from='/auth' to='/accounts' query={ {} } /> <Redirect from='/settings' to='/settings/views' /> + + { /** Backward Compatible links */ } + <Route path='/account/:address' onEnter={ this.handleDeprecatedRoute } /> + <Route path='/address/:address' onEnter={ this.handleDeprecatedRoute } /> + <Route path='/contract/:address' onEnter={ this.handleDeprecatedRoute } /> + <Route path='/' component={ Application }> - <Route path='accounts' component={ Accounts } /> - <Route path='account/:address' component={ Account } /> - <Route path='wallet/:address' component={ Wallet } /> - <Route path='addresses' component={ Addresses } /> - <Route path='address/:address' component={ Address } /> + <Route path='accounts'> + <IndexRoute component={ Accounts } /> + <Route path=':address' component={ Account } /> + <Route path='/wallet/:address' component={ Wallet } /> + </Route> + + <Route path='addresses'> + <IndexRoute component={ Addresses } /> + <Route path=':address' component={ Address } /> + </Route> + <Route path='apps' component={ Dapps } /> <Route path='app/:id' component={ Dapp } /> - <Route path='contracts' component={ Contracts } /> - <Route path='contracts/write' component={ WriteContract } /> - <Route path='contract/:address' component={ Contract } /> + + <Route path='contracts'> + <IndexRoute component={ Contracts } /> + <Route path='write' component={ WriteContract } /> + <Route path=':address' component={ Contract } /> + </Route> + <Route path='settings' component={ Settings }> <Route path='background' component={ SettingsBackground } /> <Route path='proxy' component={ SettingsProxy } /> <Route path='views' component={ SettingsViews } /> <Route path='parity' component={ SettingsParity } /> </Route> + <Route path='signer' component={ Signer } /> - <Route path='status' component={ Status } /> - <Route path='status/:subpage' component={ Status } /> + + <Route path='status'> + <IndexRoute component={ Status } /> + <Route path=':subpage' component={ Status } /> + </Route> </Route> </Router> ); diff --git a/js/src/views/Accounts/Summary/summary.js b/js/src/views/Accounts/Summary/summary.js index 3183a2903..a19b9a9de 100644 --- a/js/src/views/Accounts/Summary/summary.js +++ b/js/src/views/Accounts/Summary/summary.js @@ -153,7 +153,7 @@ export default class Summary extends Component { const { link, noLink, account, name } = this.props; const { address } = account; - const viewLink = `/${link || 'account'}/${address}`; + const viewLink = `/${link || 'accounts'}/${address}`; const content = ( <IdentityName address={ address } name={ name } unknown /> diff --git a/js/src/views/Addresses/addresses.js b/js/src/views/Addresses/addresses.js index a3e52ec55..fd26d94e5 100644 --- a/js/src/views/Addresses/addresses.js +++ b/js/src/views/Addresses/addresses.js @@ -95,7 +95,7 @@ class Addresses extends Component { return ( <List - link='address' + link='addresses' search={ searchValues } accounts={ contacts } balances={ balances } diff --git a/js/src/views/Contracts/contracts.js b/js/src/views/Contracts/contracts.js index b84705b32..524954f80 100644 --- a/js/src/views/Contracts/contracts.js +++ b/js/src/views/Contracts/contracts.js @@ -85,7 +85,7 @@ class Contracts extends Component { { this.renderDeployContract() } <Page> <List - link='contract' + link='contracts' search={ searchValues } accounts={ contracts } balances={ balances } From 02c788a40378e7690a11ca288ef4e372cad79fd2 Mon Sep 17 00:00:00 2001 From: arkpar <arkady.paronyan@gmail.com> Date: Sat, 10 Dec 2016 14:20:34 +0100 Subject: [PATCH 070/131] Network connectivity fixes --- ethcore/res/ethereum/frontier.json | 3 --- sync/src/chain.rs | 2 +- sync/src/sync_io.rs | 4 ++++ util/network/src/host.rs | 14 +++++++++----- util/network/src/session.rs | 8 ++++---- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/ethcore/res/ethereum/frontier.json b/ethcore/res/ethereum/frontier.json index 2c520c46a..3a9dce456 100644 --- a/ethcore/res/ethereum/frontier.json +++ b/ethcore/res/ethereum/frontier.json @@ -170,9 +170,6 @@ "enode://cadc6e573b6bc2a9128f2f635ac0db3353e360b56deef239e9be7e7fce039502e0ec670b595f6288c0d2116812516ad6b6ff8d5728ff45eba176989e40dead1e@37.128.191.230:30303", "enode://595a9a06f8b9bc9835c8723b6a82105aea5d55c66b029b6d44f229d6d135ac3ecdd3e9309360a961ea39d7bee7bac5d03564077a4e08823acc723370aace65ec@46.20.235.22:30303", "enode://029178d6d6f9f8026fc0bc17d5d1401aac76ec9d86633bba2320b5eed7b312980c0a210b74b20c4f9a8b0b2bf884b111fa9ea5c5f916bb9bbc0e0c8640a0f56c@216.158.85.185:30303", - "enode://84f5d5957b4880a8b0545e32e05472318898ad9fc8ebe1d56c90c12334a98e12351eccfdf3a2bf72432ac38b57e9d348400d17caa083879ade3822390f89773f@10.1.52.78:30303", - "enode://f90dc9b9bf7b8db97726b7849e175f1eb2707f3d8f281c929336e398dd89b0409fc6aeceb89e846278e9d3ecc3857cebfbe6758ff352ece6fe5d42921ee761db@10.1.173.87:30303", - "enode://6a868ced2dec399c53f730261173638a93a40214cf299ccf4d42a76e3fa54701db410669e8006347a4b3a74fa090bb35af0320e4bc8d04cf5b7f582b1db285f5@10.3.149.199:30303", "enode://fdd1b9bb613cfbc200bba17ce199a9490edc752a833f88d4134bf52bb0d858aa5524cb3ec9366c7a4ef4637754b8b15b5dc913e4ed9fdb6022f7512d7b63f181@212.47.247.103:30303", "enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303", "enode://de471bccee3d042261d52e9bff31458daecc406142b401d4cd848f677479f73104b9fdeb090af9583d3391b7f10cb2ba9e26865dd5fca4fcdc0fb1e3b723c786@54.94.239.50:30303", diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 2d53ad5ee..9f054bec8 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -1678,7 +1678,7 @@ impl ChainSync { pub fn on_packet(&mut self, io: &mut SyncIo, peer: PeerId, packet_id: u8, data: &[u8]) { if packet_id != STATUS_PACKET && !self.peers.contains_key(&peer) { - debug!(target:"sync", "Unexpected packet from unregistered peer: {}:{}", peer, io.peer_info(peer)); + debug!(target:"sync", "Unexpected packet {} from unregistered peer: {}:{}", packet_id, peer, io.peer_info(peer)); return; } let rlp = UntrustedRlp::new(data); diff --git a/sync/src/sync_io.rs b/sync/src/sync_io.rs index 8dc8c65c0..e9e2d3396 100644 --- a/sync/src/sync_io.rs +++ b/sync/src/sync_io.rs @@ -131,6 +131,10 @@ impl<'s, 'h> SyncIo for NetSyncIo<'s, 'h> { fn protocol_version(&self, protocol: &ProtocolId, peer_id: PeerId) -> u8 { self.network.protocol_version(*protocol, peer_id).unwrap_or(0) } + + fn peer_info(&self, peer_id: PeerId) -> String { + self.network.peer_client_version(peer_id) + } } diff --git a/util/network/src/host.rs b/util/network/src/host.rs index f75158e4a..975fb87b8 100644 --- a/util/network/src/host.rs +++ b/util/network/src/host.rs @@ -22,7 +22,7 @@ use std::sync::atomic::{AtomicUsize, AtomicBool, Ordering as AtomicOrdering}; use std::ops::*; use std::cmp::min; use std::path::{Path, PathBuf}; -use std::io::{Read, Write}; +use std::io::{Read, Write, ErrorKind}; use std::fs; use ethkey::{KeyPair, Secret, Random, Generator}; use mio::*; @@ -381,8 +381,6 @@ pub struct Host { impl Host { /// Create a new instance pub fn new(mut config: NetworkConfiguration, stats: Arc<NetworkStats>) -> Result<Host, NetworkError> { - trace!(target: "host", "Creating new Host object"); - let mut listen_address = match config.listen_address { None => SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), DEFAULT_PORT)), Some(addr) => addr, @@ -405,6 +403,7 @@ impl Host { // Setup the server socket let tcp_listener = try!(TcpListener::bind(&listen_address)); listen_address = SocketAddr::new(listen_address.ip(), try!(tcp_listener.local_addr()).port()); + debug!(target: "network", "Listening at {:?}", listen_address); let udp_port = config.udp_port.unwrap_or(listen_address.port()); let local_endpoint = NodeEndpoint { address: listen_address, udp_port: udp_port }; @@ -707,7 +706,10 @@ impl Host { } }; match TcpStream::connect(&address) { - Ok(socket) => socket, + Ok(socket) => { + trace!(target: "network", "Connecting to {:?}", address); + socket + }, Err(e) => { debug!(target: "network", "Can't connect to address {:?}: {:?}", address, e); return; @@ -749,7 +751,9 @@ impl Host { let socket = match self.tcp_listener.lock().accept() { Ok((sock, _addr)) => sock, Err(e) => { - debug!(target: "network", "Error accepting connection: {:?}", e); + if e.kind() != ErrorKind::WouldBlock { + debug!(target: "network", "Error accepting connection: {:?}", e); + } break }, }; diff --git a/util/network/src/session.rs b/util/network/src/session.rs index 9c8bed9da..3aab05d9a 100644 --- a/util/network/src/session.rs +++ b/util/network/src/session.rs @@ -435,16 +435,16 @@ impl Session { // map to protocol let protocol = self.info.capabilities[i].protocol; - let pid = packet_id - self.info.capabilities[i].id_offset; + let protocol_packet_id = packet_id - self.info.capabilities[i].id_offset; match *self.protocol_states.entry(protocol).or_insert_with(|| ProtocolState::Pending(Vec::new())) { ProtocolState::Connected => { - trace!(target: "network", "Packet {} mapped to {:?}:{}, i={}, capabilities={:?}", packet_id, protocol, pid, i, self.info.capabilities); - Ok(SessionData::Packet { data: packet.data, protocol: protocol, packet_id: pid } ) + trace!(target: "network", "Packet {} mapped to {:?}:{}, i={}, capabilities={:?}", packet_id, protocol, protocol_packet_id, i, self.info.capabilities); + Ok(SessionData::Packet { data: packet.data, protocol: protocol, packet_id: protocol_packet_id } ) } ProtocolState::Pending(ref mut pending) => { trace!(target: "network", "Packet {} deferred until protocol connection event completion", packet_id); - pending.push((packet.data, packet_id)); + pending.push((packet.data, protocol_packet_id)); Ok(SessionData::Continue) } From 13607d48be99d52240912138c1cb1479d7d63abb Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 14:26:35 +0100 Subject: [PATCH 071/131] Better use of Tab Bar --- js/src/views/Application/TabBar/tabBar.js | 59 +++++++++++------------ 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/js/src/views/Application/TabBar/tabBar.js b/js/src/views/Application/TabBar/tabBar.js index ccf1290c5..63f569f1f 100644 --- a/js/src/views/Application/TabBar/tabBar.js +++ b/js/src/views/Application/TabBar/tabBar.js @@ -17,7 +17,6 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; -import { bindActionCreators } from 'redux'; import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar'; import { Tab as MUITab } from 'material-ui/Tabs'; import { isEqual } from 'lodash'; @@ -27,37 +26,24 @@ import { Badge, Tooltip } from '~/ui'; import styles from './tabBar.css'; import imagesEthcoreBlock from '../../../../assets/images/parity-logo-white-no-text.svg'; -const TABMAP = { - accounts: 'account', - wallet: 'account', - addresses: 'address', - apps: 'app', - contracts: 'contract', - deploy: 'contract' -}; - class Tab extends Component { static propTypes = { - active: PropTypes.bool, view: PropTypes.object, children: PropTypes.node, pendings: PropTypes.number }; shouldComponentUpdate (nextProps) { - return nextProps.active !== this.props.active || - (nextProps.view.id === 'signer' && nextProps.pendings !== this.props.pendings); + return (nextProps.view.id === 'signer' && nextProps.pendings !== this.props.pendings); } render () { - const { active, view, children } = this.props; + const { view, children } = this.props; const label = this.getLabel(view); return ( <MUITab - className={ active ? styles.tabactive : '' } - selected={ active } icon={ view.icon } label={ label } > @@ -126,7 +112,6 @@ class TabBar extends Component { static propTypes = { views: PropTypes.array.isRequired, - hash: PropTypes.string.isRequired, pending: PropTypes.array, isTest: PropTypes.bool, netChain: PropTypes.string @@ -140,8 +125,7 @@ class TabBar extends Component { const prevViews = this.props.views.map((v) => v.id).sort(); const nextViews = nextProps.views.map((v) => v.id).sort(); - return (nextProps.hash !== this.props.hash) || - (nextProps.pending.length !== this.props.pending.length) || + return (nextProps.pending.length !== this.props.pending.length) || (!isEqual(prevViews, nextViews)); } @@ -212,28 +196,41 @@ class TabBar extends Component { } } -function mapStateToProps (state) { - const { views } = state.settings; +function mapStateToProps (initState) { + const { views } = initState.settings; - const filteredViews = Object + let filteredViewIds = Object .keys(views) - .filter((id) => views[id].fixed || views[id].active) + .filter((id) => views[id].fixed || views[id].active); + + let filteredViews = filteredViewIds .map((id) => ({ ...views[id], id })); - const windowHash = (window.location.hash || '').split('?')[0].split('/')[1]; - const hash = TABMAP[windowHash] || windowHash; + return (state) => { + const { views } = state.settings; - return { views: filteredViews, hash }; -} + const viewIds = Object + .keys(views) + .filter((id) => views[id].fixed || views[id].active); -function mapDispatchToProps (dispatch) { - return bindActionCreators({}, dispatch); + if (isEqual(viewIds, filteredViewIds)) { + return { views: filteredViews }; + } + + filteredViewIds = viewIds; + filteredViews = viewIds + .map((id) => ({ + ...views[id], + id + })); + + return { views: filteredViews }; + }; } export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps )(TabBar); From 81c5085b35ad05313d9999ff80018e375d5c8413 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 14:31:20 +0100 Subject: [PATCH 072/131] Don't create new Contracts instance if already exists --- js/src/contracts/contracts.js | 4 ++++ js/src/views/Account/account.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/src/contracts/contracts.js b/js/src/contracts/contracts.js index f61a63690..a8020b825 100644 --- a/js/src/contracts/contracts.js +++ b/js/src/contracts/contracts.js @@ -62,6 +62,10 @@ export default class Contracts { } static create (api) { + if (instance) { + return instance; + } + return new Contracts(api); } diff --git a/js/src/views/Account/account.js b/js/src/views/Account/account.js index cbacd5280..840de05b9 100644 --- a/js/src/views/Account/account.js +++ b/js/src/views/Account/account.js @@ -26,7 +26,7 @@ import VerifyIcon from 'material-ui/svg-icons/action/verified-user'; import { EditMeta, DeleteAccount, Shapeshift, SMSVerification, Transfer, PasswordManager } from '~/modals'; import { Actionbar, Button, Page } from '~/ui'; -import shapeshiftBtn from '../../../assets/images/shapeshift-btn.png'; +import shapeshiftBtn from '~/../assets/images/shapeshift-btn.png'; import Header from './Header'; import Transactions from './Transactions'; From 65f586ed1478f8dc4fc389b94d9e582319703f92 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 14:32:54 +0100 Subject: [PATCH 073/131] Fix tab bar active style --- js/src/views/Application/TabBar/tabBar.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/src/views/Application/TabBar/tabBar.css b/js/src/views/Application/TabBar/tabBar.css index 7b74622d3..172750c8f 100644 --- a/js/src/views/Application/TabBar/tabBar.css +++ b/js/src/views/Application/TabBar/tabBar.css @@ -42,9 +42,12 @@ } &.tabactive, &.tabactive:hover { - color: white !important; background: rgba(0, 0, 0, 0.25) !important; border-radius: 4px 4px 0 0; + + * { + color: white !important; + } } } From e1ade5b3750561101ce8519e3767ae7b63886e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Sat, 10 Dec 2016 14:56:41 +0100 Subject: [PATCH 074/131] Maintaining a list of transactions propagated from other peers --- ethcore/src/client/chain_notify.rs | 11 ++++- ethcore/src/client/client.rs | 15 ++++--- ethcore/src/client/test_client.rs | 2 +- ethcore/src/client/traits.rs | 8 ++-- ethcore/src/service.rs | 6 ++- .../dapps/localtx/Transaction/transaction.js | 26 ++++++++++-- .../localtx/Transaction/transaction.spec.js | 2 +- rpc/src/v1/tests/helpers/sync_provider.rs | 10 ++++- rpc/src/v1/types/sync.rs | 16 ++++++-- sync/src/api.rs | 20 +++++++--- sync/src/chain.rs | 10 ++++- sync/src/transactions_stats.rs | 40 +++++++++++++++++++ 12 files changed, 137 insertions(+), 29 deletions(-) diff --git a/ethcore/src/client/chain_notify.rs b/ethcore/src/client/chain_notify.rs index e0282d460..50ff20e38 100644 --- a/ethcore/src/client/chain_notify.rs +++ b/ethcore/src/client/chain_notify.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. use ipc::IpcConfig; -use util::H256; +use util::{H256, H512}; /// Represents what has to be handled by actor listening to chain events #[ipc] @@ -40,6 +40,15 @@ pub trait ChainNotify : Send + Sync { fn stop(&self) { // does nothing by default } + + /// fires when new transactions are imported + fn transactions_imported(&self, + _hashes: Vec<H256>, + _peer_id: Option<H512>, + _block_num: u64, + ) { + // does nothing by default + } } impl IpcConfig for ChainNotify { } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index dfd899b29..9add41e4f 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -25,7 +25,7 @@ use time::precise_time_ns; use util::{Bytes, PerfTimer, Itertools, Mutex, RwLock, Hashable}; use util::{journaldb, TrieFactory, Trie}; use util::trie::TrieSpec; -use util::{U256, H256, Address, H2048, Uint, FixedHash}; +use util::{U256, H256, H512, Address, H2048, Uint, FixedHash}; use util::kvdb::*; // other @@ -559,11 +559,16 @@ impl Client { } /// Import transactions from the IO queue - pub fn import_queued_transactions(&self, transactions: &[Bytes]) -> usize { + pub fn import_queued_transactions(&self, transactions: &[Bytes], peer_id: Option<H512>) -> usize { trace!(target: "external_tx", "Importing queued"); let _timer = PerfTimer::new("import_queued_transactions"); self.queue_transactions.fetch_sub(transactions.len(), AtomicOrdering::SeqCst); - let txs = transactions.iter().filter_map(|bytes| UntrustedRlp::new(bytes).as_val().ok()).collect(); + let txs: Vec<SignedTransaction> = transactions.iter().filter_map(|bytes| UntrustedRlp::new(bytes).as_val().ok()).collect(); + let hashes: Vec<_> = txs.iter().map(|tx| tx.hash()).collect(); + let block_number = self.chain_info().best_block_number; + self.notify(|notify| { + notify.transactions_imported(hashes.clone(), peer_id.clone(), block_number); + }); let results = self.miner.import_external_transactions(self, txs); results.len() } @@ -1264,14 +1269,14 @@ impl BlockChainClient for Client { (*self.build_last_hashes(self.chain.read().best_block_hash())).clone() } - fn queue_transactions(&self, transactions: Vec<Bytes>) { + fn queue_transactions(&self, transactions: Vec<Bytes>, node_id: Option<H512>) { let queue_size = self.queue_transactions.load(AtomicOrdering::Relaxed); trace!(target: "external_tx", "Queue size: {}", queue_size); if queue_size > MAX_TX_QUEUE_SIZE { debug!("Ignoring {} transactions: queue is full", transactions.len()); } else { let len = transactions.len(); - match self.io_channel.lock().send(ClientIoMessage::NewTransactions(transactions)) { + match self.io_channel.lock().send(ClientIoMessage::NewTransactions(transactions, node_id)) { Ok(_) => { self.queue_transactions.fetch_add(len, AtomicOrdering::SeqCst); } diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 317a481c7..44efade66 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -657,7 +657,7 @@ impl BlockChainClient for TestBlockChainClient { unimplemented!(); } - fn queue_transactions(&self, transactions: Vec<Bytes>) { + fn queue_transactions(&self, transactions: Vec<Bytes>, _peer_id: Option<H512>) { // import right here let txs = transactions.into_iter().filter_map(|bytes| UntrustedRlp::new(&bytes).as_val().ok()).collect(); self.miner.import_external_transactions(self, txs); diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index e23a564d4..c032d4059 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. use std::collections::BTreeMap; -use util::{U256, Address, H256, H2048, Bytes, Itertools}; +use util::{U256, Address, H256, H512, H2048, Bytes, Itertools}; use util::stats::Histogram; use blockchain::TreeRoute; use verification::queue::QueueInfo as BlockQueueInfo; @@ -200,7 +200,7 @@ pub trait BlockChainClient : Sync + Send { fn last_hashes(&self) -> LastHashes; /// Queue transactions for importing. - fn queue_transactions(&self, transactions: Vec<Bytes>); + fn queue_transactions(&self, transactions: Vec<Bytes>, peer_id: Option<H512>); /// list all transactions fn pending_transactions(&self) -> Vec<SignedTransaction>; @@ -294,9 +294,9 @@ pub trait ProvingBlockChainClient: BlockChainClient { /// The key is the keccak hash of the account's address. /// Returns a vector of raw trie nodes (in order from the root) proving the query. /// Nodes after `from_level` may be omitted. - /// An empty vector indicates unservable query. + /// An empty vector indicates unservable query. fn prove_account(&self, key1: H256, from_level: u32, id: BlockID) -> Vec<Bytes>; /// Get code by address hash. fn code_by_hash(&self, account_key: H256, id: BlockID) -> Bytes; -} \ No newline at end of file +} diff --git a/ethcore/src/service.rs b/ethcore/src/service.rs index 36b5e7157..b595843a8 100644 --- a/ethcore/src/service.rs +++ b/ethcore/src/service.rs @@ -39,7 +39,7 @@ pub enum ClientIoMessage { /// A block is ready BlockVerified, /// New transaction RLPs are ready to be imported - NewTransactions(Vec<Bytes>), + NewTransactions(Vec<Bytes>, Option<H512>), /// Begin snapshot restoration BeginRestoration(ManifestData), /// Feed a state chunk to the snapshot service @@ -196,7 +196,9 @@ impl IoHandler<ClientIoMessage> for ClientIoHandler { match *net_message { ClientIoMessage::BlockVerified => { self.client.import_verified_blocks(); } - ClientIoMessage::NewTransactions(ref transactions) => { self.client.import_queued_transactions(transactions); } + ClientIoMessage::NewTransactions(ref transactions, ref peer_id) => { + self.client.import_queued_transactions(transactions, peer_id.clone()); + } ClientIoMessage::BeginRestoration(ref manifest) => { if let Err(e) = self.snapshot.init_restore(manifest.clone(), true) { warn!("Failed to initialize snapshot restoration: {}", e); diff --git a/js/src/dapps/localtx/Transaction/transaction.js b/js/src/dapps/localtx/Transaction/transaction.js index 17a45ecd6..c9ca10ba5 100644 --- a/js/src/dapps/localtx/Transaction/transaction.js +++ b/js/src/dapps/localtx/Transaction/transaction.js @@ -48,7 +48,6 @@ class BaseTransaction extends Component { <IdentityIcon address={ transaction.from } /> - 0x{ transaction.nonce.toString(16) } </div> ); } @@ -87,6 +86,17 @@ class BaseTransaction extends Component { </span> ); } + + renderReceived (stats) { + const noOfPeers = Object.keys(stats.receivedFrom).length; + const noOfPropagations = Object.values(stats.receivedFrom).reduce((sum, val) => sum + val, 0); + + return ( + <span className={ styles.nowrap }> + { noOfPropagations } ({ noOfPeers } peers) + </span> + ); + } } export class Transaction extends BaseTransaction { @@ -103,7 +113,8 @@ export class Transaction extends BaseTransaction { isLocal: false, stats: { firstSeen: 0, - propagatedTo: {} + propagatedTo: {}, + receivedFrom: {} } }; @@ -129,6 +140,9 @@ export class Transaction extends BaseTransaction { <th> # Propagated </th> + <th> + # Received + </th> <th /> </tr> ); @@ -165,6 +179,9 @@ export class Transaction extends BaseTransaction { <td> { this.renderPropagation(stats) } </td> + <td> + { this.renderReceived(stats) } + </td> </tr> ); } @@ -193,7 +210,8 @@ export class LocalTransaction extends BaseTransaction { static defaultProps = { stats: { - propagatedTo: {} + propagatedTo: {}, + receivedFrom: {} } }; @@ -317,6 +335,8 @@ export class LocalTransaction extends BaseTransaction { { this.renderStatus() } <br /> { status === 'pending' ? this.renderPropagation(stats) : null } + <br /> + { status === 'pending' ? this.renderReceived(stats) : null } </td> </tr> ); diff --git a/js/src/dapps/localtx/Transaction/transaction.spec.js b/js/src/dapps/localtx/Transaction/transaction.spec.js index 04f2f8de8..2bd3691db 100644 --- a/js/src/dapps/localtx/Transaction/transaction.spec.js +++ b/js/src/dapps/localtx/Transaction/transaction.spec.js @@ -34,7 +34,7 @@ describe('dapps/localtx/Transaction', () => { it('renders without crashing', () => { const transaction = { hash: '0x1234567890', - nonce: 15, + nonce: new BigNumber(15), gasPrice: new BigNumber(10), gas: new BigNumber(10) }; diff --git a/rpc/src/v1/tests/helpers/sync_provider.rs b/rpc/src/v1/tests/helpers/sync_provider.rs index 8800d926a..aa7e8d849 100644 --- a/rpc/src/v1/tests/helpers/sync_provider.rs +++ b/rpc/src/v1/tests/helpers/sync_provider.rs @@ -105,13 +105,19 @@ impl SyncProvider for TestSyncProvider { first_seen: 10, propagated_to: map![ 128.into() => 16 - ] + ], + received_from: map![ + 1.into() => 10 + ], }, 5.into() => TransactionStats { first_seen: 16, propagated_to: map![ 16.into() => 1 - ] + ], + received_from: map![ + 256.into() => 2 + ], } ] } diff --git a/rpc/src/v1/types/sync.rs b/rpc/src/v1/types/sync.rs index 6f8938be9..65d989156 100644 --- a/rpc/src/v1/types/sync.rs +++ b/rpc/src/v1/types/sync.rs @@ -127,6 +127,9 @@ pub struct TransactionStats { /// Peers this transaction was propagated to with count. #[serde(rename="propagatedTo")] pub propagated_to: BTreeMap<H512, usize>, + /// Peers that propagated this transaction back. + #[serde(rename="receivedFrom")] + pub received_from: BTreeMap<H512, usize>, } impl From<SyncPeerInfo> for PeerInfo { @@ -157,7 +160,11 @@ impl From<SyncTransactionStats> for TransactionStats { propagated_to: s.propagated_to .into_iter() .map(|(id, count)| (id.into(), count)) - .collect() + .collect(), + received_from: s.received_from + .into_iter() + .map(|(id, count)| (id.into(), count)) + .collect(), } } } @@ -208,10 +215,13 @@ mod tests { first_seen: 100, propagated_to: map![ 10.into() => 50 - ] + ], + received_from: map![ + 1.into() => 1000 + ], }; let serialized = serde_json::to_string(&stats).unwrap(); - assert_eq!(serialized, r#"{"firstSeen":100,"propagatedTo":{"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a":50}}"#) + assert_eq!(serialized, r#"{"firstSeen":100,"propagatedTo":{"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a":50},"receivedFrom":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001":1000}}"#) } } diff --git a/sync/src/api.rs b/sync/src/api.rs index 7c531bf7c..10434ce26 100644 --- a/sync/src/api.rs +++ b/sync/src/api.rs @@ -99,6 +99,8 @@ pub struct TransactionStats { pub first_seen: u64, /// Peers it was propagated to. pub propagated_to: BTreeMap<H512, usize>, + /// Peers that propagated the transaction back. + pub received_from: BTreeMap<H512, usize>, } /// Peer connection information @@ -144,7 +146,7 @@ pub struct EthSync { network: NetworkService, /// Main (eth/par) protocol handler sync_handler: Arc<SyncProtocolHandler>, - /// Light (les) protocol handler + /// Light (les) protocol handler light_proto: Option<Arc<LightProtocol>>, /// The main subprotocol name subprotocol_name: [u8; 3], @@ -155,7 +157,7 @@ pub struct EthSync { impl EthSync { /// Creates and register protocol with the network service pub fn new(params: Params) -> Result<Arc<EthSync>, NetworkError> { - let pruning_info = params.chain.pruning_info(); + let pruning_info = params.chain.pruning_info(); let light_proto = match params.config.serve_light { false => None, true => Some({ @@ -297,7 +299,7 @@ impl ChainNotify for EthSync { Some(lp) => lp, None => return, }; - + let chain_info = self.sync_handler.chain.chain_info(); light_proto.make_announcement(context, Announcement { head_hash: chain_info.best_block_hash, @@ -323,7 +325,7 @@ impl ChainNotify for EthSync { // register the warp sync subprotocol self.network.register_protocol(self.sync_handler.clone(), WARP_SYNC_PROTOCOL_ID, SNAPSHOT_SYNC_PACKET_COUNT, &[1u8]) .unwrap_or_else(|e| warn!("Error registering snapshot sync protocol: {:?}", e)); - + // register the light protocol. if let Some(light_proto) = self.light_proto.as_ref().map(|x| x.clone()) { self.network.register_protocol(light_proto, self.light_subprotocol_name, ::light::net::PACKET_COUNT, ::light::net::PROTOCOL_VERSIONS) @@ -335,6 +337,11 @@ impl ChainNotify for EthSync { self.sync_handler.snapshot_service.abort_restore(); self.network.stop().unwrap_or_else(|e| warn!("Error stopping network: {:?}", e)); } + + fn transactions_imported(&self, hashes: Vec<H256>, peer_id: Option<H512>, block_number: u64) { + let mut sync = self.sync_handler.sync.write(); + sync.transactions_imported(hashes, peer_id, block_number); + } } /// LES event handler. @@ -344,7 +351,8 @@ struct TxRelay(Arc<BlockChainClient>); impl LightHandler for TxRelay { fn on_transactions(&self, ctx: &EventContext, relay: &[::ethcore::transaction::SignedTransaction]) { trace!(target: "les", "Relaying {} transactions from peer {}", relay.len(), ctx.peer()); - self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).to_vec()).collect()) + // TODO [ToDr] Can we get a peer enode somehow? + self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).to_vec()).collect(), None) } } @@ -547,4 +555,4 @@ pub struct ServiceConfiguration { pub net: NetworkConfiguration, /// IPC path. pub io_path: String, -} \ No newline at end of file +} diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 2d53ad5ee..9115ac297 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -432,6 +432,13 @@ impl ChainSync { self.transactions_stats.stats() } + /// Updates statistics for imported transactions. + pub fn transactions_imported(&mut self, hashes: Vec<H256>, peer_id: Option<H512>, block_number: u64) { + for hash in hashes { + self.transactions_stats.received(hash, peer_id, block_number); + } + } + /// Abort all sync activity pub fn abort(&mut self, io: &mut SyncIo) { self.reset_and_continue(io); @@ -1409,7 +1416,8 @@ impl ChainSync { let tx = rlp.as_raw().to_vec(); transactions.push(tx); } - io.chain().queue_transactions(transactions); + let id = io.peer_session_info(peer_id).and_then(|info| info.id); + io.chain().queue_transactions(transactions, id); Ok(()) } diff --git a/sync/src/transactions_stats.rs b/sync/src/transactions_stats.rs index 8c5eb6dda..a91a860e5 100644 --- a/sync/src/transactions_stats.rs +++ b/sync/src/transactions_stats.rs @@ -26,6 +26,7 @@ type BlockNumber = u64; pub struct Stats { first_seen: BlockNumber, propagated_to: HashMap<NodeId, usize>, + received_from: HashMap<NodeId, usize>, } impl Stats { @@ -33,6 +34,7 @@ impl Stats { Stats { first_seen: number, propagated_to: Default::default(), + received_from: Default::default(), } } } @@ -45,6 +47,10 @@ impl<'a> From<&'a Stats> for TransactionStats { .iter() .map(|(hash, size)| (*hash, *size)) .collect(), + received_from: other.received_from + .iter() + .map(|(hash, size)| (*hash, *size)) + .collect(), } } } @@ -63,6 +69,14 @@ impl TransactionsStats { *count = count.saturating_add(1); } + /// Increase number of back-propagations from given `enodeid`. + pub fn received(&mut self, hash: H256, enode_id: Option<NodeId>, current_block_num: BlockNumber) { + let enode_id = enode_id.unwrap_or_default(); + let mut stats = self.pending_transactions.entry(hash).or_insert_with(|| Stats::new(current_block_num)); + let mut count = stats.received_from.entry(enode_id).or_insert(0); + *count = count.saturating_add(1); + } + /// Returns propagation stats for given hash or `None` if hash is not known. #[cfg(test)] pub fn get(&self, hash: &H256) -> Option<&Stats> { @@ -112,6 +126,32 @@ mod tests { propagated_to: hash_map![ enodeid1 => 2, enodeid2 => 1 + ], + received_from: Default::default(), + })); + } + + #[test] + fn should_keep_track_of_back_propagations() { + // given + let mut stats = TransactionsStats::default(); + let hash = 5.into(); + let enodeid1 = 2.into(); + let enodeid2 = 5.into(); + + // when + stats.received(hash, Some(enodeid1), 5); + stats.received(hash, Some(enodeid1), 10); + stats.received(hash, Some(enodeid2), 15); + + // then + let stats = stats.get(&hash); + assert_eq!(stats, Some(&Stats { + first_seen: 5, + propagated_to: Default::default(), + received_from: hash_map![ + enodeid1 => 2, + enodeid2 => 1 ] })); } From ef93262311c97ef7f1b0f845a45652894c3c5121 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 15:19:05 +0100 Subject: [PATCH 075/131] See addresses outside address book + Save them --- js/src/modals/AddAddress/addAddress.js | 9 ++ js/src/views/Account/Header/header.css | 4 + js/src/views/Account/Header/header.js | 27 ++++-- js/src/views/Address/address.js | 109 +++++++++++++++++++------ 4 files changed, 119 insertions(+), 30 deletions(-) diff --git a/js/src/modals/AddAddress/addAddress.js b/js/src/modals/AddAddress/addAddress.js index e44cb0b3c..a72158cc7 100644 --- a/js/src/modals/AddAddress/addAddress.js +++ b/js/src/modals/AddAddress/addAddress.js @@ -28,6 +28,7 @@ export default class AddAddress extends Component { static propTypes = { contacts: PropTypes.object.isRequired, + address: PropTypes.string, onClose: PropTypes.func }; @@ -39,6 +40,12 @@ export default class AddAddress extends Component { description: '' }; + componentWillMount () { + if (this.props.address) { + this.onEditAddress(null, this.props.address); + } + } + render () { return ( <Modal @@ -77,6 +84,8 @@ export default class AddAddress extends Component { hint='the network address for the entry' error={ addressError } value={ address } + disabled={ !!this.props.address } + allowCopy={ false } onChange={ this.onEditAddress } /> <Input label='address name' diff --git a/js/src/views/Account/Header/header.css b/js/src/views/Account/Header/header.css index 74390face..26c2a5b22 100644 --- a/js/src/views/Account/Header/header.css +++ b/js/src/views/Account/Header/header.css @@ -31,6 +31,10 @@ .infoline, .uuidline { line-height: 1.618em; + + &.bigaddress { + font-size: 1.25em; + } } .infoline, diff --git a/js/src/views/Account/Header/header.js b/js/src/views/Account/Header/header.js index 6ce88aef4..7df87bd9c 100644 --- a/js/src/views/Account/Header/header.js +++ b/js/src/views/Account/Header/header.js @@ -32,18 +32,20 @@ export default class Header extends Component { balance: PropTypes.object, className: PropTypes.string, children: PropTypes.node, - isContract: PropTypes.bool + isContract: PropTypes.bool, + hideName: PropTypes.bool }; static defaultProps = { className: '', children: null, - isContract: false + isContract: false, + hideName: false }; render () { const { api } = this.context; - const { account, balance, className, children } = this.props; + const { account, balance, className, children, hideName } = this.props; const { address, meta, uuid } = account; if (!account) { @@ -60,17 +62,20 @@ export default class Header extends Component { <IdentityIcon address={ address } /> <div className={ styles.floatleft }> - <ContainerTitle title={ <IdentityName address={ address } unknown /> } /> - <div className={ styles.addressline }> + { this.renderName(address) } + + <div className={ [ hideName ? styles.bigaddress : '', styles.addressline ].join(' ') }> <CopyToClipboard data={ address } /> <div className={ styles.address }>{ address }</div> </div> + { uuidText } <div className={ styles.infoline }> { meta.description } </div> { this.renderTxCount() } </div> + <div className={ styles.tags }> <Tags tags={ meta.tags } /> </div> @@ -89,6 +94,18 @@ export default class Header extends Component { ); } + renderName (address) { + const { hideName } = this.props; + + if (hideName) { + return null; + } + + return ( + <ContainerTitle title={ <IdentityName address={ address } unknown /> } /> + ); + } + renderTxCount () { const { balance, isContract } = this.props; diff --git a/js/src/views/Address/address.js b/js/src/views/Address/address.js index c1427b2be..9c39203ba 100644 --- a/js/src/views/Address/address.js +++ b/js/src/views/Address/address.js @@ -19,8 +19,9 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import ActionDelete from 'material-ui/svg-icons/action/delete'; import ContentCreate from 'material-ui/svg-icons/content/create'; +import ContentAdd from 'material-ui/svg-icons/content/add'; -import { EditMeta } from '~/modals'; +import { EditMeta, AddAddress } from '~/modals'; import { Actionbar, Button, Page } from '~/ui'; import Header from '../Account/Header'; @@ -32,7 +33,7 @@ class Address extends Component { static contextTypes = { api: PropTypes.object.isRequired, router: PropTypes.object.isRequired - } + }; static propTypes = { setVisibleAccounts: PropTypes.func.isRequired, @@ -40,12 +41,13 @@ class Address extends Component { contacts: PropTypes.object, balances: PropTypes.object, params: PropTypes.object - } + }; state = { showDeleteDialog: false, - showEditDialog: false - } + showEditDialog: false, + showAdd: false + }; componentDidMount () { this.setVisibleAccounts(); @@ -73,32 +75,69 @@ class Address extends Component { render () { const { contacts, balances } = this.props; const { address } = this.props.params; - const { showDeleteDialog } = this.state; + + if (Object.keys(contacts).length === 0) { + return null; + } const contact = (contacts || {})[address]; const balance = (balances || {})[address]; - if (!contact) { + return ( + <div> + { this.renderAddAddress(contact, address) } + { this.renderEditDialog(contact) } + { this.renderActionbar(contact) } + { this.renderDelete(contact) } + <Page> + <Header + account={ contact || { address, meta: {} } } + balance={ balance } + hideName={ !contact } + /> + <Transactions + address={ address } + /> + </Page> + </div> + ); + } + + renderAddAddress (contact, address) { + if (contact) { + return null; + } + + const { contacts } = this.props; + const { showAdd } = this.state; + + if (!showAdd) { return null; } return ( - <div> - { this.renderEditDialog(contact) } - { this.renderActionbar(contact) } - <Delete - account={ contact } - visible={ showDeleteDialog } - route='/addresses' - onClose={ this.closeDeleteDialog } /> - <Page> - <Header - account={ contact } - balance={ balance } /> - <Transactions - address={ address } /> - </Page> - </div> + <AddAddress + contacts={ contacts } + onClose={ this.onCloseAdd } + address={ address } + /> + ); + } + + renderDelete (contact) { + if (!contact) { + return null; + } + + const { showDeleteDialog } = this.state; + + return ( + <Delete + account={ contact } + visible={ showDeleteDialog } + route='/addresses' + onClose={ this.closeDeleteDialog } + /> ); } @@ -116,17 +155,27 @@ class Address extends Component { onClick={ this.showDeleteDialog } /> ]; + const addToBook = ( + <Button + key='newAddress' + icon={ <ContentAdd /> } + label='save address' + onClick={ this.onOpenAdd } + /> + ); + return ( <Actionbar title='Address Information' - buttons={ !contact ? [] : buttons } /> + buttons={ !contact ? [ addToBook ] : buttons } + /> ); } renderEditDialog (contact) { const { showEditDialog } = this.state; - if (!showEditDialog) { + if (!contact || !showEditDialog) { return null; } @@ -151,6 +200,16 @@ class Address extends Component { showDeleteDialog = () => { this.setState({ showDeleteDialog: true }); } + + onOpenAdd = () => { + this.setState({ + showAdd: true + }); + } + + onCloseAdd = () => { + this.setState({ showAdd: false }); + } } function mapStateToProps (state) { From 054b4810d552fcea61079ac4eb41650a0569cd74 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 15:30:39 +0100 Subject: [PATCH 076/131] Fix wallet data's prop types --- js/src/modals/CreateWallet/WalletInfo/walletInfo.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/src/modals/CreateWallet/WalletInfo/walletInfo.js b/js/src/modals/CreateWallet/WalletInfo/walletInfo.js index bbbe5877f..cc5c96964 100644 --- a/js/src/modals/CreateWallet/WalletInfo/walletInfo.js +++ b/js/src/modals/CreateWallet/WalletInfo/walletInfo.js @@ -30,10 +30,12 @@ export default class WalletInfo extends Component { owners: PropTypes.array.isRequired, required: PropTypes.oneOfType([ PropTypes.string, + PropTypes.object, PropTypes.number ]).isRequired, daylimit: PropTypes.oneOfType([ PropTypes.string, + PropTypes.object, PropTypes.number ]).isRequired, From e66157f9227606d8c4b07115b0ac2d91faebc7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Sat, 10 Dec 2016 16:40:32 +0100 Subject: [PATCH 077/131] fixing test --- rpc/src/v1/tests/mocked/parity.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index 9b4daaccd..45ee4aa75 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -363,7 +363,7 @@ fn rpc_parity_transactions_stats() { let io = deps.default_client(); let request = r#"{"jsonrpc": "2.0", "method": "parity_pendingTransactionsStats", "params":[], "id": 1}"#; - let response = r#"{"jsonrpc":"2.0","result":{"0x0000000000000000000000000000000000000000000000000000000000000001":{"firstSeen":10,"propagatedTo":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080":16}},"0x0000000000000000000000000000000000000000000000000000000000000005":{"firstSeen":16,"propagatedTo":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010":1}}},"id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":{"0x0000000000000000000000000000000000000000000000000000000000000001":{"firstSeen":10,"propagatedTo":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080":16},"receivedFrom":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001":10}},"0x0000000000000000000000000000000000000000000000000000000000000005":{"firstSeen":16,"propagatedTo":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010":1},"receivedFrom":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100":2}}},"id":1}"#; assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); } From d9da8a48ffdecd49655eebd75c749115d22078da Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 16:46:00 +0100 Subject: [PATCH 078/131] Add sender balance in transfer modal --- js/src/modals/Transfer/Details/details.js | 4 +- js/src/modals/Transfer/store.js | 3 +- js/src/modals/Transfer/transfer.js | 5 ++- js/src/redux/providers/balancesReducer.js | 2 +- .../ui/Form/AddressSelect/addressSelect.css | 9 ++++- js/src/ui/Form/AddressSelect/addressSelect.js | 37 +++++++++++++++++-- 6 files changed, 50 insertions(+), 10 deletions(-) diff --git a/js/src/modals/Transfer/Details/details.js b/js/src/modals/Transfer/Details/details.js index 53f04c489..20ac06f85 100644 --- a/js/src/modals/Transfer/Details/details.js +++ b/js/src/modals/Transfer/Details/details.js @@ -134,6 +134,7 @@ export default class Details extends Component { images: PropTypes.object.isRequired, sender: PropTypes.string, senderError: PropTypes.string, + sendersBalances: PropTypes.object, recipient: PropTypes.string, recipientError: PropTypes.string, tag: PropTypes.string, @@ -203,7 +204,7 @@ export default class Details extends Component { } renderFromAddress () { - const { sender, senderError, senders } = this.props; + const { sender, senderError, senders, sendersBalances } = this.props; if (!senders) { return null; @@ -218,6 +219,7 @@ export default class Details extends Component { hint='the sender address' value={ sender } onChange={ this.onEditSender } + balances={ sendersBalances } /> </div> ); diff --git a/js/src/modals/Transfer/store.js b/js/src/modals/Transfer/store.js index 3a8f54f92..e08d7203d 100644 --- a/js/src/modals/Transfer/store.js +++ b/js/src/modals/Transfer/store.js @@ -54,6 +54,7 @@ export default class TransferStore { @observable sender = ''; @observable senderError = null; + @observable sendersBalances = {}; @observable total = '0.0'; @observable totalError = null; @@ -66,8 +67,6 @@ export default class TransferStore { onClose = null; senders = null; - sendersBalances = null; - isWallet = false; wallet = null; diff --git a/js/src/modals/Transfer/transfer.js b/js/src/modals/Transfer/transfer.js index 0c96a1168..57dc569f2 100644 --- a/js/src/modals/Transfer/transfer.js +++ b/js/src/modals/Transfer/transfer.js @@ -155,8 +155,8 @@ class Transfer extends Component { renderDetailsPage () { const { account, balance, images, senders } = this.props; - const { valueAll, extras, recipient, recipientError, sender, senderError } = this.store; - const { tag, total, totalError, value, valueError } = this.store; + const { recipient, recipientError, sender, senderError, sendersBalances } = this.store; + const { valueAll, extras, tag, total, totalError, value, valueError } = this.store; return ( <Details @@ -170,6 +170,7 @@ class Transfer extends Component { recipientError={ recipientError } sender={ sender } senderError={ senderError } + sendersBalances={ sendersBalances } tag={ tag } total={ total } totalError={ totalError } diff --git a/js/src/redux/providers/balancesReducer.js b/js/src/redux/providers/balancesReducer.js index 01923a4f4..e21ae676d 100644 --- a/js/src/redux/providers/balancesReducer.js +++ b/js/src/redux/providers/balancesReducer.js @@ -44,7 +44,7 @@ export default handleActions({ const { token, value } = t; const { tag } = token; - const tokenIndex = nextTokens.findIndex((tok) => tok.token.tag === tag); + const tokenIndex = nextTokens.findIndex((tok) => tok.token && tok.token.tag === tag); if (tokenIndex === -1) { nextTokens.push({ diff --git a/js/src/ui/Form/AddressSelect/addressSelect.css b/js/src/ui/Form/AddressSelect/addressSelect.css index 30671db73..01bc8901d 100644 --- a/js/src/ui/Form/AddressSelect/addressSelect.css +++ b/js/src/ui/Form/AddressSelect/addressSelect.css @@ -15,7 +15,9 @@ /* along with Parity. If not, see <http://www.gnu.org/licenses/>. */ .account { - padding: 4px 0 0 0; + padding: 0.25em 0; + display: flex; + align-items: center; } .name { @@ -27,6 +29,11 @@ padding: 0 0 0 1em; } +.balance { + color: #aaa; + padding-left: 1em; +} + .image { display: inline-block; height: 32px; diff --git a/js/src/ui/Form/AddressSelect/addressSelect.js b/js/src/ui/Form/AddressSelect/addressSelect.js index d0f331c34..2fbcc80bf 100644 --- a/js/src/ui/Form/AddressSelect/addressSelect.js +++ b/js/src/ui/Form/AddressSelect/addressSelect.js @@ -21,6 +21,8 @@ import AutoComplete from '../AutoComplete'; import IdentityIcon from '../../IdentityIcon'; import IdentityName from '../../IdentityName'; +import { fromWei } from '~/api/util/wei'; + import styles from './addressSelect.css'; export default class AddressSelect extends Component { @@ -40,7 +42,8 @@ export default class AddressSelect extends Component { value: PropTypes.string, tokens: PropTypes.object, onChange: PropTypes.func.isRequired, - allowInput: PropTypes.bool + allowInput: PropTypes.bool, + balances: PropTypes.object } state = { @@ -129,7 +132,34 @@ export default class AddressSelect extends Component { }; } + renderBalance (address) { + const { balances = {} } = this.props; + const balance = balances[address]; + + if (!balance) { + return null; + } + + const ethToken = balance.tokens.find((t) => t.token.tag.toLowerCase() === 'eth'); + + if (!ethToken) { + return null; + } + + const value = fromWei(ethToken.value); + + return ( + <div className={ styles.balance }> + { value.toFormat(3) }<small> { 'ETH' }</small> + </div> + ); + } + renderMenuItem (address) { + const balance = this.props.balances + ? this.renderBalance(address) + : null; + const item = ( <div className={ styles.account }> <IdentityIcon @@ -139,6 +169,8 @@ export default class AddressSelect extends Component { <IdentityName className={ styles.name } address={ address } /> + + { balance } </div> ); @@ -155,11 +187,10 @@ export default class AddressSelect extends Component { getSearchText () { const entry = this.getEntry(); - const { value } = this.state; return entry && entry.name ? entry.name.toUpperCase() - : value; + : this.state.value; } getEntry () { From aaf6da4c0003aeee8778b7954a4f48f055603351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Sat, 10 Dec 2016 16:51:50 +0100 Subject: [PATCH 079/131] Returning persistent node id --- ethcore/light/src/net/context.rs | 29 +++++++--- ethcore/light/src/net/tests/mod.rs | 86 ++++++++++++++++-------------- sync/src/api.rs | 3 +- util/network/src/lib.rs | 2 +- 4 files changed, 70 insertions(+), 50 deletions(-) diff --git a/ethcore/light/src/net/context.rs b/ethcore/light/src/net/context.rs index c05e69b0f..af1f4c677 100644 --- a/ethcore/light/src/net/context.rs +++ b/ethcore/light/src/net/context.rs @@ -16,13 +16,13 @@ //! I/O and event context generalizations. -use network::{NetworkContext, PeerId}; +use network::{NetworkContext, PeerId, NodeId}; use super::{Announcement, LightProtocol, ReqId}; use super::error::Error; use request::Request; -/// An I/O context which allows sending and receiving packets as well as +/// An I/O context which allows sending and receiving packets as well as /// disconnecting peers. This is used as a generalization of the portions /// of a p2p network which the light protocol structure makes use of. pub trait IoContext { @@ -41,6 +41,9 @@ pub trait IoContext { /// Get a peer's protocol version. fn protocol_version(&self, peer: PeerId) -> Option<u8>; + + /// Persistent peer id + fn persistent_peer_id(&self, peer: PeerId) -> Option<NodeId>; } impl<'a> IoContext for NetworkContext<'a> { @@ -67,6 +70,10 @@ impl<'a> IoContext for NetworkContext<'a> { fn protocol_version(&self, peer: PeerId) -> Option<u8> { self.protocol_version(self.subprotocol_name(), peer) } + + fn persistent_peer_id(&self, peer: PeerId) -> Option<NodeId> { + self.session_info(peer).and_then(|info| info.id) + } } /// Context for a protocol event. @@ -75,6 +82,9 @@ pub trait EventContext { /// disconnected/connected peer. fn peer(&self) -> PeerId; + /// Returns the relevant's peer persistent Id (aka NodeId). + fn persistent_peer_id(&self) -> Option<NodeId>; + /// Make a request from a peer. fn request_from(&self, peer: PeerId, request: Request) -> Result<ReqId, Error>; @@ -89,7 +99,7 @@ pub trait EventContext { fn disable_peer(&self, peer: PeerId); } -/// Concrete implementation of `EventContext` over the light protocol struct and +/// Concrete implementation of `EventContext` over the light protocol struct and /// an io context. pub struct Ctx<'a> { /// Io context to enable immediate response to events. @@ -97,11 +107,18 @@ pub struct Ctx<'a> { /// Protocol implementation. pub proto: &'a LightProtocol, /// Relevant peer for event. - pub peer: PeerId, + pub peer: PeerId, } impl<'a> EventContext for Ctx<'a> { - fn peer(&self) -> PeerId { self.peer } + + fn peer(&self) -> PeerId { + self.peer + } + + fn persistent_peer_id(&self) -> Option<NodeId> { + self.io.persistent_peer_id(self.peer) + } fn request_from(&self, peer: PeerId, request: Request) -> Result<ReqId, Error> { self.proto.request_from(self.io, &peer, request) } @@ -117,4 +134,4 @@ impl<'a> EventContext for Ctx<'a> { fn disable_peer(&self, peer: PeerId) { self.io.disable_peer(peer); } -} \ No newline at end of file +} diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 876432ce2..e2a17a41e 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -15,13 +15,13 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. //! Tests for the `LightProtocol` implementation. -//! These don't test of the higher level logic on top of +//! These don't test of the higher level logic on top of use ethcore::blockchain_info::BlockChainInfo; use ethcore::client::{BlockChainClient, EachBlockWith, TestBlockChainClient}; use ethcore::ids::BlockId; use ethcore::transaction::SignedTransaction; -use network::PeerId; +use network::{PeerId, NodeId}; use net::buffer_flow::FlowParams; use net::context::IoContext; @@ -68,6 +68,10 @@ impl IoContext for Expect { fn protocol_version(&self, _peer: PeerId) -> Option<u8> { Some(super::MAX_PROTOCOL_VERSION) } + + fn persistent_peer_id(&self, _peer: PeerId) -> Option<NodeId> { + None + } } // can't implement directly for Arc due to cross-crate orphan rules. @@ -106,7 +110,7 @@ impl Provider for TestProvider { .map(|x: u64| x.saturating_mul(req.skip + 1)) .take_while(|x| if req.reverse { x < &start_num } else { best_num - start_num >= *x }) .map(|x| if req.reverse { start_num - x } else { start_num + x }) - .map(|x| self.0.client.block_header(BlockId::Number(x))) + .map(|x| self.0.client.block_header(BlockId::Number(x))) .take_while(|x| x.is_some()) .flat_map(|x| x) .collect() @@ -139,12 +143,12 @@ impl Provider for TestProvider { } } }) - .collect() + .collect() } fn contract_code(&self, req: request::ContractCodes) -> Vec<Bytes> { req.code_requests.into_iter() - .map(|req| { + .map(|req| { req.account_key.iter().chain(req.account_key.iter()).cloned().collect() }) .collect() @@ -202,9 +206,9 @@ fn status(chain_info: BlockChainInfo) -> Status { #[test] fn handshake_expected() { let flow_params = make_flow_params(); - let capabilities = capabilities(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let status = status(provider.client.chain_info()); @@ -217,9 +221,9 @@ fn handshake_expected() { #[should_panic] fn genesis_mismatch() { let flow_params = make_flow_params(); - let capabilities = capabilities(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let mut status = status(provider.client.chain_info()); status.genesis_hash = H256::default(); @@ -232,15 +236,15 @@ fn genesis_mismatch() { #[test] fn buffer_overflow() { let flow_params = make_flow_params(); - let capabilities = capabilities(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&status, &capabilities, Some(&flow_params)); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + let packet_body = write_handshake(&status, &capabilities, Some(&flow_params)); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); } { @@ -266,9 +270,9 @@ fn buffer_overflow() { #[test] fn get_block_headers() { let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); - let capabilities = capabilities(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let cur_status = status(provider.client.chain_info()); let my_status = write_handshake(&cur_status, &capabilities, Some(&flow_params)); @@ -278,8 +282,8 @@ fn get_block_headers() { let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); } @@ -300,7 +304,7 @@ fn get_block_headers() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Headers, 10); let mut response_stream = RlpStream::new_list(12); - + response_stream.append(&req_id).append(&new_buf); for header in headers { response_stream.append_raw(&header, 1); @@ -316,9 +320,9 @@ fn get_block_headers() { #[test] fn get_block_bodies() { let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); - let capabilities = capabilities(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let cur_status = status(provider.client.chain_info()); let my_status = write_handshake(&cur_status, &capabilities, Some(&flow_params)); @@ -328,8 +332,8 @@ fn get_block_bodies() { let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); } @@ -347,7 +351,7 @@ fn get_block_bodies() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Bodies, 10); let mut response_stream = RlpStream::new_list(12); - + response_stream.append(&req_id).append(&new_buf); for body in bodies { response_stream.append_raw(&body, 1); @@ -363,9 +367,9 @@ fn get_block_bodies() { #[test] fn get_block_receipts() { let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); - let capabilities = capabilities(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let cur_status = status(provider.client.chain_info()); let my_status = write_handshake(&cur_status, &capabilities, Some(&flow_params)); @@ -375,8 +379,8 @@ fn get_block_receipts() { let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body)); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &my_status); } @@ -400,7 +404,7 @@ fn get_block_receipts() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Receipts, receipts.len()); let mut response_stream = RlpStream::new_list(2 + receipts.len()); - + response_stream.append(&req_id).append(&new_buf); for block_receipts in receipts { response_stream.append_raw(&block_receipts, 1); @@ -416,15 +420,15 @@ fn get_block_receipts() { #[test] fn get_state_proofs() { let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); - let capabilities = capabilities(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body.clone())); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body.clone())); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &packet_body); } @@ -432,7 +436,7 @@ fn get_state_proofs() { let key1 = U256::from(11223344).into(); let key2 = U256::from(99988887).into(); - let request = Request::StateProofs (request::StateProofs { + let request = Request::StateProofs (request::StateProofs { requests: vec![ request::StateProof { block: H256::default(), key1: key1, key2: None, from_level: 0 }, request::StateProof { block: H256::default(), key1: key1, key2: Some(key2), from_level: 0}, @@ -449,7 +453,7 @@ fn get_state_proofs() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::StateProofs, 2); let mut response_stream = RlpStream::new_list(4); - + response_stream.append(&req_id).append(&new_buf); for proof in proofs { response_stream.append_raw(&proof, 1); @@ -465,15 +469,15 @@ fn get_state_proofs() { #[test] fn get_contract_code() { let flow_params = FlowParams::new(5_000_000.into(), Default::default(), 0.into()); - let capabilities = capabilities(); + let capabilities = capabilities(); - let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); + let (provider, proto) = setup(flow_params.clone(), capabilities.clone()); let cur_status = status(provider.client.chain_info()); { - let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); - proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body.clone())); + let packet_body = write_handshake(&cur_status, &capabilities, Some(&flow_params)); + proto.on_connect(&1, &Expect::Send(1, packet::STATUS, packet_body.clone())); proto.handle_packet(&Expect::Nothing, &1, packet::STATUS, &packet_body); } @@ -481,7 +485,7 @@ fn get_contract_code() { let key1 = U256::from(11223344).into(); let key2 = U256::from(99988887).into(); - let request = Request::Codes (request::ContractCodes { + let request = Request::Codes (request::ContractCodes { code_requests: vec![ request::ContractCode { block_hash: H256::default(), account_key: key1 }, request::ContractCode { block_hash: H256::default(), account_key: key2 }, @@ -498,7 +502,7 @@ fn get_contract_code() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Codes, 2); let mut response_stream = RlpStream::new_list(4); - + response_stream.append(&req_id).append(&new_buf); for code in codes { response_stream.append(&code); @@ -509,4 +513,4 @@ fn get_contract_code() { let expected = Expect::Respond(packet::CONTRACT_CODES, response); proto.handle_packet(&expected, &1, packet::GET_CONTRACT_CODES, &request_body); -} \ No newline at end of file +} diff --git a/sync/src/api.rs b/sync/src/api.rs index 10434ce26..0f3695fe9 100644 --- a/sync/src/api.rs +++ b/sync/src/api.rs @@ -351,8 +351,7 @@ struct TxRelay(Arc<BlockChainClient>); impl LightHandler for TxRelay { fn on_transactions(&self, ctx: &EventContext, relay: &[::ethcore::transaction::SignedTransaction]) { trace!(target: "les", "Relaying {} transactions from peer {}", relay.len(), ctx.peer()); - // TODO [ToDr] Can we get a peer enode somehow? - self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).to_vec()).collect(), None) + self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).to_vec()).collect(), ctx.persistent_peer_id()) } } diff --git a/util/network/src/lib.rs b/util/network/src/lib.rs index f21cb498d..a1eef68fa 100644 --- a/util/network/src/lib.rs +++ b/util/network/src/lib.rs @@ -99,7 +99,7 @@ pub use stats::NetworkStats; pub use session::SessionInfo; use io::TimerToken; -pub use node_table::is_valid_node_url; +pub use node_table::{is_valid_node_url, NodeId}; const PROTOCOL_VERSION: u32 = 4; From 84116130f6b93ad6cfaa094818e28d459998174a Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 16:58:03 +0100 Subject: [PATCH 080/131] Add sender balances to contract (exec/deploy) --- .../DeployContract/DetailsStep/detailsStep.js | 3 +++ .../modals/DeployContract/deployContract.js | 22 +++++++++++++++++-- .../DetailsStep/detailsStep.js | 15 ++++++++----- .../modals/ExecuteContract/executeContract.js | 14 +++++++++--- 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/js/src/modals/DeployContract/DetailsStep/detailsStep.js b/js/src/modals/DeployContract/DetailsStep/detailsStep.js index aa0a30e55..9db223793 100644 --- a/js/src/modals/DeployContract/DetailsStep/detailsStep.js +++ b/js/src/modals/DeployContract/DetailsStep/detailsStep.js @@ -37,6 +37,7 @@ export default class DetailsStep extends Component { onParamsChange: PropTypes.func.isRequired, onInputsChange: PropTypes.func.isRequired, + balances: PropTypes.object, fromAddress: PropTypes.string, fromAddressError: PropTypes.string, name: PropTypes.string, @@ -77,6 +78,7 @@ export default class DetailsStep extends Component { render () { const { accounts, + balances, readOnly, fromAddress, fromAddressError, @@ -97,6 +99,7 @@ export default class DetailsStep extends Component { value={ fromAddress } error={ fromAddressError } accounts={ accounts } + balances={ balances } onChange={ this.onFromAddressChange } /> <Input diff --git a/js/src/modals/DeployContract/deployContract.js b/js/src/modals/DeployContract/deployContract.js index 5bf4fc389..21325f786 100644 --- a/js/src/modals/DeployContract/deployContract.js +++ b/js/src/modals/DeployContract/deployContract.js @@ -15,8 +15,10 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; +import { connect } from 'react-redux'; import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import ContentClear from 'material-ui/svg-icons/content/clear'; +import { pick } from 'lodash'; import { BusyStep, CompletedStep, CopyToClipboard, Button, IdentityIcon, Modal, TxHash } from '~/ui'; import { ERRORS, validateAbi, validateCode, validateName } from '~/util/validation'; @@ -36,7 +38,7 @@ const STEPS = { COMPLETED: { title: 'completed' } }; -export default class DeployContract extends Component { +class DeployContract extends Component { static contextTypes = { api: PropTypes.object.isRequired, store: PropTypes.object.isRequired @@ -45,6 +47,7 @@ export default class DeployContract extends Component { static propTypes = { accounts: PropTypes.object.isRequired, onClose: PropTypes.func.isRequired, + balances: PropTypes.object, abi: PropTypes.string, code: PropTypes.string, readOnly: PropTypes.bool, @@ -192,7 +195,7 @@ export default class DeployContract extends Component { } renderStep () { - const { accounts, readOnly } = this.props; + const { accounts, readOnly, balances } = this.props; const { address, deployError, step, deployState, txhash, rejected } = this.state; if (deployError) { @@ -216,6 +219,7 @@ export default class DeployContract extends Component { <DetailsStep { ...this.state } accounts={ accounts } + balances={ balances } readOnly={ readOnly } onFromAddressChange={ this.onFromAddressChange } onDescriptionChange={ this.onDescriptionChange } @@ -394,3 +398,17 @@ export default class DeployContract extends Component { this.props.onClose(); } } + +function mapStateToProps (initState, initProps) { + const fromAddresses = Object.keys(initProps.accounts); + + return (state) => { + const balances = pick(state.balances.balances, fromAddresses); + return { balances }; + }; +} + +export default connect( + mapStateToProps +)(DeployContract); + diff --git a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js index 3ffb929a9..7bbe7be84 100644 --- a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js +++ b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js @@ -35,22 +35,24 @@ export default class DetailsStep extends Component { amount: PropTypes.string, amountError: PropTypes.string, onAmountChange: PropTypes.func.isRequired, + onFromAddressChange: PropTypes.func.isRequired, + onValueChange: PropTypes.func.isRequired, + values: PropTypes.array.isRequired, + valuesError: PropTypes.array.isRequired, + + balances: PropTypes.object, fromAddress: PropTypes.string, fromAddressError: PropTypes.string, gasEdit: PropTypes.bool, - onFromAddressChange: PropTypes.func.isRequired, func: PropTypes.object, funcError: PropTypes.string, onFuncChange: PropTypes.func, onGasEditClick: PropTypes.func, - values: PropTypes.array.isRequired, - valuesError: PropTypes.array.isRequired, - warning: PropTypes.string, - onValueChange: PropTypes.func.isRequired + warning: PropTypes.string } render () { - const { accounts, amount, amountError, fromAddress, fromAddressError, gasEdit, onGasEditClick, onFromAddressChange, onAmountChange } = this.props; + const { accounts, amount, amountError, balances, fromAddress, fromAddressError, gasEdit, onGasEditClick, onFromAddressChange, onAmountChange } = this.props; return ( <Form> @@ -61,6 +63,7 @@ export default class DetailsStep extends Component { value={ fromAddress } error={ fromAddressError } accounts={ accounts } + balances={ balances } onChange={ onFromAddressChange } /> { this.renderFunctionSelect() } { this.renderParameters() } diff --git a/js/src/modals/ExecuteContract/executeContract.js b/js/src/modals/ExecuteContract/executeContract.js index 7b4e8ccd2..c3ac96490 100644 --- a/js/src/modals/ExecuteContract/executeContract.js +++ b/js/src/modals/ExecuteContract/executeContract.js @@ -18,6 +18,8 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { observer } from 'mobx-react'; +import { pick } from 'lodash'; + import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import ContentClear from 'material-ui/svg-icons/content/clear'; import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; @@ -57,6 +59,7 @@ class ExecuteContract extends Component { isTest: PropTypes.bool, fromAddress: PropTypes.string, accounts: PropTypes.object, + balances: PropTypes.object, contract: PropTypes.object, gasLimit: PropTypes.object.isRequired, onClose: PropTypes.func.isRequired, @@ -362,10 +365,15 @@ class ExecuteContract extends Component { } } -function mapStateToProps (state) { - const { gasLimit } = state.nodeStatus; +function mapStateToProps (initState, initProps) { + const fromAddresses = Object.keys(initProps.accounts); - return { gasLimit }; + return (state) => { + const balances = pick(state.balances.balances, fromAddresses); + const { gasLimit } = state.nodeStatus; + + return { gasLimit, balances }; + }; } function mapDispatchToProps (dispatch) { From cd6ab072170bfe30ac04a79008c9024d784141e6 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 17:06:44 +0100 Subject: [PATCH 081/131] Use the new `onClose` autocomplete prop --- js/src/ui/Form/AutoComplete/autocomplete.js | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/js/src/ui/Form/AutoComplete/autocomplete.js b/js/src/ui/Form/AutoComplete/autocomplete.js index c7a5dd141..f5ad43201 100644 --- a/js/src/ui/Form/AutoComplete/autocomplete.js +++ b/js/src/ui/Form/AutoComplete/autocomplete.js @@ -44,7 +44,6 @@ export default class AutoComplete extends Component { lastChangedValue: undefined, entry: null, open: false, - fakeBlur: false, dataSource: [] } @@ -78,7 +77,7 @@ export default class AutoComplete extends Component { onUpdateInput={ onUpdateInput } searchText={ value } onFocus={ this.onFocus } - onBlur={ this.onBlur } + onClose={ this.onClose } animation={ PopoverAnimationVertical } filter={ filter } popoverProps={ { open } } @@ -121,7 +120,6 @@ export default class AutoComplete extends Component { case 'down': const { menu } = muiAutocomplete.refs; menu && menu.handleKeyDown(event); - this.setState({ fakeBlur: true }); break; case 'enter': @@ -155,22 +153,12 @@ export default class AutoComplete extends Component { this.setState({ entry, open: false }); } - onBlur = (event) => { + onClose = (event) => { const { onUpdateInput } = this.props; - // TODO: Handle blur gracefully where we use onUpdateInput (currently replaces - // input where text is allowed with the last selected value from the dropdown) if (!onUpdateInput) { - window.setTimeout(() => { - const { entry, fakeBlur } = this.state; - - if (fakeBlur) { - this.setState({ fakeBlur: false }); - return; - } - - this.handleOnChange(entry); - }, 200); + const { entry } = this.state; + this.handleOnChange(entry); } } From 2346f29731da1816eab4115c8e130c6ad4745aa3 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 18:35:54 +0100 Subject: [PATCH 082/131] Add dividers to AutoComplete --- js/src/ui/Form/AddressSelect/addressSelect.js | 32 +++++-- js/src/ui/Form/AutoComplete/autocomplete.js | 94 +++++++++++++++---- 2 files changed, 103 insertions(+), 23 deletions(-) diff --git a/js/src/ui/Form/AddressSelect/addressSelect.js b/js/src/ui/Form/AddressSelect/addressSelect.js index 2fbcc80bf..4bd93caa9 100644 --- a/js/src/ui/Form/AddressSelect/addressSelect.js +++ b/js/src/ui/Form/AddressSelect/addressSelect.js @@ -47,23 +47,41 @@ export default class AddressSelect extends Component { } state = { + autocompleteEntries: [], entries: {}, addresses: [], value: '' } entriesFromProps (props = this.props) { - const { accounts, contacts, contracts, wallets } = props; - const entries = Object.assign({}, accounts || {}, wallets || {}, contacts || {}, contracts || {}); - return entries; + const { accounts = {}, contacts = {}, contracts = {}, wallets = {} } = props; + + const autocompleteEntries = [].concat( + Object.values(wallets), + 'divider', + Object.values(accounts), + 'divider', + Object.values(contacts), + 'divider', + Object.values(contracts) + ); + + const entries = { + ...wallets, + ...accounts, + ...contacts, + ...contracts + }; + + return { autocompleteEntries, entries }; } componentWillMount () { const { value } = this.props; - const entries = this.entriesFromProps(); + const { entries, autocompleteEntries } = this.entriesFromProps(); const addresses = Object.keys(entries).sort(); - this.setState({ entries, addresses, value }); + this.setState({ autocompleteEntries, entries, addresses, value }); } componentWillReceiveProps (newProps) { @@ -74,7 +92,7 @@ export default class AddressSelect extends Component { render () { const { allowInput, disabled, error, hint, label } = this.props; - const { entries, value } = this.state; + const { autocompleteEntries, value } = this.state; const searchText = this.getSearchText(); const icon = this.renderIdentityIcon(value); @@ -92,7 +110,7 @@ export default class AddressSelect extends Component { onUpdateInput={ allowInput && this.onUpdateInput } value={ searchText } filter={ this.handleFilter } - entries={ entries } + entries={ autocompleteEntries } entry={ this.getEntry() || {} } renderItem={ this.renderItem } /> diff --git a/js/src/ui/Form/AutoComplete/autocomplete.js b/js/src/ui/Form/AutoComplete/autocomplete.js index f5ad43201..0e2acc98b 100644 --- a/js/src/ui/Form/AutoComplete/autocomplete.js +++ b/js/src/ui/Form/AutoComplete/autocomplete.js @@ -17,9 +17,10 @@ import React, { Component, PropTypes } from 'react'; import keycode from 'keycode'; import { MenuItem, AutoComplete as MUIAutoComplete } from 'material-ui'; +import Divider from 'material-ui/Divider'; import { PopoverAnimationVertical } from 'material-ui/Popover'; -import { isEqual } from 'lodash'; +import { isEqual, range } from 'lodash'; export default class AutoComplete extends Component { static propTypes = { @@ -38,14 +39,17 @@ export default class AutoComplete extends Component { PropTypes.array, PropTypes.object ]) - } + }; state = { lastChangedValue: undefined, entry: null, open: false, - dataSource: [] - } + dataSource: [], + dividerBreaks: [] + }; + + dividersVisibility = {}; componentWillMount () { const dataSource = this.getDataSource(); @@ -63,7 +67,7 @@ export default class AutoComplete extends Component { } render () { - const { disabled, error, hint, label, value, className, filter, onUpdateInput } = this.props; + const { disabled, error, hint, label, value, className, onUpdateInput } = this.props; const { open, dataSource } = this.state; return ( @@ -79,7 +83,7 @@ export default class AutoComplete extends Component { onFocus={ this.onFocus } onClose={ this.onClose } animation={ PopoverAnimationVertical } - filter={ filter } + filter={ this.handleFilter } popoverProps={ { open } } openOnFocus menuCloseDelay={ 0 } @@ -99,18 +103,76 @@ export default class AutoComplete extends Component { ? entries : Object.values(entries); - if (renderItem && typeof renderItem === 'function') { - return entriesArray.map(entry => renderItem(entry)); + let currentDivider = 0; + let firstSet = false; + + const dataSource = entriesArray.map((entry, index) => { + // Render divider + if (typeof entry === 'string' && entry.toLowerCase() === 'divider') { + // Don't add divider if nothing before + if (!firstSet) { + return undefined; + } + + const item = { + text: '', + divider: currentDivider, + isDivider: true, + value: ( + <Divider /> + ) + }; + + currentDivider++; + return item; + } + + let item; + + if (renderItem && typeof renderItem === 'function') { + item = renderItem(entry); + } else { + item = { + text: entry, + value: ( + <MenuItem + primaryText={ entry } + /> + ) + }; + } + + if (!firstSet) { + item.first = true; + firstSet = true; + } + + item.divider = currentDivider; + + return item; + }).filter((item) => item !== undefined); + + return dataSource; + } + + handleFilter = (searchText, name, item) => { + if (item.isDivider) { + return this.dividersVisibility[item.divider]; } - return entriesArray.map(entry => ({ - text: entry, - value: ( - <MenuItem - primaryText={ entry } - /> - ) - })); + if (item.first) { + this.dividersVisibility = {}; + } + + const { filter } = this.props; + const show = filter(searchText, name, item); + + // Show the related divider + if (show) { + this.dividersVisibility[item.divider] = true; + } + + return show; } onKeyDown = (event) => { From 69c0086ada5b55a0924662b301e0b1fefbb93f4b Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 19:14:29 +0100 Subject: [PATCH 083/131] Better Autocomplete Divider --- js/src/ui/Form/AutoComplete/autocomplete.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/js/src/ui/Form/AutoComplete/autocomplete.js b/js/src/ui/Form/AutoComplete/autocomplete.js index 0e2acc98b..f78ab41dc 100644 --- a/js/src/ui/Form/AutoComplete/autocomplete.js +++ b/js/src/ui/Form/AutoComplete/autocomplete.js @@ -16,11 +16,23 @@ import React, { Component, PropTypes } from 'react'; import keycode from 'keycode'; -import { MenuItem, AutoComplete as MUIAutoComplete } from 'material-ui'; -import Divider from 'material-ui/Divider'; +import { MenuItem, AutoComplete as MUIAutoComplete, Divider as MUIDivider } from 'material-ui'; import { PopoverAnimationVertical } from 'material-ui/Popover'; -import { isEqual, range } from 'lodash'; +import { isEqual } from 'lodash'; + +// Hack to prevent "Unknown prop `disableFocusRipple` on <hr> tag" error +class Divider extends Component { + static muiName = MUIDivider.muiName; + + render () { + return ( + <div style={ { margin: '0.25em 0' } }> + <MUIDivider style={ { height: 2 } }/> + </div> + ); + } +} export default class AutoComplete extends Component { static propTypes = { From 0f6681d3e819aa1498d28be4c24313c369754f02 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 19:15:45 +0100 Subject: [PATCH 084/131] Linting issue --- js/src/ui/Form/AutoComplete/autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/ui/Form/AutoComplete/autocomplete.js b/js/src/ui/Form/AutoComplete/autocomplete.js index f78ab41dc..d11ae7cc5 100644 --- a/js/src/ui/Form/AutoComplete/autocomplete.js +++ b/js/src/ui/Form/AutoComplete/autocomplete.js @@ -28,7 +28,7 @@ class Divider extends Component { render () { return ( <div style={ { margin: '0.25em 0' } }> - <MUIDivider style={ { height: 2 } }/> + <MUIDivider style={ { height: 2 } } /> </div> ); } From 76a93d4eff8a69d4774c5a576c4df588608919df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Sat, 10 Dec 2016 20:01:04 +0100 Subject: [PATCH 085/131] eth_sign RPC now hashes given data --- rpc/src/v1/impls/signing.rs | 5 +++-- rpc/src/v1/impls/signing_unsafe.rs | 4 +++- rpc/src/v1/tests/mocked/eth.rs | 8 ++++---- rpc/src/v1/tests/mocked/signing.rs | 9 +++++---- rpc/src/v1/traits/eth_signing.rs | 6 +++--- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/rpc/src/v1/impls/signing.rs b/rpc/src/v1/impls/signing.rs index 262e04dfb..efb7ed782 100644 --- a/rpc/src/v1/impls/signing.rs +++ b/rpc/src/v1/impls/signing.rs @@ -18,7 +18,7 @@ use std::sync::{Arc, Weak}; use transient_hashmap::TransientHashMap; -use util::{U256, Mutex}; +use util::{U256, Mutex, Hashable}; use ethcore::account_provider::AccountProvider; use ethcore::miner::MinerService; @@ -180,7 +180,8 @@ impl<C: 'static, M: 'static> EthSigning for SigningQueueClient<C, M> where C: MiningBlockChainClient, M: MinerService, { - fn sign(&self, ready: Ready<RpcH520>, address: RpcH160, hash: RpcH256) { + fn sign(&self, ready: Ready<RpcH520>, address: RpcH160, data: RpcBytes) { + let hash = data.0.sha3().into(); let res = self.active().and_then(|_| self.dispatch(RpcConfirmationPayload::Signature((address, hash).into()))); self.handle_dispatch(res, |response| { match response { diff --git a/rpc/src/v1/impls/signing_unsafe.rs b/rpc/src/v1/impls/signing_unsafe.rs index 46ffe6ded..4796cc85d 100644 --- a/rpc/src/v1/impls/signing_unsafe.rs +++ b/rpc/src/v1/impls/signing_unsafe.rs @@ -17,6 +17,7 @@ //! Unsafe Signing RPC implementation. use std::sync::{Arc, Weak}; +use util::Hashable; use ethcore::account_provider::AccountProvider; use ethcore::miner::MinerService; @@ -83,7 +84,8 @@ impl<C: 'static, M: 'static> EthSigning for SigningUnsafeClient<C, M> where C: MiningBlockChainClient, M: MinerService, { - fn sign(&self, ready: Ready<RpcH520>, address: RpcH160, hash: RpcH256) { + fn sign(&self, ready: Ready<RpcH520>, address: RpcH160, data: RpcBytes) { + let hash = data.0.sha3().into(); let result = match self.handle(RpcConfirmationPayload::Signature((address, hash).into())) { Ok(RpcConfirmationResponse::Signature(signature)) => Ok(signature), Err(e) => Err(e), diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index 7a7a1f682..bc321be5c 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -18,11 +18,11 @@ use std::str::FromStr; use std::collections::HashMap; use std::sync::Arc; use std::time::{Instant, Duration}; -use rustc_serialize::hex::ToHex; +use rustc_serialize::hex::{FromHex, ToHex}; use time::get_time; use rlp; -use util::{Uint, U256, Address, H256, FixedHash, Mutex}; +use util::{Uint, U256, Address, H256, FixedHash, Mutex, Hashable}; use ethcore::account_provider::AccountProvider; use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionId}; use ethcore::log_entry::{LocalizedLogEntry, LogEntry}; @@ -294,8 +294,8 @@ fn rpc_eth_sign() { let account = tester.accounts_provider.new_account("abcd").unwrap(); tester.accounts_provider.unlock_account_permanently(account, "abcd".into()).unwrap(); - let message = H256::from("0x0cc175b9c0f1b6a831c399e26977266192eb5ffee6ae2fec3ad71c777531578f"); - let signed = tester.accounts_provider.sign(account, None, message).unwrap(); + let message = "0cc175b9c0f1b6a831c399e26977266192eb5ffee6ae2fec3ad71c777531578f".from_hex().unwrap(); + let signed = tester.accounts_provider.sign(account, None, message.sha3()).unwrap(); let req = r#"{ "jsonrpc": "2.0", diff --git a/rpc/src/v1/tests/mocked/signing.rs b/rpc/src/v1/tests/mocked/signing.rs index 31a700443..27a751701 100644 --- a/rpc/src/v1/tests/mocked/signing.rs +++ b/rpc/src/v1/tests/mocked/signing.rs @@ -26,7 +26,7 @@ use v1::types::ConfirmationResponse; use v1::tests::helpers::TestMinerService; use v1::tests::mocked::parity; -use util::{Address, FixedHash, Uint, U256, H256, ToPretty}; +use util::{Address, FixedHash, Uint, U256, ToPretty, Hashable}; use ethcore::account_provider::AccountProvider; use ethcore::client::TestBlockChainClient; use ethcore::transaction::{Transaction, Action}; @@ -186,11 +186,11 @@ fn should_check_status_of_request_when_its_resolved() { fn should_sign_if_account_is_unlocked() { // given let tester = eth_signing(); - let hash: H256 = 5.into(); + let data = vec![5u8]; let acc = tester.accounts.new_account("test").unwrap(); tester.accounts.unlock_account_permanently(acc, "test".into()).unwrap(); - let signature = tester.accounts.sign(acc, None, hash).unwrap(); + let signature = tester.accounts.sign(acc, None, data.sha3()).unwrap(); // when let request = r#"{ @@ -198,10 +198,11 @@ fn should_sign_if_account_is_unlocked() { "method": "eth_sign", "params": [ ""#.to_owned() + format!("0x{:?}", acc).as_ref() + r#"", - ""# + format!("0x{:?}", hash).as_ref() + r#"" + ""# + format!("0x{}", data.to_hex()).as_ref() + r#"" ], "id": 1 }"#; +println!("{:?}", request); let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{}", signature).as_ref() + r#"","id":1}"#; assert_eq!(tester.io.handle_request_sync(&request), Some(response.to_owned())); assert_eq!(tester.signer.requests().len(), 0); diff --git a/rpc/src/v1/traits/eth_signing.rs b/rpc/src/v1/traits/eth_signing.rs index 09f8c5e03..1248b4768 100644 --- a/rpc/src/v1/traits/eth_signing.rs +++ b/rpc/src/v1/traits/eth_signing.rs @@ -17,14 +17,14 @@ //! Eth rpc interface. use v1::helpers::auto_args::{WrapAsync, Ready}; -use v1::types::{H160, H256, H520, TransactionRequest, RichRawTransaction}; +use v1::types::{Bytes, H160, H256, H520, TransactionRequest, RichRawTransaction}; build_rpc_trait! { /// Signing methods implementation relying on unlocked accounts. pub trait EthSigning { - /// Signs the data with given address signature. + /// Signs the hash of data with given address signature. #[rpc(async, name = "eth_sign")] - fn sign(&self, Ready<H520>, H160, H256); + fn sign(&self, Ready<H520>, H160, Bytes); /// Sends transaction; will block waiting for signer to return the /// transaction hash. From 9b5fd932905ce397de29a15ac788cd02ee7fc530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Sat, 10 Dec 2016 20:07:12 +0100 Subject: [PATCH 086/131] removing println [ci:skip] --- rpc/src/v1/tests/mocked/signing.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/rpc/src/v1/tests/mocked/signing.rs b/rpc/src/v1/tests/mocked/signing.rs index 27a751701..7d79ef59f 100644 --- a/rpc/src/v1/tests/mocked/signing.rs +++ b/rpc/src/v1/tests/mocked/signing.rs @@ -202,7 +202,6 @@ fn should_sign_if_account_is_unlocked() { ], "id": 1 }"#; -println!("{:?}", request); let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{}", signature).as_ref() + r#"","id":1}"#; assert_eq!(tester.io.handle_request_sync(&request), Some(response.to_owned())); assert_eq!(tester.signer.requests().len(), 0); From 08a47ea2d48c2de543658a50d74dab39caa10b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomusdrw@users.noreply.github.com> Date: Sat, 10 Dec 2016 20:18:42 +0100 Subject: [PATCH 087/131] Allow modifications of gas when confirming in signer (#3798) --- rpc/src/v1/impls/signer.rs | 10 ++++++---- rpc/src/v1/tests/mocked/signer.rs | 4 ++-- rpc/src/v1/types/confirmations.rs | 12 +++++++++++- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/rpc/src/v1/impls/signer.rs b/rpc/src/v1/impls/signer.rs index 66f46ba01..f13a3d037 100644 --- a/rpc/src/v1/impls/signer.rs +++ b/rpc/src/v1/impls/signer.rs @@ -89,11 +89,13 @@ impl<C: 'static, M: 'static> Signer for SignerClient<C, M> where C: MiningBlockC signer.peek(&id).map(|confirmation| { let mut payload = confirmation.payload.clone(); // Modify payload - match (&mut payload, modification.gas_price) { - (&mut ConfirmationPayload::SendTransaction(ref mut request), Some(gas_price)) => { + if let ConfirmationPayload::SendTransaction(ref mut request) = payload { + if let Some(gas_price) = modification.gas_price { request.gas_price = gas_price.into(); - }, - _ => {}, + } + if let Some(gas) = modification.gas { + request.gas = gas.into(); + } } // Execute let result = dispatch::execute(&*client, &*miner, &*accounts, payload, Some(pass)); diff --git a/rpc/src/v1/tests/mocked/signer.rs b/rpc/src/v1/tests/mocked/signer.rs index ea89e5876..c87abb7eb 100644 --- a/rpc/src/v1/tests/mocked/signer.rs +++ b/rpc/src/v1/tests/mocked/signer.rs @@ -183,7 +183,7 @@ fn should_confirm_transaction_and_dispatch() { let t = Transaction { nonce: U256::zero(), gas_price: U256::from(0x1000), - gas: U256::from(10_000_000), + gas: U256::from(0x50505), action: Action::Call(recipient), value: U256::from(0x1), data: vec![] @@ -198,7 +198,7 @@ fn should_confirm_transaction_and_dispatch() { let request = r#"{ "jsonrpc":"2.0", "method":"signer_confirmRequest", - "params":["0x1", {"gasPrice":"0x1000"}, "test"], + "params":["0x1", {"gasPrice":"0x1000","gas":"0x50505"}, "test"], "id":1 }"#; let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:?}", t.hash()).as_ref() + r#"","id":1}"#; diff --git a/rpc/src/v1/types/confirmations.rs b/rpc/src/v1/types/confirmations.rs index d8cfa14d6..f69018422 100644 --- a/rpc/src/v1/types/confirmations.rs +++ b/rpc/src/v1/types/confirmations.rs @@ -142,6 +142,8 @@ pub struct TransactionModification { /// Modified gas price #[serde(rename="gasPrice")] pub gas_price: Option<U256>, + /// Modified gas + pub gas: Option<U256>, } /// Represents two possible return values. @@ -275,18 +277,26 @@ mod tests { let s1 = r#"{ "gasPrice":"0xba43b7400" }"#; - let s2 = r#"{}"#; + let s2 = r#"{"gas": "0x1233"}"#; + let s3 = r#"{}"#; // when let res1: TransactionModification = serde_json::from_str(s1).unwrap(); let res2: TransactionModification = serde_json::from_str(s2).unwrap(); + let res3: TransactionModification = serde_json::from_str(s3).unwrap(); // then assert_eq!(res1, TransactionModification { gas_price: Some(U256::from_str("0ba43b7400").unwrap()), + gas: None, }); assert_eq!(res2, TransactionModification { gas_price: None, + gas: Some(U256::from_str("1233").unwrap()), + }); + assert_eq!(res3, TransactionModification { + gas_price: None, + gas: None, }); } } From 70eab0da0331c7867c619aa12a6f6a86831aea3f Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 20:29:22 +0100 Subject: [PATCH 088/131] PR grumbles --- .../DeployContract/DetailsStep/detailsStep.js | 22 +++++++++---------- .../DetailsStep/detailsStep.js | 6 ++--- js/src/ui/Form/AddressSelect/addressSelect.js | 3 +-- js/src/views/Addresses/addresses.js | 2 +- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/js/src/modals/DeployContract/DetailsStep/detailsStep.js b/js/src/modals/DeployContract/DetailsStep/detailsStep.js index 9db223793..3de7a8a44 100644 --- a/js/src/modals/DeployContract/DetailsStep/detailsStep.js +++ b/js/src/modals/DeployContract/DetailsStep/detailsStep.js @@ -28,27 +28,25 @@ export default class DetailsStep extends Component { static propTypes = { accounts: PropTypes.object.isRequired, - - onFromAddressChange: PropTypes.func.isRequired, - onNameChange: PropTypes.func.isRequired, - onDescriptionChange: PropTypes.func.isRequired, onAbiChange: PropTypes.func.isRequired, onCodeChange: PropTypes.func.isRequired, - onParamsChange: PropTypes.func.isRequired, + onDescriptionChange: PropTypes.func.isRequired, + onFromAddressChange: PropTypes.func.isRequired, onInputsChange: PropTypes.func.isRequired, + onNameChange: PropTypes.func.isRequired, + onParamsChange: PropTypes.func.isRequired, + abi: PropTypes.string, + abiError: PropTypes.string, balances: PropTypes.object, + code: PropTypes.string, + codeError: PropTypes.string, + description: PropTypes.string, + descriptionError: PropTypes.string, fromAddress: PropTypes.string, fromAddressError: PropTypes.string, name: PropTypes.string, nameError: PropTypes.string, - description: PropTypes.string, - descriptionError: PropTypes.string, - abi: PropTypes.string, - abiError: PropTypes.string, - code: PropTypes.string, - codeError: PropTypes.string, - readOnly: PropTypes.bool }; diff --git a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js index 7bbe7be84..fde7fa1b2 100644 --- a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js +++ b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js @@ -32,20 +32,20 @@ export default class DetailsStep extends Component { static propTypes = { accounts: PropTypes.object.isRequired, contract: PropTypes.object.isRequired, - amount: PropTypes.string, - amountError: PropTypes.string, onAmountChange: PropTypes.func.isRequired, onFromAddressChange: PropTypes.func.isRequired, onValueChange: PropTypes.func.isRequired, values: PropTypes.array.isRequired, valuesError: PropTypes.array.isRequired, + amount: PropTypes.string, + amountError: PropTypes.string, balances: PropTypes.object, fromAddress: PropTypes.string, fromAddressError: PropTypes.string, - gasEdit: PropTypes.bool, func: PropTypes.object, funcError: PropTypes.string, + gasEdit: PropTypes.bool, onFuncChange: PropTypes.func, onGasEditClick: PropTypes.func, warning: PropTypes.string diff --git a/js/src/ui/Form/AddressSelect/addressSelect.js b/js/src/ui/Form/AddressSelect/addressSelect.js index 4bd93caa9..0cd92c5c8 100644 --- a/js/src/ui/Form/AddressSelect/addressSelect.js +++ b/js/src/ui/Form/AddressSelect/addressSelect.js @@ -158,7 +158,7 @@ export default class AddressSelect extends Component { return null; } - const ethToken = balance.tokens.find((t) => t.token.tag.toLowerCase() === 'eth'); + const ethToken = balance.tokens.find((tok) => tok.token && tok.token.tag && tok.token.tag.toLowerCase() === 'eth'); if (!ethToken) { return null; @@ -187,7 +187,6 @@ export default class AddressSelect extends Component { <IdentityName className={ styles.name } address={ address } /> - { balance } </div> ); diff --git a/js/src/views/Addresses/addresses.js b/js/src/views/Addresses/addresses.js index fd26d94e5..609f029c7 100644 --- a/js/src/views/Addresses/addresses.js +++ b/js/src/views/Addresses/addresses.js @@ -89,7 +89,7 @@ class Addresses extends Component { if (hasContacts && Object.keys(balances).length === 0) { return ( - <Loading size={ 3 } /> + <Loading /> ); } From 19ca9ad460cbf1fa3fced7197420935473580b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Sat, 10 Dec 2016 21:22:19 +0100 Subject: [PATCH 089/131] Prevent broadcasting transactions to peer that send them. --- ethcore/src/client/chain_notify.rs | 7 ++-- ethcore/src/client/client.rs | 9 ++--- ethcore/src/client/test_client.rs | 2 +- ethcore/src/client/traits.rs | 4 +- ethcore/src/service.rs | 6 +-- .../dapps/localtx/Transaction/transaction.js | 25 +----------- rpc/src/v1/tests/helpers/sync_provider.rs | 6 --- rpc/src/v1/tests/mocked/parity.rs | 2 +- rpc/src/v1/types/sync.rs | 12 +----- sync/src/api.rs | 8 ++-- sync/src/chain.rs | 11 +++-- sync/src/transactions_stats.rs | 40 ------------------- 12 files changed, 25 insertions(+), 107 deletions(-) diff --git a/ethcore/src/client/chain_notify.rs b/ethcore/src/client/chain_notify.rs index 50ff20e38..ddab542fb 100644 --- a/ethcore/src/client/chain_notify.rs +++ b/ethcore/src/client/chain_notify.rs @@ -41,11 +41,10 @@ pub trait ChainNotify : Send + Sync { // does nothing by default } - /// fires when new transactions are imported - fn transactions_imported(&self, + /// fires when new transactions are received from a peer + fn transactions_received(&self, _hashes: Vec<H256>, - _peer_id: Option<H512>, - _block_num: u64, + _peer_id: usize, ) { // does nothing by default } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 1387dad9a..c258ed1eb 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -559,15 +559,14 @@ impl Client { } /// Import transactions from the IO queue - pub fn import_queued_transactions(&self, transactions: &[Bytes], peer_id: Option<H512>) -> usize { + pub fn import_queued_transactions(&self, transactions: &[Bytes], peer_id: usize) -> usize { trace!(target: "external_tx", "Importing queued"); let _timer = PerfTimer::new("import_queued_transactions"); self.queue_transactions.fetch_sub(transactions.len(), AtomicOrdering::SeqCst); let txs: Vec<SignedTransaction> = transactions.iter().filter_map(|bytes| UntrustedRlp::new(bytes).as_val().ok()).collect(); let hashes: Vec<_> = txs.iter().map(|tx| tx.hash()).collect(); - let block_number = self.chain_info().best_block_number; self.notify(|notify| { - notify.transactions_imported(hashes.clone(), peer_id.clone(), block_number); + notify.transactions_received(hashes.clone(), peer_id); }); let results = self.miner.import_external_transactions(self, txs); results.len() @@ -1269,14 +1268,14 @@ impl BlockChainClient for Client { (*self.build_last_hashes(self.chain.read().best_block_hash())).clone() } - fn queue_transactions(&self, transactions: Vec<Bytes>, node_id: Option<H512>) { + fn queue_transactions(&self, transactions: Vec<Bytes>, peer_id: usize) { let queue_size = self.queue_transactions.load(AtomicOrdering::Relaxed); trace!(target: "external_tx", "Queue size: {}", queue_size); if queue_size > MAX_TX_QUEUE_SIZE { debug!("Ignoring {} transactions: queue is full", transactions.len()); } else { let len = transactions.len(); - match self.io_channel.lock().send(ClientIoMessage::NewTransactions(transactions, node_id)) { + match self.io_channel.lock().send(ClientIoMessage::NewTransactions(transactions, peer_id)) { Ok(_) => { self.queue_transactions.fetch_add(len, AtomicOrdering::SeqCst); } diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index a2af13794..7f27c9151 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -657,7 +657,7 @@ impl BlockChainClient for TestBlockChainClient { unimplemented!(); } - fn queue_transactions(&self, transactions: Vec<Bytes>, _peer_id: Option<H512>) { + fn queue_transactions(&self, transactions: Vec<Bytes>, _peer_id: usize) { // import right here let txs = transactions.into_iter().filter_map(|bytes| UntrustedRlp::new(&bytes).as_val().ok()).collect(); self.miner.import_external_transactions(self, txs); diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index ccf07ea3f..fed864607 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. use std::collections::BTreeMap; -use util::{U256, Address, H256, H512, H2048, Bytes, Itertools}; +use util::{U256, Address, H256, H2048, Bytes, Itertools}; use util::stats::Histogram; use blockchain::TreeRoute; use verification::queue::QueueInfo as BlockQueueInfo; @@ -200,7 +200,7 @@ pub trait BlockChainClient : Sync + Send { fn last_hashes(&self) -> LastHashes; /// Queue transactions for importing. - fn queue_transactions(&self, transactions: Vec<Bytes>, peer_id: Option<H512>); + fn queue_transactions(&self, transactions: Vec<Bytes>, peer_id: usize); /// list all transactions fn pending_transactions(&self) -> Vec<SignedTransaction>; diff --git a/ethcore/src/service.rs b/ethcore/src/service.rs index b595843a8..9b96911e4 100644 --- a/ethcore/src/service.rs +++ b/ethcore/src/service.rs @@ -39,7 +39,7 @@ pub enum ClientIoMessage { /// A block is ready BlockVerified, /// New transaction RLPs are ready to be imported - NewTransactions(Vec<Bytes>, Option<H512>), + NewTransactions(Vec<Bytes>, usize), /// Begin snapshot restoration BeginRestoration(ManifestData), /// Feed a state chunk to the snapshot service @@ -196,8 +196,8 @@ impl IoHandler<ClientIoMessage> for ClientIoHandler { match *net_message { ClientIoMessage::BlockVerified => { self.client.import_verified_blocks(); } - ClientIoMessage::NewTransactions(ref transactions, ref peer_id) => { - self.client.import_queued_transactions(transactions, peer_id.clone()); + ClientIoMessage::NewTransactions(ref transactions, peer_id) => { + self.client.import_queued_transactions(transactions, peer_id); } ClientIoMessage::BeginRestoration(ref manifest) => { if let Err(e) = self.snapshot.init_restore(manifest.clone(), true) { diff --git a/js/src/dapps/localtx/Transaction/transaction.js b/js/src/dapps/localtx/Transaction/transaction.js index c9ca10ba5..d1c98f360 100644 --- a/js/src/dapps/localtx/Transaction/transaction.js +++ b/js/src/dapps/localtx/Transaction/transaction.js @@ -86,17 +86,6 @@ class BaseTransaction extends Component { </span> ); } - - renderReceived (stats) { - const noOfPeers = Object.keys(stats.receivedFrom).length; - const noOfPropagations = Object.values(stats.receivedFrom).reduce((sum, val) => sum + val, 0); - - return ( - <span className={ styles.nowrap }> - { noOfPropagations } ({ noOfPeers } peers) - </span> - ); - } } export class Transaction extends BaseTransaction { @@ -113,8 +102,7 @@ export class Transaction extends BaseTransaction { isLocal: false, stats: { firstSeen: 0, - propagatedTo: {}, - receivedFrom: {} + propagatedTo: {} } }; @@ -140,9 +128,6 @@ export class Transaction extends BaseTransaction { <th> # Propagated </th> - <th> - # Received - </th> <th /> </tr> ); @@ -179,9 +164,6 @@ export class Transaction extends BaseTransaction { <td> { this.renderPropagation(stats) } </td> - <td> - { this.renderReceived(stats) } - </td> </tr> ); } @@ -210,8 +192,7 @@ export class LocalTransaction extends BaseTransaction { static defaultProps = { stats: { - propagatedTo: {}, - receivedFrom: {} + propagatedTo: {} } }; @@ -335,8 +316,6 @@ export class LocalTransaction extends BaseTransaction { { this.renderStatus() } <br /> { status === 'pending' ? this.renderPropagation(stats) : null } - <br /> - { status === 'pending' ? this.renderReceived(stats) : null } </td> </tr> ); diff --git a/rpc/src/v1/tests/helpers/sync_provider.rs b/rpc/src/v1/tests/helpers/sync_provider.rs index aa7e8d849..2517abd46 100644 --- a/rpc/src/v1/tests/helpers/sync_provider.rs +++ b/rpc/src/v1/tests/helpers/sync_provider.rs @@ -106,18 +106,12 @@ impl SyncProvider for TestSyncProvider { propagated_to: map![ 128.into() => 16 ], - received_from: map![ - 1.into() => 10 - ], }, 5.into() => TransactionStats { first_seen: 16, propagated_to: map![ 16.into() => 1 ], - received_from: map![ - 256.into() => 2 - ], } ] } diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index 45ee4aa75..9b4daaccd 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -363,7 +363,7 @@ fn rpc_parity_transactions_stats() { let io = deps.default_client(); let request = r#"{"jsonrpc": "2.0", "method": "parity_pendingTransactionsStats", "params":[], "id": 1}"#; - let response = r#"{"jsonrpc":"2.0","result":{"0x0000000000000000000000000000000000000000000000000000000000000001":{"firstSeen":10,"propagatedTo":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080":16},"receivedFrom":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001":10}},"0x0000000000000000000000000000000000000000000000000000000000000005":{"firstSeen":16,"propagatedTo":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010":1},"receivedFrom":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100":2}}},"id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":{"0x0000000000000000000000000000000000000000000000000000000000000001":{"firstSeen":10,"propagatedTo":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080":16}},"0x0000000000000000000000000000000000000000000000000000000000000005":{"firstSeen":16,"propagatedTo":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010":1}}},"id":1}"#; assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); } diff --git a/rpc/src/v1/types/sync.rs b/rpc/src/v1/types/sync.rs index 65d989156..8d3726e7a 100644 --- a/rpc/src/v1/types/sync.rs +++ b/rpc/src/v1/types/sync.rs @@ -127,9 +127,6 @@ pub struct TransactionStats { /// Peers this transaction was propagated to with count. #[serde(rename="propagatedTo")] pub propagated_to: BTreeMap<H512, usize>, - /// Peers that propagated this transaction back. - #[serde(rename="receivedFrom")] - pub received_from: BTreeMap<H512, usize>, } impl From<SyncPeerInfo> for PeerInfo { @@ -161,10 +158,6 @@ impl From<SyncTransactionStats> for TransactionStats { .into_iter() .map(|(id, count)| (id.into(), count)) .collect(), - received_from: s.received_from - .into_iter() - .map(|(id, count)| (id.into(), count)) - .collect(), } } } @@ -216,12 +209,9 @@ mod tests { propagated_to: map![ 10.into() => 50 ], - received_from: map![ - 1.into() => 1000 - ], }; let serialized = serde_json::to_string(&stats).unwrap(); - assert_eq!(serialized, r#"{"firstSeen":100,"propagatedTo":{"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a":50},"receivedFrom":{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001":1000}}"#) + assert_eq!(serialized, r#"{"firstSeen":100,"propagatedTo":{"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a":50}}"#) } } diff --git a/sync/src/api.rs b/sync/src/api.rs index 0f3695fe9..c675ee6d3 100644 --- a/sync/src/api.rs +++ b/sync/src/api.rs @@ -99,8 +99,6 @@ pub struct TransactionStats { pub first_seen: u64, /// Peers it was propagated to. pub propagated_to: BTreeMap<H512, usize>, - /// Peers that propagated the transaction back. - pub received_from: BTreeMap<H512, usize>, } /// Peer connection information @@ -338,9 +336,9 @@ impl ChainNotify for EthSync { self.network.stop().unwrap_or_else(|e| warn!("Error stopping network: {:?}", e)); } - fn transactions_imported(&self, hashes: Vec<H256>, peer_id: Option<H512>, block_number: u64) { + fn transactions_received(&self, hashes: Vec<H256>, peer_id: PeerId) { let mut sync = self.sync_handler.sync.write(); - sync.transactions_imported(hashes, peer_id, block_number); + sync.transactions_received(hashes, peer_id); } } @@ -351,7 +349,7 @@ struct TxRelay(Arc<BlockChainClient>); impl LightHandler for TxRelay { fn on_transactions(&self, ctx: &EventContext, relay: &[::ethcore::transaction::SignedTransaction]) { trace!(target: "les", "Relaying {} transactions from peer {}", relay.len(), ctx.peer()); - self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).to_vec()).collect(), ctx.persistent_peer_id()) + self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).to_vec()).collect(), ctx.peer()) } } diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 243c6b431..ecd95c68a 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -432,10 +432,10 @@ impl ChainSync { self.transactions_stats.stats() } - /// Updates statistics for imported transactions. - pub fn transactions_imported(&mut self, hashes: Vec<H256>, peer_id: Option<H512>, block_number: u64) { - for hash in hashes { - self.transactions_stats.received(hash, peer_id, block_number); + /// Updates transactions were received by a peer + pub fn transactions_received(&mut self, hashes: Vec<H256>, peer_id: PeerId) { + if let Some(mut peer_info) = self.peers.get_mut(&peer_id) { + peer_info.last_sent_transactions.extend(&hashes); } } @@ -1416,8 +1416,7 @@ impl ChainSync { let tx = rlp.as_raw().to_vec(); transactions.push(tx); } - let id = io.peer_session_info(peer_id).and_then(|info| info.id); - io.chain().queue_transactions(transactions, id); + io.chain().queue_transactions(transactions, peer_id); Ok(()) } diff --git a/sync/src/transactions_stats.rs b/sync/src/transactions_stats.rs index a91a860e5..fa8eb6e82 100644 --- a/sync/src/transactions_stats.rs +++ b/sync/src/transactions_stats.rs @@ -26,7 +26,6 @@ type BlockNumber = u64; pub struct Stats { first_seen: BlockNumber, propagated_to: HashMap<NodeId, usize>, - received_from: HashMap<NodeId, usize>, } impl Stats { @@ -34,7 +33,6 @@ impl Stats { Stats { first_seen: number, propagated_to: Default::default(), - received_from: Default::default(), } } } @@ -47,10 +45,6 @@ impl<'a> From<&'a Stats> for TransactionStats { .iter() .map(|(hash, size)| (*hash, *size)) .collect(), - received_from: other.received_from - .iter() - .map(|(hash, size)| (*hash, *size)) - .collect(), } } } @@ -69,14 +63,6 @@ impl TransactionsStats { *count = count.saturating_add(1); } - /// Increase number of back-propagations from given `enodeid`. - pub fn received(&mut self, hash: H256, enode_id: Option<NodeId>, current_block_num: BlockNumber) { - let enode_id = enode_id.unwrap_or_default(); - let mut stats = self.pending_transactions.entry(hash).or_insert_with(|| Stats::new(current_block_num)); - let mut count = stats.received_from.entry(enode_id).or_insert(0); - *count = count.saturating_add(1); - } - /// Returns propagation stats for given hash or `None` if hash is not known. #[cfg(test)] pub fn get(&self, hash: &H256) -> Option<&Stats> { @@ -127,32 +113,6 @@ mod tests { enodeid1 => 2, enodeid2 => 1 ], - received_from: Default::default(), - })); - } - - #[test] - fn should_keep_track_of_back_propagations() { - // given - let mut stats = TransactionsStats::default(); - let hash = 5.into(); - let enodeid1 = 2.into(); - let enodeid2 = 5.into(); - - // when - stats.received(hash, Some(enodeid1), 5); - stats.received(hash, Some(enodeid1), 10); - stats.received(hash, Some(enodeid2), 15); - - // then - let stats = stats.get(&hash); - assert_eq!(stats, Some(&Stats { - first_seen: 5, - propagated_to: Default::default(), - received_from: hash_map![ - enodeid1 => 2, - enodeid2 => 1 - ] })); } From b5020d3c8d387ed3a51a1779688eb904e1b165d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Sat, 10 Dec 2016 21:25:08 +0100 Subject: [PATCH 090/131] Fixing Light context API --- ethcore/light/src/net/context.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ethcore/light/src/net/context.rs b/ethcore/light/src/net/context.rs index af1f4c677..522722bcd 100644 --- a/ethcore/light/src/net/context.rs +++ b/ethcore/light/src/net/context.rs @@ -43,7 +43,7 @@ pub trait IoContext { fn protocol_version(&self, peer: PeerId) -> Option<u8>; /// Persistent peer id - fn persistent_peer_id(&self, peer: PeerId) -> Option<NodeId>; + fn persistent_peer_id(&self, peer: &PeerId) -> Option<NodeId>; } impl<'a> IoContext for NetworkContext<'a> { @@ -71,8 +71,8 @@ impl<'a> IoContext for NetworkContext<'a> { self.protocol_version(self.subprotocol_name(), peer) } - fn persistent_peer_id(&self, peer: PeerId) -> Option<NodeId> { - self.session_info(peer).and_then(|info| info.id) + fn persistent_peer_id(&self, peer: &PeerId) -> Option<NodeId> { + self.session_info(*peer).and_then(|info| info.id) } } @@ -83,7 +83,7 @@ pub trait EventContext { fn peer(&self) -> PeerId; /// Returns the relevant's peer persistent Id (aka NodeId). - fn persistent_peer_id(&self) -> Option<NodeId>; + fn persistent_peer_id(&self, id: &PeerId) -> Option<NodeId>; /// Make a request from a peer. fn request_from(&self, peer: PeerId, request: Request) -> Result<ReqId, Error>; @@ -116,8 +116,8 @@ impl<'a> EventContext for Ctx<'a> { self.peer } - fn persistent_peer_id(&self) -> Option<NodeId> { - self.io.persistent_peer_id(self.peer) + fn persistent_peer_id(&self, id: &PeerId) -> Option<NodeId> { + self.io.persistent_peer_id(id) } fn request_from(&self, peer: PeerId, request: Request) -> Result<ReqId, Error> { self.proto.request_from(self.io, &peer, request) From 7401358543f8e4b18f55cebc4cc1d73ae5337ab6 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 22:15:56 +0100 Subject: [PATCH 091/131] PR grumbles --- .../DeployContract/DetailsStep/detailsStep.js | 23 +++++++++++-------- js/src/views/Contracts/contracts.js | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/js/src/modals/DeployContract/DetailsStep/detailsStep.js b/js/src/modals/DeployContract/DetailsStep/detailsStep.js index 3de7a8a44..51c5d3cfb 100644 --- a/js/src/modals/DeployContract/DetailsStep/detailsStep.js +++ b/js/src/modals/DeployContract/DetailsStep/detailsStep.js @@ -94,25 +94,28 @@ export default class DetailsStep extends Component { <AddressSelect label='from account (contract owner)' hint='the owner account for this contract' - value={ fromAddress } - error={ fromAddressError } accounts={ accounts } balances={ balances } - onChange={ this.onFromAddressChange } /> + error={ fromAddressError } + onChange={ this.onFromAddressChange } + value={ fromAddress } + /> <Input label='contract name' hint='a name for the deployed contract' error={ nameError } + onChange={ this.onNameChange } value={ name || '' } - onChange={ this.onNameChange } /> + /> <Input label='contract description (optional)' hint='a description for the contract' error={ descriptionError } + onChange={ this.onDescriptionChange } value={ description } - onChange={ this.onDescriptionChange } /> + /> { this.renderContractSelect() } @@ -120,17 +123,19 @@ export default class DetailsStep extends Component { label='abi / solc combined-output' hint='the abi of the contract to deploy or solc combined-output' error={ abiError } - value={ solcOutput } onChange={ this.onSolcChange } onSubmit={ this.onSolcSubmit } - readOnly={ readOnly } /> + readOnly={ readOnly } + value={ solcOutput } + /> <Input label='code' hint='the compiled code of the contract to deploy' error={ codeError } - value={ code } onSubmit={ this.onCodeChange } - readOnly={ readOnly || solc } /> + readOnly={ readOnly || solc } + value={ code } + /> </Form> ); diff --git a/js/src/views/Contracts/contracts.js b/js/src/views/Contracts/contracts.js index 524954f80..7b74654da 100644 --- a/js/src/views/Contracts/contracts.js +++ b/js/src/views/Contracts/contracts.js @@ -147,7 +147,7 @@ class Contracts extends Component { > <Button icon={ <FileIcon /> } - label='write contract' + label='develop contract' /> </Link>, From 173a88804a6dff251c5362f06e68d5c68801fbd5 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jacogr@gmail.com> Date: Sat, 10 Dec 2016 22:21:32 +0100 Subject: [PATCH 092/131] Status page updates (#3774) * Allow Page to create optional Actionbar * Typo * Display last block.timestamp * Remove unnneeded console.log * Re-do git mv * git mv * Force build changes * Resolving case sensitivity issues * Swapped to margin at bottom --- js/src/redux/providers/status.js | 5 +++- js/src/redux/providers/statusReducer.js | 1 + js/src/ui/Actionbar/actionbar.js | 4 ++- js/src/ui/Page/page.css | 2 +- js/src/ui/Page/page.js | 25 ++++++++++++++--- js/src/views/Signer/signer.js | 3 +-- js/src/views/Signer/store.js | 12 ++++----- .../components/Debug/{Debug.css => debug.css} | 0 .../components/Debug/{Debug.js => debug.js} | 2 +- js/src/views/Status/components/Debug/index.js | 2 +- .../Status/components/MiningSettings/index.js | 2 +- .../{MiningSettings.js => miningSettings.js} | 0 .../views/Status/components/Status/index.js | 2 +- .../Status/{Status.css => status.css} | 15 ++++++++--- .../Status/{Status.js => status.js} | 27 +++++++++++-------- .../Status/containers/StatusPage/index.js | 2 +- .../StatusPage/statusPage.css} | 6 ++++- .../{StatusPage.js => statusPage.js} | 4 ++- js/src/views/Status/status.js | 14 +++------- 19 files changed, 82 insertions(+), 46 deletions(-) rename js/src/views/Status/components/Debug/{Debug.css => debug.css} (100%) rename js/src/views/Status/components/Debug/{Debug.js => debug.js} (99%) rename js/src/views/Status/components/MiningSettings/{MiningSettings.js => miningSettings.js} (100%) rename js/src/views/Status/components/Status/{Status.css => status.css} (90%) rename js/src/views/Status/components/Status/{Status.js => status.js} (84%) rename js/src/views/Status/{status.css => containers/StatusPage/statusPage.css} (93%) rename js/src/views/Status/containers/StatusPage/{StatusPage.js => statusPage.js} (95%) diff --git a/js/src/redux/providers/status.js b/js/src/redux/providers/status.js index 830192bbe..138479716 100644 --- a/js/src/redux/providers/status.js +++ b/js/src/redux/providers/status.js @@ -54,7 +54,10 @@ export default class Status { this._api.eth .getBlockByNumber(blockNumber) .then((block) => { - this._store.dispatch(statusCollection({ gasLimit: block.gasLimit })); + this._store.dispatch(statusCollection({ + blockTimestamp: block.timestamp, + gasLimit: block.gasLimit + })); }) .catch((error) => { console.warn('status._subscribeBlockNumber', 'getBlockByNumber', error); diff --git a/js/src/redux/providers/statusReducer.js b/js/src/redux/providers/statusReducer.js index 07ba4af5b..279a9da42 100644 --- a/js/src/redux/providers/statusReducer.js +++ b/js/src/redux/providers/statusReducer.js @@ -19,6 +19,7 @@ import { handleActions } from 'redux-actions'; const initialState = { blockNumber: new BigNumber(0), + blockTimestamp: new Date(), devLogs: [], devLogsLevels: null, devLogsEnabled: false, diff --git a/js/src/ui/Actionbar/actionbar.js b/js/src/ui/Actionbar/actionbar.js index c3fbe6a18..f744f5c57 100644 --- a/js/src/ui/Actionbar/actionbar.js +++ b/js/src/ui/Actionbar/actionbar.js @@ -17,11 +17,13 @@ import React, { Component, PropTypes } from 'react'; import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar'; +import { nodeOrStringProptype } from '~/util/proptypes'; + import styles from './actionbar.css'; export default class Actionbar extends Component { static propTypes = { - title: PropTypes.string, + title: nodeOrStringProptype(), buttons: PropTypes.array, children: PropTypes.node, className: PropTypes.string diff --git a/js/src/ui/Page/page.css b/js/src/ui/Page/page.css index 72a78dc22..c09283aec 100644 --- a/js/src/ui/Page/page.css +++ b/js/src/ui/Page/page.css @@ -18,7 +18,7 @@ .layout { padding: 0.25em 0.25em 1em 0.25em; - > * { + &>div { margin-bottom: 0.75em; } } diff --git a/js/src/ui/Page/page.js b/js/src/ui/Page/page.js index 867c3fdf1..9646358b3 100644 --- a/js/src/ui/Page/page.js +++ b/js/src/ui/Page/page.js @@ -16,21 +16,38 @@ import React, { Component, PropTypes } from 'react'; +import Actionbar from '../Actionbar'; +import { nodeOrStringProptype } from '~/util/proptypes'; + import styles from './page.css'; export default class Page extends Component { static propTypes = { + buttons: PropTypes.array, className: PropTypes.string, - children: PropTypes.node + children: PropTypes.node, + title: nodeOrStringProptype() }; render () { - const { className, children } = this.props; + const { buttons, className, children, title } = this.props; const classes = `${styles.layout} ${className}`; + let actionbar = null; + + if (title || buttons) { + actionbar = ( + <Actionbar + buttons={ buttons } + title={ title } /> + ); + } return ( - <div className={ classes }> - { children } + <div> + { actionbar } + <div className={ classes }> + { children } + </div> </div> ); } diff --git a/js/src/views/Signer/signer.js b/js/src/views/Signer/signer.js index 6d68c1dc0..f0b4baed7 100644 --- a/js/src/views/Signer/signer.js +++ b/js/src/views/Signer/signer.js @@ -23,8 +23,7 @@ export default class Signer extends Component { render () { return ( <div> - <Actionbar - title='Trusted Signer' /> + <Actionbar title='Trusted Signer' /> <RequestsPage /> </div> ); diff --git a/js/src/views/Signer/store.js b/js/src/views/Signer/store.js index 0eeb99861..bcc85a431 100644 --- a/js/src/views/Signer/store.js +++ b/js/src/views/Signer/store.js @@ -30,12 +30,6 @@ export default class Store { } } - @action unsubscribe () { - if (this._timeoutId) { - clearTimeout(this._timeoutId); - } - } - @action setBalance = (address, balance) => { this.setBalances({ [address]: balance }); } @@ -50,6 +44,12 @@ export default class Store { } } + @action unsubscribe () { + if (this._timeoutId) { + clearTimeout(this._timeoutId); + } + } + fetchBalance (address) { this._api.eth .getBalance(address) diff --git a/js/src/views/Status/components/Debug/Debug.css b/js/src/views/Status/components/Debug/debug.css similarity index 100% rename from js/src/views/Status/components/Debug/Debug.css rename to js/src/views/Status/components/Debug/debug.css diff --git a/js/src/views/Status/components/Debug/Debug.js b/js/src/views/Status/components/Debug/debug.js similarity index 99% rename from js/src/views/Status/components/Debug/Debug.js rename to js/src/views/Status/components/Debug/debug.js index 84ce1bb87..438d208f9 100644 --- a/js/src/views/Status/components/Debug/Debug.js +++ b/js/src/views/Status/components/Debug/debug.js @@ -22,7 +22,7 @@ import ReorderIcon from 'material-ui/svg-icons/action/reorder'; import { Container } from '~/ui'; -import styles from './Debug.css'; +import styles from './debug.css'; export default class Debug extends Component { static propTypes = { diff --git a/js/src/views/Status/components/Debug/index.js b/js/src/views/Status/components/Debug/index.js index 9e8eae219..c6b522c46 100644 --- a/js/src/views/Status/components/Debug/index.js +++ b/js/src/views/Status/components/Debug/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './Debug'; +export default from './debug'; diff --git a/js/src/views/Status/components/MiningSettings/index.js b/js/src/views/Status/components/MiningSettings/index.js index 3eee1e051..7853e0d33 100644 --- a/js/src/views/Status/components/MiningSettings/index.js +++ b/js/src/views/Status/components/MiningSettings/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './MiningSettings'; +export default from './miningSettings'; diff --git a/js/src/views/Status/components/MiningSettings/MiningSettings.js b/js/src/views/Status/components/MiningSettings/miningSettings.js similarity index 100% rename from js/src/views/Status/components/MiningSettings/MiningSettings.js rename to js/src/views/Status/components/MiningSettings/miningSettings.js diff --git a/js/src/views/Status/components/Status/index.js b/js/src/views/Status/components/Status/index.js index 8885a04c6..44079b224 100644 --- a/js/src/views/Status/components/Status/index.js +++ b/js/src/views/Status/components/Status/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './Status'; +export default from './status'; diff --git a/js/src/views/Status/components/Status/Status.css b/js/src/views/Status/components/Status/status.css similarity index 90% rename from js/src/views/Status/components/Status/Status.css rename to js/src/views/Status/components/Status/status.css index d79d41062..229e72ce1 100644 --- a/js/src/views/Status/components/Status/Status.css +++ b/js/src/views/Status/components/Status/status.css @@ -28,10 +28,19 @@ content: ''; } -.blockinfo { - font-size: 24px; +.blockInfo { color: #aaa; - line-height: 24px; + font-size: 1.5em; + line-height: 1.5em; +} + +.blockByline { + color: #aaa; + font-size: 0.75em; +} + +.padBottom { + padding-bottom: 1.25em !important; } .col, diff --git a/js/src/views/Status/components/Status/Status.js b/js/src/views/Status/components/Status/status.js similarity index 84% rename from js/src/views/Status/components/Status/Status.js rename to js/src/views/Status/components/Status/status.js index e2d65cb9a..891ec6632 100644 --- a/js/src/views/Status/components/Status/Status.js +++ b/js/src/views/Status/components/Status/status.js @@ -14,14 +14,16 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import React, { Component, PropTypes } from 'react'; import bytes from 'bytes'; +import moment from 'moment'; +import React, { Component, PropTypes } from 'react'; import { Container, ContainerTitle, Input } from '~/ui'; -import styles from './Status.css'; import MiningSettings from '../MiningSettings'; +import styles from './status.css'; + export default class Status extends Component { static propTypes = { nodeStatus: PropTypes.object.isRequired, @@ -44,23 +46,26 @@ export default class Status extends Component { <div className={ styles.container }> <div className={ styles.row }> <div className={ styles.col3 }> - <div className={ styles.col12 }> + <div className={ `${styles.col12} ${styles.padBottom}` }> <ContainerTitle title='best block' /> - <h2 { ...this._test('best-block') } className={ styles.blockinfo }> + <div { ...this._test('best-block') } className={ styles.blockInfo }> #{ nodeStatus.blockNumber.toFormat() } - </h2> + </div> + <div className={ styles.blockByline }> + { moment().calendar(nodeStatus.blockTimestamp) } + </div> </div> - <div className={ styles.col12 }> + <div className={ `${styles.col12} ${styles.padBottom}` }> <ContainerTitle title='peers' /> - <h2 { ...this._test('peers') } className={ styles.blockinfo }> + <div { ...this._test('peers') } className={ styles.blockInfo }> { peers } - </h2> + </div> </div> - <div className={ styles.col12 }> + <div className={ `${styles.col12} ${styles.padBottom}` }> <ContainerTitle title='hash rate' /> - <h2 { ...this._test('hashrate') } className={ styles.blockinfo }> + <div { ...this._test('hashrate') } className={ styles.blockInfo }> { `${hashrate} H/s` } - </h2> + </div> </div> </div> <div className={ styles.col5 }> diff --git a/js/src/views/Status/containers/StatusPage/index.js b/js/src/views/Status/containers/StatusPage/index.js index e36bc949c..0e141a16d 100644 --- a/js/src/views/Status/containers/StatusPage/index.js +++ b/js/src/views/Status/containers/StatusPage/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './StatusPage'; +export default from './statusPage'; diff --git a/js/src/views/Status/status.css b/js/src/views/Status/containers/StatusPage/statusPage.css similarity index 93% rename from js/src/views/Status/status.css rename to js/src/views/Status/containers/StatusPage/statusPage.css index 0ed554ae6..bda975813 100644 --- a/js/src/views/Status/status.css +++ b/js/src/views/Status/containers/StatusPage/statusPage.css @@ -14,5 +14,9 @@ /* You should have received a copy of the GNU General Public License /* along with Parity. If not, see <http://www.gnu.org/licenses/>. */ -.container { + +.body { + &>div { + margin-bottom: 0.25em; + } } diff --git a/js/src/views/Status/containers/StatusPage/StatusPage.js b/js/src/views/Status/containers/StatusPage/statusPage.js similarity index 95% rename from js/src/views/Status/containers/StatusPage/StatusPage.js rename to js/src/views/Status/containers/StatusPage/statusPage.js index c7ab56c5e..286e2c20e 100644 --- a/js/src/views/Status/containers/StatusPage/StatusPage.js +++ b/js/src/views/Status/containers/StatusPage/statusPage.js @@ -23,6 +23,8 @@ import { clearStatusLogs, toggleStatusLogs, toggleStatusRefresh } from '~/redux/ import Debug from '../../components/Debug'; import Status from '../../components/Status'; +import styles from './statusPage.css'; + class StatusPage extends Component { static propTypes = { nodeStatus: PropTypes.object.isRequired, @@ -39,7 +41,7 @@ class StatusPage extends Component { render () { return ( - <div> + <div className={ styles.body }> <Status { ...this.props } /> <Debug { ...this.props } /> </div> diff --git a/js/src/views/Status/status.js b/js/src/views/Status/status.js index ff13f1a07..805c96850 100644 --- a/js/src/views/Status/status.js +++ b/js/src/views/Status/status.js @@ -16,22 +16,16 @@ import React, { Component } from 'react'; -import { Actionbar, Page } from '~/ui'; +import { Page } from '~/ui'; import StatusPage from './containers/StatusPage'; -import styles from './status.css'; - export default class Status extends Component { render () { return ( - <div className={ styles.container }> - <Actionbar - title='status' /> - <Page> - <StatusPage /> - </Page> - </div> + <Page title='status'> + <StatusPage /> + </Page> ); } } From 9dbccfda2f52394056d9f5ea0c412543c71b3988 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 22:22:14 +0100 Subject: [PATCH 093/131] Fix padding bottom // Status bar fixed --- js/src/ui/Page/page.css | 2 +- js/src/views/Application/application.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/src/ui/Page/page.css b/js/src/ui/Page/page.css index 72a78dc22..ace070528 100644 --- a/js/src/ui/Page/page.css +++ b/js/src/ui/Page/page.css @@ -16,7 +16,7 @@ */ .layout { - padding: 0.25em 0.25em 1em 0.25em; + padding: 0.25em; > * { margin-bottom: 0.75em; diff --git a/js/src/views/Application/application.css b/js/src/views/Application/application.css index 1b26ed071..4ce748a30 100644 --- a/js/src/views/Application/application.css +++ b/js/src/views/Application/application.css @@ -19,4 +19,5 @@ display: flex; flex-direction: column; min-height: 100vh; + padding-bottom: 1em; } From 5ec1ff43ea79d1d029e0160c4efed125d1523776 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sat, 10 Dec 2016 21:29:53 +0000 Subject: [PATCH 094/131] [ci skip] js-precompiled 20161210-212741 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e970051c..6ff92e827 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#3d3b2f9e8e8b0fd62c172240bfd001a317cf2979" +source = "git+https://github.com/ethcore/js-precompiled.git#74aca23de55f84b2fcf6fe80d30277fa6449f645" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 524c280dc..0618f9d2d 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.105", + "version": "0.2.106", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From e5c73b29d857e8d7ef8d9113498bafdad386054d Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 22:42:49 +0100 Subject: [PATCH 095/131] 'contract/write' to 'contract/develop' --- js/src/main.js | 2 +- js/src/views/Contracts/contracts.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/main.js b/js/src/main.js index c1dda9d57..f61e3d563 100644 --- a/js/src/main.js +++ b/js/src/main.js @@ -74,7 +74,7 @@ export default class MainApplication extends Component { <Route path='contracts'> <IndexRoute component={ Contracts } /> - <Route path='write' component={ WriteContract } /> + <Route path='develop' component={ WriteContract } /> <Route path=':address' component={ Contract } /> </Route> diff --git a/js/src/views/Contracts/contracts.js b/js/src/views/Contracts/contracts.js index 7b74654da..1e15c3947 100644 --- a/js/src/views/Contracts/contracts.js +++ b/js/src/views/Contracts/contracts.js @@ -142,7 +142,7 @@ class Contracts extends Component { label='deploy contract' onClick={ this.onDeployContract } />, <Link - to='/contracts/write' + to='/contracts/develop' key='writeContract' > <Button From 1e8638608c3ccc5db718bf3f6d2e77918e585abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Sat, 10 Dec 2016 22:59:35 +0100 Subject: [PATCH 096/131] fixing tests --- ethcore/light/src/net/tests/mod.rs | 2 +- ethcore/src/client/chain_notify.rs | 2 +- ethcore/src/client/client.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index e2a17a41e..227eb9b7c 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -69,7 +69,7 @@ impl IoContext for Expect { Some(super::MAX_PROTOCOL_VERSION) } - fn persistent_peer_id(&self, _peer: PeerId) -> Option<NodeId> { + fn persistent_peer_id(&self, _peer: &PeerId) -> Option<NodeId> { None } } diff --git a/ethcore/src/client/chain_notify.rs b/ethcore/src/client/chain_notify.rs index ddab542fb..eb695e063 100644 --- a/ethcore/src/client/chain_notify.rs +++ b/ethcore/src/client/chain_notify.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. use ipc::IpcConfig; -use util::{H256, H512}; +use util::H256; /// Represents what has to be handled by actor listening to chain events #[ipc] diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index c258ed1eb..70f198987 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -25,7 +25,7 @@ use time::precise_time_ns; use util::{Bytes, PerfTimer, Itertools, Mutex, RwLock, Hashable}; use util::{journaldb, TrieFactory, Trie}; use util::trie::TrieSpec; -use util::{U256, H256, H512, Address, H2048, Uint, FixedHash}; +use util::{U256, H256, Address, H2048, Uint, FixedHash}; use util::kvdb::*; // other From b0f1665f11120183fb21bdaf31231d077ad96cbb Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 23:55:36 +0100 Subject: [PATCH 097/131] Notify user on transaction received (#3782) * Notify user on new transaction #2556 * Add routing to account on notification click * Timeout of notif set to 20s --- js/package.json | 1 + js/src/index.js | 2 +- js/src/redux/middleware.js | 6 +- js/src/redux/providers/balancesActions.js | 95 +++++++++++++++++++---- js/src/redux/providers/balancesReducer.js | 35 +-------- js/src/redux/providers/index.js | 6 +- js/src/redux/reducers.js | 7 +- js/src/redux/store.js | 4 +- js/src/util/notifications.js | 45 +++++++++++ 9 files changed, 142 insertions(+), 59 deletions(-) create mode 100644 js/src/util/notifications.js diff --git a/js/package.json b/js/package.json index 0618f9d2d..011ecc897 100644 --- a/js/package.json +++ b/js/package.json @@ -146,6 +146,7 @@ "mobx-react-devtools": "4.2.10", "moment": "2.17.0", "phoneformat.js": "1.0.3", + "push.js": "0.0.11", "qs": "6.3.0", "react": "15.4.1", "react-ace": "4.1.0", diff --git a/js/src/index.js b/js/src/index.js index 6938a46f8..46d6c9c74 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -67,7 +67,7 @@ if (window.location.hash && window.location.hash.indexOf(AUTH_HASH) === 0) { const api = new SecureApi(`ws://${parityUrl}`, token); ContractInstances.create(api); -const store = initStore(api); +const store = initStore(api, hashHistory); store.dispatch({ type: 'initAll', api }); store.dispatch(setApi(api)); diff --git a/js/src/redux/middleware.js b/js/src/redux/middleware.js index bb11cf32f..14bc9b0a6 100644 --- a/js/src/redux/middleware.js +++ b/js/src/redux/middleware.js @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. import thunk from 'redux-thunk'; +import { routerMiddleware } from 'react-router-redux'; import ErrorsMiddleware from '~/ui/Errors/middleware'; import SettingsMiddleware from '~/views/Settings/middleware'; @@ -22,12 +23,13 @@ import SignerMiddleware from './providers/signerMiddleware'; import statusMiddleware from '~/views/Status/middleware'; import CertificationsMiddleware from './providers/certifications/middleware'; -export default function (api) { +export default function (api, browserHistory) { const errors = new ErrorsMiddleware(); const signer = new SignerMiddleware(api); const settings = new SettingsMiddleware(); const status = statusMiddleware(); const certifications = new CertificationsMiddleware(); + const routeMiddleware = routerMiddleware(browserHistory); const middleware = [ settings.toMiddleware(), @@ -36,5 +38,5 @@ export default function (api) { certifications.toMiddleware() ]; - return middleware.concat(status, thunk); + return middleware.concat(status, routeMiddleware, thunk); } diff --git a/js/src/redux/providers/balancesActions.js b/js/src/redux/providers/balancesActions.js index 65f831008..f8cfb2c1e 100644 --- a/js/src/redux/providers/balancesActions.js +++ b/js/src/redux/providers/balancesActions.js @@ -15,11 +15,14 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import { range, uniq, isEqual } from 'lodash'; +import BigNumber from 'bignumber.js'; +import { push } from 'react-router-redux'; import { hashToImageUrl } from './imagesReducer'; import { setAddressImage } from './imagesActions'; import * as ABIS from '~/contracts/abi'; +import { notifyTransaction } from '~/util/notifications'; import imagesEthereum from '../../../assets/images/contracts/ethereum-black-64x64.png'; const ETH = { @@ -28,7 +31,64 @@ const ETH = { image: imagesEthereum }; -export function setBalances (balances) { +function setBalances (_balances) { + return (dispatch, getState) => { + const state = getState(); + + const accounts = state.personal.accounts; + const nextBalances = _balances; + const prevBalances = state.balances.balances; + const balances = { ...prevBalances }; + + Object.keys(nextBalances).forEach((address) => { + if (!balances[address]) { + balances[address] = Object.assign({}, nextBalances[address]); + return; + } + + const balance = Object.assign({}, balances[address]); + const { tokens, txCount = balance.txCount } = nextBalances[address]; + const nextTokens = [].concat(balance.tokens); + + tokens.forEach((t) => { + const { token, value } = t; + const { tag } = token; + + const tokenIndex = nextTokens.findIndex((tok) => tok.token.tag === tag); + + if (tokenIndex === -1) { + nextTokens.push({ + token, + value + }); + } else { + const oldValue = nextTokens[tokenIndex].value; + + // If received a token/eth (old value < new value), notify + if (oldValue.lt(value) && accounts[address]) { + const account = accounts[address]; + const txValue = value.minus(oldValue); + + const redirectToAccount = () => { + const route = `/account/${account.address}`; + dispatch(push(route)); + }; + + notifyTransaction(account, token, txValue, redirectToAccount); + } + + nextTokens[tokenIndex] = { token, value }; + } + }); + + balances[address] = { txCount: txCount || new BigNumber(0), tokens: nextTokens }; + }); + + dispatch(_setBalances(balances)); + }; +} + +function _setBalances (balances) { return { type: 'setBalances', balances @@ -123,14 +183,14 @@ export function fetchBalances (_addresses) { const fullFetch = addresses.length === 1; - const fetchedAddresses = uniq(addresses.concat(Object.keys(accounts))); + const addressesToFetch = uniq(addresses.concat(Object.keys(accounts))); return Promise - .all(fetchedAddresses.map((addr) => fetchAccount(addr, api, fullFetch))) + .all(addressesToFetch.map((addr) => fetchAccount(addr, api, fullFetch))) .then((accountsBalances) => { const balances = {}; - fetchedAddresses.forEach((addr, idx) => { + addressesToFetch.forEach((addr, idx) => { balances[addr] = accountsBalances[idx]; }); @@ -146,10 +206,12 @@ export function fetchBalances (_addresses) { export function updateTokensFilter (_addresses, _tokens) { return (dispatch, getState) => { const { api, balances, personal } = getState(); - const { visibleAccounts } = personal; + const { visibleAccounts, accounts } = personal; const { tokensFilter } = balances; - const addresses = uniq(_addresses || visibleAccounts || []).sort(); + const addressesToFetch = uniq(visibleAccounts.concat(Object.keys(accounts))); + const addresses = uniq(_addresses || addressesToFetch || []).sort(); + const tokens = _tokens || Object.values(balances.tokens) || []; const tokenAddresses = tokens.map((t) => t.address).sort(); @@ -221,8 +283,10 @@ export function updateTokensFilter (_addresses, _tokens) { export function queryTokensFilter (tokensFilter) { return (dispatch, getState) => { const { api, personal, balances } = getState(); - const { visibleAccounts } = personal; + const { visibleAccounts, accounts } = personal; + const visibleAddresses = visibleAccounts.map((a) => a.toLowerCase()); + const addressesToFetch = uniq(visibleAddresses.concat(Object.keys(accounts))); Promise .all([ @@ -237,18 +301,16 @@ export function queryTokensFilter (tokensFilter) { .concat(logsTo) .forEach((log) => { const tokenAddress = log.address; + const fromAddress = '0x' + log.topics[1].slice(-40); const toAddress = '0x' + log.topics[2].slice(-40); - const fromIdx = visibleAddresses.indexOf(fromAddress); - const toIdx = visibleAddresses.indexOf(toAddress); - - if (fromIdx > -1) { - addresses.push(visibleAccounts[fromIdx]); + if (addressesToFetch.includes(fromAddress)) { + addresses.push(fromAddress); } - if (toIdx > -1) { - addresses.push(visibleAccounts[toIdx]); + if (addressesToFetch.includes(toAddress)) { + addresses.push(toAddress); } tokenAddresses.push(tokenAddress); @@ -269,9 +331,10 @@ export function queryTokensFilter (tokensFilter) { export function fetchTokensBalances (_addresses = null, _tokens = null) { return (dispatch, getState) => { const { api, personal, balances } = getState(); - const { visibleAccounts } = personal; + const { visibleAccounts, accounts } = personal; - const addresses = _addresses || visibleAccounts; + const addressesToFetch = uniq(visibleAccounts.concat(Object.keys(accounts))); + const addresses = _addresses || addressesToFetch; const tokens = _tokens || Object.values(balances.tokens); if (addresses.length === 0) { diff --git a/js/src/redux/providers/balancesReducer.js b/js/src/redux/providers/balancesReducer.js index 01923a4f4..4b6950498 100644 --- a/js/src/redux/providers/balancesReducer.js +++ b/js/src/redux/providers/balancesReducer.js @@ -15,7 +15,6 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import { handleActions } from 'redux-actions'; -import BigNumber from 'bignumber.js'; const initialState = { balances: {}, @@ -26,39 +25,7 @@ const initialState = { export default handleActions({ setBalances (state, action) { - const nextBalances = action.balances; - const prevBalances = state.balances; - const balances = { ...prevBalances }; - - Object.keys(nextBalances).forEach((address) => { - if (!balances[address]) { - balances[address] = Object.assign({}, nextBalances[address]); - return; - } - - const balance = Object.assign({}, balances[address]); - const { tokens, txCount = balance.txCount } = nextBalances[address]; - const nextTokens = [].concat(balance.tokens); - - tokens.forEach((t) => { - const { token, value } = t; - const { tag } = token; - - const tokenIndex = nextTokens.findIndex((tok) => tok.token.tag === tag); - - if (tokenIndex === -1) { - nextTokens.push({ - token, - value - }); - } else { - nextTokens[tokenIndex] = { token, value }; - } - }); - - balances[address] = Object.assign({}, { txCount: txCount || new BigNumber(0), tokens: nextTokens }); - }); - + const { balances } = action; return Object.assign({}, state, { balances }); }, diff --git a/js/src/redux/providers/index.js b/js/src/redux/providers/index.js index 563378caa..a90d8b62c 100644 --- a/js/src/redux/providers/index.js +++ b/js/src/redux/providers/index.js @@ -21,11 +21,11 @@ export Status from './status'; export apiReducer from './apiReducer'; export balancesReducer from './balancesReducer'; +export blockchainReducer from './blockchainReducer'; +export compilerReducer from './compilerReducer'; export imagesReducer from './imagesReducer'; export personalReducer from './personalReducer'; export signerReducer from './signerReducer'; -export statusReducer from './statusReducer'; -export blockchainReducer from './blockchainReducer'; -export compilerReducer from './compilerReducer'; export snackbarReducer from './snackbarReducer'; +export statusReducer from './statusReducer'; export walletReducer from './walletReducer'; diff --git a/js/src/redux/reducers.js b/js/src/redux/reducers.js index 92388df65..642dfe403 100644 --- a/js/src/redux/reducers.js +++ b/js/src/redux/reducers.js @@ -17,7 +17,12 @@ import { combineReducers } from 'redux'; import { routerReducer } from 'react-router-redux'; -import { apiReducer, balancesReducer, blockchainReducer, compilerReducer, imagesReducer, personalReducer, signerReducer, statusReducer as nodeStatusReducer, snackbarReducer, walletReducer } from './providers'; +import { + apiReducer, balancesReducer, blockchainReducer, + compilerReducer, imagesReducer, personalReducer, + signerReducer, statusReducer as nodeStatusReducer, + snackbarReducer, walletReducer +} from './providers'; import certificationsReducer from './providers/certifications/reducer'; import errorReducer from '~/ui/Errors/reducers'; diff --git a/js/src/redux/store.js b/js/src/redux/store.js index 2ff50ea53..1d62f9ea5 100644 --- a/js/src/redux/store.js +++ b/js/src/redux/store.js @@ -32,9 +32,9 @@ const storeCreation = window.devToolsExtension ? window.devToolsExtension()(createStore) : createStore; -export default function (api) { +export default function (api, browserHistory) { const reducers = initReducers(); - const middleware = initMiddleware(api); + const middleware = initMiddleware(api, browserHistory); const store = applyMiddleware(...middleware)(storeCreation)(reducers); new BalancesProvider(store, api).start(); diff --git a/js/src/util/notifications.js b/js/src/util/notifications.js new file mode 100644 index 000000000..479448234 --- /dev/null +++ b/js/src/util/notifications.js @@ -0,0 +1,45 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import Push from 'push.js'; +import BigNumber from 'bignumber.js'; +import { noop } from 'lodash'; + +import { fromWei } from '~/api/util/wei'; + +import ethereumIcon from '~/../assets/images/contracts/ethereum-black-64x64.png'; +import unkownIcon from '~/../assets/images/contracts/unknown-64x64.png'; + +export function notifyTransaction (account, token, _value, onClick) { + const name = account.name || account.address; + const value = token.tag.toLowerCase() === 'eth' + ? fromWei(_value) + : _value.div(new BigNumber(token.format || 1)); + + const icon = token.tag.toLowerCase() === 'eth' + ? ethereumIcon + : (token.image || unkownIcon); + + Push.create(`${name}`, { + body: `You just received ${value.toFormat()} ${token.tag.toUpperCase()}`, + icon: { + x16: icon, + x32: icon + }, + timeout: 20000, + onClick: onClick || noop + }); +} From b44e7bb292fe8b0f3431062a9735638d52718b74 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sat, 10 Dec 2016 23:55:57 +0100 Subject: [PATCH 098/131] Extract CSS to file in production builds (#3783) * Extract CSS to file if production build * Use DAPPS_URL for testing purposes + better assets in Webpack * Delete comments --- js/src/views/Dapp/dapp.js | 13 ++++++++++--- js/webpack/app.js | 31 +++++++++++++++++++++++++------ 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/js/src/views/Dapp/dapp.js b/js/src/views/Dapp/dapp.js index 9094e4dc3..3e9218914 100644 --- a/js/src/views/Dapp/dapp.js +++ b/js/src/views/Dapp/dapp.js @@ -51,9 +51,16 @@ export default class Dapp extends Component { src = `${dappsUrl}/${app.contentHash}/`; break; default: - const dapphost = process.env.NODE_ENV === 'production' && !app.secure - ? `${dappsUrl}/ui` - : ''; + let dapphost = process.env.DAPPS_URL || ( + process.env.NODE_ENV === 'production' && !app.secure + ? `${dappsUrl}/ui` + : '' + ); + + if (dapphost === '/') { + dapphost = ''; + } + src = `${dapphost}/${app.url}.html`; break; } diff --git a/js/webpack/app.js b/js/webpack/app.js index 5998cf30b..a7b086b96 100644 --- a/js/webpack/app.js +++ b/js/webpack/app.js @@ -20,6 +20,7 @@ const path = require('path'); const WebpackErrorNotificationPlugin = require('webpack-error-notification'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const ExtractTextPlugin = require('extract-text-webpack-plugin'); const Shared = require('./shared'); const DAPPS = require('../src/dapps'); @@ -41,7 +42,7 @@ module.exports = { output: { publicPath: '/', path: path.join(__dirname, '../', DEST), - filename: '[name].[hash].js' + filename: '[name].[hash:10].js' }, module: { @@ -85,13 +86,20 @@ module.exports = { { test: /\.css$/, include: [ /src/ ], + // exclude: [ /src\/dapps/ ], + loader: isProd ? ExtractTextPlugin.extract([ + // 'style-loader', + 'css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]', + 'postcss-loader' + ]) : undefined, // use: [ 'happypack/loader?id=css' ] - use: [ + use: isProd ? undefined : [ 'style-loader', 'css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]', 'postcss-loader' ] }, + { test: /\.css$/, exclude: [ /src/ ], @@ -99,11 +107,15 @@ module.exports = { }, { test: /\.(png|jpg)$/, - use: [ 'file-loader?name=[name].[hash].[ext]' ] + use: [ 'file-loader?&name=assets/[name].[hash:10].[ext]' ] }, { - test: /\.(woff(2)|ttf|eot|svg|otf)(\?v=[0-9]\.[0-9]\.[0-9])?$/, - use: [ 'file-loader' ] + test: /\.(woff(2)|ttf|eot|otf)(\?v=[0-9]\.[0-9]\.[0-9])?$/, + use: [ 'file-loader?name=fonts/[name][hash:10].[ext]' ] + }, + { + test: /\.svg(\?v=[0-9]\.[0-9]\.[0-9])?$/, + use: [ 'file-loader?name=assets/[name].[hash:10].[ext]' ] } ], noParse: [ @@ -153,13 +165,20 @@ module.exports = { if (!isProd) { plugins.push( new webpack.optimize.CommonsChunkPlugin({ - filename: 'commons.[hash].js', + filename: 'commons.[hash:10].js', name: 'commons', minChunks: Infinity }) ); } + if (isProd) { + plugins.push(new ExtractTextPlugin({ + filename: 'styles/[name].[hash:10].css', + allChunks: true + })); + } + return plugins; }()) }; From 854eb1080cbbb4611049b31a62ad0cc7af996512 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Sat, 10 Dec 2016 23:59:50 +0100 Subject: [PATCH 099/131] Remove "s --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d27b58f9a..6dbe688f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -425,11 +425,11 @@ test-rust-stable: - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v ^js/ | wc -l) - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - echo "rust/js modified: $RUST_FILES_MODIFIED / $JS_FILES_MODIFIED" - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi + - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - export RUST_BACKTRACE=1 - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi - - if [ "$RUST_FILES_MODIFIED" = 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi + - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi + - if [ $RUST_FILES_MODIFIED = 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi tags: - rust - rust-stable @@ -440,11 +440,11 @@ js-test: - git submodule update --init --recursive - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi + - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - export RUST_BACKTRACE=1 - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi + - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi tags: - rust - rust-stable @@ -487,9 +487,9 @@ js-release: before_script: - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi + - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - echo $JS_FILES_MODIFIED - - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "Skipping JS rebuild since no JS files modified."; else ./js/scripts/build.sh && ./js/scripts/release.sh; fi + - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS rebuild since no JS files modified."; else ./js/scripts/build.sh && ./js/scripts/release.sh; fi tags: - javascript From 62492a915ed70b3a2b036e0f1b99615e8370c050 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sat, 10 Dec 2016 23:07:55 +0000 Subject: [PATCH 100/131] [ci skip] js-precompiled 20161210-230517 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ff92e827..7d485651c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#74aca23de55f84b2fcf6fe80d30277fa6449f645" +source = "git+https://github.com/ethcore/js-precompiled.git#f982c84ac216cc4f99d056c912e205bcf9341602" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 011ecc897..29d7464be 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.106", + "version": "0.2.107", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From c14d8da3505822509a5a7b3d2948dc0d70bdaafd Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Sun, 11 Dec 2016 00:09:04 +0100 Subject: [PATCH 101/131] Use real arithmetic operator rather than '=' --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d6f3eb69..365ea547a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -425,7 +425,7 @@ test-rust-stable: - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v ^js/ | wc -l) script: - export RUST_BACKTRACE=1 - - if [ $RUST_FILES_MODIFIED = 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi + - if [ $RUST_FILES_MODIFIED -eq 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi tags: - rust - rust-stable @@ -435,9 +435,9 @@ js-test: before_script: - git submodule update --init --recursive - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi + - if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi + - if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi tags: - rust - rust-stable @@ -480,9 +480,9 @@ js-release: before_script: - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - echo $JS_FILES_MODIFIED - - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi + - if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi script: - echo $JS_FILES_MODIFIED - - if [ $JS_FILES_MODIFIED = 0 ]; then echo "Skipping JS rebuild since no JS files modified."; else ./js/scripts/build.sh && ./js/scripts/release.sh; fi + - if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS rebuild since no JS files modified."; else ./js/scripts/build.sh && ./js/scripts/release.sh; fi tags: - javascript From 7c2c9c89a47ab5fefd0e022dbcb2ff5d00d5dceb Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Sun, 11 Dec 2016 00:20:19 +0100 Subject: [PATCH 102/131] Stricter search for rust changes. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 365ea547a..84d10e1bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -422,7 +422,7 @@ test-rust-stable: image: ethcore/rust:stable before_script: - git submodule update --init --recursive - - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v ^js/ | wc -l) + - export RUST_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep -v -e ^js -e ^\\. -e ^LICENSE -e ^README.md -e ^appveyor.yml -e ^test.sh -e ^windows/ -e ^scripts/ -e^mac/ -e ^nsis/ | wc -l) script: - export RUST_BACKTRACE=1 - if [ $RUST_FILES_MODIFIED -eq 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi From bfb684a641de74c6da84050c7749a734bfb35ca0 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 01:28:52 +0000 Subject: [PATCH 103/131] [ci skip] js-precompiled 20161211-012647 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7d485651c..cef7a4a24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#f982c84ac216cc4f99d056c912e205bcf9341602" +source = "git+https://github.com/ethcore/js-precompiled.git#45b91accfc947de126e00472874554f04739ac43" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 29d7464be..f0e925fe4 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.107", + "version": "0.2.108", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 36b8e4b6a88344cdb121834c6319cfe2979f443a Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jacogr@gmail.com> Date: Sun, 11 Dec 2016 10:13:34 +0100 Subject: [PATCH 104/131] Extended publishing of libraries to npm (#3786) * Extended publishing of libraries to npm * Update source links * Add some tests before publishing NPM library * Fix Shapeshift tests --- js/npm/etherscan/README.md | 34 +++++++++++ js/npm/etherscan/package.json | 33 +++++++++++ js/{parity.md => npm/parity/README.md} | 4 +- .../parity/package.json} | 8 +-- js/npm/parity/test/smoke.spec.js | 26 +++++++++ js/npm/shapeshift/README.md | 34 +++++++++++ js/npm/shapeshift/package.json | 31 ++++++++++ js/npm/test/mocha.config.js | 29 ++++++++++ js/npm/test/mocha.opts | 1 + js/package.json | 2 +- js/scripts/dryrun-npm.sh | 33 +++++++++++ js/scripts/release.sh | 22 +++++--- js/src/3rdparty/etherscan/account.spec.js | 6 +- js/src/3rdparty/etherscan/stats.spec.js | 6 +- js/src/3rdparty/shapeshift/helpers.spec.js | 17 ++---- js/src/3rdparty/shapeshift/rpc.spec.js | 7 ++- js/src/3rdparty/shapeshift/shapeshift.js | 5 ++ js/src/3rdparty/shapeshift/shapeshift.spec.js | 6 +- js/src/library.etherscan.js | 34 +++++++++++ js/src/{library.js => library.parity.js} | 0 js/src/library.shapeshift.js | 34 +++++++++++ js/test/{npmLibrary.js => npmParity.js} | 4 +- js/webpack/npm.js | 56 +++++++++++++++++-- 23 files changed, 394 insertions(+), 38 deletions(-) create mode 100644 js/npm/etherscan/README.md create mode 100644 js/npm/etherscan/package.json rename js/{parity.md => npm/parity/README.md} (92%) rename js/{parity.package.json => npm/parity/package.json} (72%) create mode 100644 js/npm/parity/test/smoke.spec.js create mode 100644 js/npm/shapeshift/README.md create mode 100644 js/npm/shapeshift/package.json create mode 100644 js/npm/test/mocha.config.js create mode 100644 js/npm/test/mocha.opts create mode 100755 js/scripts/dryrun-npm.sh create mode 100644 js/src/library.etherscan.js rename js/src/{library.js => library.parity.js} (100%) create mode 100644 js/src/library.shapeshift.js rename js/test/{npmLibrary.js => npmParity.js} (92%) diff --git a/js/npm/etherscan/README.md b/js/npm/etherscan/README.md new file mode 100644 index 000000000..39c86d62b --- /dev/null +++ b/js/npm/etherscan/README.md @@ -0,0 +1,34 @@ +# @parity/Etherscan + +A thin, lightweight promise wrapper for the api.etherscan.io/apis service, exposing a common endpoint for use in JavaScript applications. + +[https://github.com/ethcore/parity/tree/master/js/src/3rdparty/etherscan](https://github.com/ethcore/parity/tree/master/js/src/3rdparty/etherscan) + +## usage + +installation - + +``` +npm install --save @parity/Etherscan +``` + +Usage - + +``` +const etherscan = require('@parity/Etherscan'); + +// api calls goes here +``` + +## api + +account (exposed on etherscan.account) - + +- `balance(address)` +- `balances(addresses)` (array or addresses) +- `transactions(address, page)` (page offset starts at 0, returns 25) + +stats (exposed on etherscan.stats) - + +- `price()` +- `supply()` diff --git a/js/npm/etherscan/package.json b/js/npm/etherscan/package.json new file mode 100644 index 000000000..80b1a38f8 --- /dev/null +++ b/js/npm/etherscan/package.json @@ -0,0 +1,33 @@ +{ + "name": "@parity/Etherscan", + "description": "The Parity Promise-based library for interfacing with Etherscan over HTTP", + "version": "0.0.0", + "main": "library.js", + "author": "Parity Team <admin@parity.io>", + "maintainers": [ + "Jaco Greeff" + ], + "contributors": [], + "license": "GPL-3.0", + "repository": { + "type": "git", + "url": "git+https://github.com/ethcore/parity.git" + }, + "keywords": [ + "Ethereum", + "ABI", + "API", + "RPC", + "Parity", + "Promise" + ], + "scripts": { + }, + "devDependencies": { + "chai": "3.5.0", + "mocha": "3.2.0" + }, + "dependencies": { + "node-fetch": "~1.6.3" + } +} diff --git a/js/parity.md b/js/npm/parity/README.md similarity index 92% rename from js/parity.md rename to js/npm/parity/README.md index 3e42f5c8d..30efd3b94 100644 --- a/js/parity.md +++ b/js/npm/parity/README.md @@ -1,7 +1,9 @@ -# parity.js +# @parity/parity.js Parity.js is a thin, fast, Promise-based wrapper around the Ethereum APIs. +[https://github.com/ethcore/parity/tree/master/js/src/api](https://github.com/ethcore/parity/tree/master/js/src/api) + ## installation Install the package with `npm install --save @parity/parity.js` diff --git a/js/parity.package.json b/js/npm/parity/package.json similarity index 72% rename from js/parity.package.json rename to js/npm/parity/package.json index 0974e072f..7b1fcebda 100644 --- a/js/parity.package.json +++ b/js/npm/parity/package.json @@ -1,6 +1,6 @@ { "name": "@parity/parity.js", - "description": "The Parity Promise-base API & ABI library for interfacing with Ethereum over RPC", + "description": "The Parity Promise-based API & ABI library for interfacing with Ethereum over RPC", "version": "0.0.0", "main": "library.js", "author": "Parity Team <admin@parity.io>", @@ -26,8 +26,8 @@ "devDependencies": { }, "dependencies": { - "bignumber.js": "^2.3.0", - "js-sha3": "^0.5.2", - "node-fetch": "^1.6.3" + "bignumber.js": "~2.3.0", + "js-sha3": "~0.5.2", + "node-fetch": "~1.6.3" } } diff --git a/js/npm/parity/test/smoke.spec.js b/js/npm/parity/test/smoke.spec.js new file mode 100644 index 000000000..9920b10d2 --- /dev/null +++ b/js/npm/parity/test/smoke.spec.js @@ -0,0 +1,26 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +const parity = require('../'); + +describe('load the Parity library', function () { + it('should no throw any error', () => { + expect(parity).to.be.ok; + + expect(parity.Api).to.be.ok; + expect(parity.Abi).to.be.ok; + }); +}); diff --git a/js/npm/shapeshift/README.md b/js/npm/shapeshift/README.md new file mode 100644 index 000000000..e12b7b7ef --- /dev/null +++ b/js/npm/shapeshift/README.md @@ -0,0 +1,34 @@ +# @parity/ShapeShift + +A thin ES6 promise wrapper around the shapeshift.io APIs as documented at https://shapeshift.io/api + +[https://github.com/ethcore/parity/tree/master/js/src/3rdparty/shapeshift](https://github.com/ethcore/parity/tree/master/js/src/3rdparty/shapeshift) + +## usage + +installation - + +``` +npm install --save @parity/ShapeShift +``` + +Usage - + +``` +const APIKEY = 'private affiliate key or undefined'; +const shapeshift = require('@parity/ShapeShift')(APIKEY); + +// api calls goes here +``` + +## api + +queries - + +- `getCoins()` [https://shapeshift.io/api#api-104](https://shapeshift.io/api#api-104) +- `getMarketInfo(pair)` [https://shapeshift.io/api#api-103](https://shapeshift.io/api#api-103) +- `getStatus(depositAddress)` [https://shapeshift.io/api#api-5](https://shapeshift.io/api#api-5) + +transactions - + +- `shift(toAddress, returnAddress, pair)` [https://shapeshift.io/api#api-7](https://shapeshift.io/api#api-7) diff --git a/js/npm/shapeshift/package.json b/js/npm/shapeshift/package.json new file mode 100644 index 000000000..c163b0e5f --- /dev/null +++ b/js/npm/shapeshift/package.json @@ -0,0 +1,31 @@ +{ + "name": "@parity/ShapeShift", + "description": "The Parity Promise-based library for interfacing with ShapeShift over HTTP", + "version": "0.0.0", + "main": "library.js", + "author": "Parity Team <admin@parity.io>", + "maintainers": [ + "Jaco Greeff" + ], + "contributors": [], + "license": "GPL-3.0", + "repository": { + "type": "git", + "url": "git+https://github.com/ethcore/parity.git" + }, + "keywords": [ + "Ethereum", + "ABI", + "API", + "RPC", + "Parity", + "Promise" + ], + "scripts": { + }, + "devDependencies": { + }, + "dependencies": { + "node-fetch": "~1.6.3" + } +} diff --git a/js/npm/test/mocha.config.js b/js/npm/test/mocha.config.js new file mode 100644 index 000000000..2b871f518 --- /dev/null +++ b/js/npm/test/mocha.config.js @@ -0,0 +1,29 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +const chai = require('chai'); +// const chaiAsPromised from 'chai-as-promised'; +// const chaiEnzyme from 'chai-enzyme'; +// const sinonChai from 'sinon-chai'; + +// chai.use(chaiAsPromised); +// chai.use(chaiEnzyme()); +// chai.use(sinonChai); + +// expose expect to global so we won't have to manually import & define it in every test +global.expect = chai.expect; + +module.exports = {}; diff --git a/js/npm/test/mocha.opts b/js/npm/test/mocha.opts new file mode 100644 index 000000000..0ed8269b4 --- /dev/null +++ b/js/npm/test/mocha.opts @@ -0,0 +1 @@ +-r ./test/mocha.config diff --git a/js/package.json b/js/package.json index f0e925fe4..4a15e9fee 100644 --- a/js/package.json +++ b/js/package.json @@ -43,7 +43,7 @@ "test": "NODE_ENV=test mocha 'src/**/*.spec.js'", "test:coverage": "NODE_ENV=test istanbul cover _mocha -- 'src/**/*.spec.js'", "test:e2e": "NODE_ENV=test mocha 'src/**/*.e2e.js'", - "test:npm": "(cd .npmjs && npm i) && node test/npmLibrary && (rm -rf .npmjs/node_modules)", + "test:npm": "(cd .npmjs && npm i) && node test/npmParity && (rm -rf .npmjs/node_modules)", "prepush": "npm run lint:cached" }, "devDependencies": { diff --git a/js/scripts/dryrun-npm.sh b/js/scripts/dryrun-npm.sh new file mode 100755 index 000000000..21e00f157 --- /dev/null +++ b/js/scripts/dryrun-npm.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e + +# variables +PACKAGES=( "Parity" "Etherscan" "ShapeShift" ) + +# change into the build directory +BASEDIR=`dirname $0` +cd $BASEDIR/.. + +# build all packages +echo "*** Building packages for npmjs" +echo "$NPM_TOKEN" >> ~/.npmrc + +for PACKAGE in ${PACKAGES[@]} +do + echo "*** Building $PACKAGE" + LIBRARY=$PACKAGE npm run ci:build:npm + DIRECTORY=.npmjs/$(echo $PACKAGE | tr '[:upper:]' '[:lower:]') + + cd $DIRECTORY + echo "*** Executing $PACKAGE tests from $DIRECTORY" + npm test + + echo "*** Publishing $PACKAGE from $DIRECTORY" + echo "npm publish --access public || true" + cd ../.. + +done +cd .. + +# exit with exit code +exit 0 diff --git a/js/scripts/release.sh b/js/scripts/release.sh index 1cf3095ef..e120aaf95 100755 --- a/js/scripts/release.sh +++ b/js/scripts/release.sh @@ -3,7 +3,7 @@ set -e # variables UTCDATE=`date -u "+%Y%m%d-%H%M%S"` -PACKAGES=( "parity.js" ) +PACKAGES=( "Parity" "Etherscan" "ShapeShift" ) BRANCH=$CI_BUILD_REF_NAME GIT_JS_PRECOMPILED="https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/js-precompiled.git" GIT_PARITY="https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/parity.git" @@ -59,19 +59,27 @@ git reset --hard origin/$BRANCH 2>$GITLOG if [ "$BRANCH" == "master" ]; then cd js + echo "*** Bumping package.json patch version" npm --no-git-tag-version version npm version patch echo "*** Building packages for npmjs" - # echo -e "$NPM_USERNAME\n$NPM_PASSWORD\n$NPM_EMAIL" | npm login echo "$NPM_TOKEN" >> ~/.npmrc - npm run ci:build:npm - echo "*** Publishing $PACKAGE to npmjs" - cd .npmjs - npm publish --access public || true - cd ../.. + for PACKAGE in ${PACKAGES[@]} + do + echo "*** Building $PACKAGE" + LIBRARY=$PACKAGE npm run ci:build:npm + DIRECTORY=.npmjs/$(echo $PACKAGE | tr '[:upper:]' '[:lower:]') + + echo "*** Publishing $PACKAGE from $DIRECTORY" + cd $DIRECTORY + npm publish --access public || true + cd ../.. + done + + cd .. fi echo "*** Updating cargo parity-ui-precompiled#$PRECOMPILED_HASH" diff --git a/js/src/3rdparty/etherscan/account.spec.js b/js/src/3rdparty/etherscan/account.spec.js index 283fab3d2..9dc36c254 100644 --- a/js/src/3rdparty/etherscan/account.spec.js +++ b/js/src/3rdparty/etherscan/account.spec.js @@ -14,11 +14,13 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import etherscan from './'; +const etherscan = require('./'); const TESTADDR = '0xbf885e2b55c6bcc84556a3c5f07d3040833c8d00'; -describe.skip('etherscan/account', () => { +describe.skip('etherscan/account', function () { + this.timeout(60 * 1000); + const checkBalance = function (balance, addr) { expect(balance).to.be.ok; expect(balance.account).to.equal(addr); diff --git a/js/src/3rdparty/etherscan/stats.spec.js b/js/src/3rdparty/etherscan/stats.spec.js index fde2b035c..62152b6be 100644 --- a/js/src/3rdparty/etherscan/stats.spec.js +++ b/js/src/3rdparty/etherscan/stats.spec.js @@ -14,9 +14,11 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import etherscan from './'; +const etherscan = require('./'); + +describe.skip('etherscan/stats', function () { + this.timeout(60 * 1000); -describe.skip('etherscan/stats', () => { it('retrieves the latest price', () => { return etherscan.stats .price() diff --git a/js/src/3rdparty/shapeshift/helpers.spec.js b/js/src/3rdparty/shapeshift/helpers.spec.js index a82b2f6c3..f2ea0f3f9 100644 --- a/js/src/3rdparty/shapeshift/helpers.spec.js +++ b/js/src/3rdparty/shapeshift/helpers.spec.js @@ -14,22 +14,15 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import chai from 'chai'; -import nock from 'nock'; +const nock = require('nock'); -global.expect = chai.expect; // eslint-disable-line no-undef - -import 'isomorphic-fetch'; -import es6Promise from 'es6-promise'; -es6Promise.polyfill(); - -import initShapeshift from './'; -import initRpc from './rpc'; +const ShapeShift = require('./'); +const initShapeshift = (ShapeShift.default || ShapeShift); const APIKEY = '0x123454321'; const shapeshift = initShapeshift(APIKEY); -const rpc = initRpc(APIKEY); +const rpc = shapeshift.getRpc(); function mockget (requests) { let scope = nock(rpc.ENDPOINT); @@ -62,7 +55,7 @@ function mockpost (requests) { return scope; } -export { +module.exports = { APIKEY, mockget, mockpost, diff --git a/js/src/3rdparty/shapeshift/rpc.spec.js b/js/src/3rdparty/shapeshift/rpc.spec.js index 8de9e8641..47d4e0052 100644 --- a/js/src/3rdparty/shapeshift/rpc.spec.js +++ b/js/src/3rdparty/shapeshift/rpc.spec.js @@ -14,7 +14,12 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import { APIKEY, mockget, mockpost, rpc } from './helpers.spec.js'; +const helpers = require('./helpers.spec.js'); + +const APIKEY = helpers.APIKEY; +const mockget = helpers.mockget; +const mockpost = helpers.mockpost; +const rpc = helpers.rpc; describe('shapeshift/rpc', () => { describe('GET', () => { diff --git a/js/src/3rdparty/shapeshift/shapeshift.js b/js/src/3rdparty/shapeshift/shapeshift.js index 8f388d0a7..5743fcac1 100644 --- a/js/src/3rdparty/shapeshift/shapeshift.js +++ b/js/src/3rdparty/shapeshift/shapeshift.js @@ -26,6 +26,10 @@ export default function (rpc) { return rpc.get(`marketinfo/${pair}`); } + function getRpc () { + return rpc; + } + function getStatus (depositAddress) { return rpc.get(`txStat/${depositAddress}`); } @@ -103,6 +107,7 @@ export default function (rpc) { return { getCoins, getMarketInfo, + getRpc, getStatus, shift, subscribe, diff --git a/js/src/3rdparty/shapeshift/shapeshift.spec.js b/js/src/3rdparty/shapeshift/shapeshift.spec.js index 36b1506a2..01180e130 100644 --- a/js/src/3rdparty/shapeshift/shapeshift.spec.js +++ b/js/src/3rdparty/shapeshift/shapeshift.spec.js @@ -14,7 +14,11 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import { mockget, mockpost, shapeshift } from './helpers.spec.js'; +const helpers = require('./helpers.spec.js'); + +const mockget = helpers.mockget; +const mockpost = helpers.mockpost; +const shapeshift = helpers.shapeshift; describe('shapeshift/calls', () => { describe('getCoins', () => { diff --git a/js/src/library.etherscan.js b/js/src/library.etherscan.js new file mode 100644 index 000000000..59cb861d3 --- /dev/null +++ b/js/src/library.etherscan.js @@ -0,0 +1,34 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import 'babel-polyfill/dist/polyfill.js'; +import es6Promise from 'es6-promise'; +es6Promise.polyfill(); + +const isNode = typeof global !== 'undefined' && typeof global !== 'undefined'; +const isBrowser = typeof self !== 'undefined' && typeof self.window !== 'undefined'; + +if (isBrowser) { + require('whatwg-fetch'); +} + +if (isNode) { + global.fetch = require('node-fetch'); +} + +import Etherscan from './3rdparty/etherscan'; + +module.exports = Etherscan; diff --git a/js/src/library.js b/js/src/library.parity.js similarity index 100% rename from js/src/library.js rename to js/src/library.parity.js diff --git a/js/src/library.shapeshift.js b/js/src/library.shapeshift.js new file mode 100644 index 000000000..3f24f216b --- /dev/null +++ b/js/src/library.shapeshift.js @@ -0,0 +1,34 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import 'babel-polyfill/dist/polyfill.js'; +import es6Promise from 'es6-promise'; +es6Promise.polyfill(); + +const isNode = typeof global !== 'undefined' && typeof global !== 'undefined'; +const isBrowser = typeof self !== 'undefined' && typeof self.window !== 'undefined'; + +if (isBrowser) { + require('whatwg-fetch'); +} + +if (isNode) { + global.fetch = require('node-fetch'); +} + +import ShapeShift from './3rdparty/shapeshift'; + +module.exports = ShapeShift; diff --git a/js/test/npmLibrary.js b/js/test/npmParity.js similarity index 92% rename from js/test/npmLibrary.js rename to js/test/npmParity.js index 63d8f9515..6e125e9e2 100644 --- a/js/test/npmLibrary.js +++ b/js/test/npmParity.js @@ -15,8 +15,8 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. try { - var Api = require('../.npmjs/library.js').Api; - var Abi = require('../.npmjs/library.js').Abi; + var Api = require('../.npmjs/parity/library.js').Api; + var Abi = require('../.npmjs/parity/library.js').Abi; if (typeof Api !== 'function') { throw new Error('No Api'); diff --git a/js/webpack/npm.js b/js/webpack/npm.js index 7353efe55..a1bbaeda9 100644 --- a/js/webpack/npm.js +++ b/js/webpack/npm.js @@ -23,14 +23,27 @@ const Shared = require('./shared'); const ENV = process.env.NODE_ENV || 'development'; const isProd = ENV === 'production'; +const LIBRARY = process.env.LIBRARY; +if (!LIBRARY) { + process.exit(-1); +} +const SRC = LIBRARY.toLowerCase(); +const OUTPUT_PATH = path.join(__dirname, '../.npmjs', SRC); + +const TEST_CONTEXT = SRC === 'parity' + ? '../npm/parity/test/' + : `../src/3rdparty/${SRC}/`; + +console.log(`Building ${LIBRARY} from library.${SRC}.js to .npmjs/${SRC}`); + module.exports = { context: path.join(__dirname, '../src'), target: 'node', - entry: 'library.js', + entry: `library.${SRC}.js`, output: { - path: path.join(__dirname, '../.npmjs'), + path: OUTPUT_PATH, filename: 'library.js', - library: 'Parity', + library: LIBRARY, libraryTarget: 'umd', umdNamedDefine: true }, @@ -66,19 +79,52 @@ module.exports = { plugins: Shared.getPlugins().concat([ new CopyWebpackPlugin([ { - from: '../parity.package.json', + from: `../npm/${SRC}/package.json`, to: 'package.json', transform: function (content, path) { const json = JSON.parse(content.toString()); json.version = packageJson.version; + + // Add tests dependencies to Dev Deps + json.devDependencies.chai = packageJson.devDependencies.chai; + json.devDependencies.mocha = packageJson.devDependencies.mocha; + json.devDependencies.nock = packageJson.devDependencies.nock; + + // Add test script + json.scripts.test = 'mocha \'test/*.spec.js\''; + return new Buffer(JSON.stringify(json, null, ' '), 'utf-8'); } }, { from: '../LICENSE' }, + + // Copy the base test config { - from: '../parity.md', + from: '../npm/test', + to: 'test' + }, + + // Copy the actual tests + { + context: TEST_CONTEXT, + from: '**/*.spec.js', + to: 'test', + transform: function (content, path) { + let output = content.toString(); + + // Don't skip tests + output = output.replace(/describe\.skip/, 'describe'); + + // Require parent library + output = output.replace('require(\'./\')', 'require(\'../\')'); + + return new Buffer(output, 'utf-8'); + } + }, + { + from: `../npm/${SRC}/README.md`, to: 'README.md' } ], { copyUnmodified: true }) From 17dee5f1a2595b51da6fc18f6a9f86dee98b18de Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 09:22:07 +0000 Subject: [PATCH 105/131] [ci skip] js-precompiled 20161211-091947 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cef7a4a24..653a51224 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#45b91accfc947de126e00472874554f04739ac43" +source = "git+https://github.com/ethcore/js-precompiled.git#52ce19ee74fdea46aead753065908afce57297af" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 4a15e9fee..5d23998b0 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.108", + "version": "0.2.109", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 0a37288aa4412087aae4126984775c44736d8e38 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jacogr@gmail.com> Date: Sun, 11 Dec 2016 10:30:30 +0100 Subject: [PATCH 106/131] Lowercase npm packages (#3807) --- js/npm/etherscan/README.md | 6 +++--- js/npm/etherscan/package.json | 2 +- js/npm/shapeshift/README.md | 6 +++--- js/npm/shapeshift/package.json | 2 +- js/scripts/dryrun-npm.sh | 4 ++-- js/scripts/release.sh | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/js/npm/etherscan/README.md b/js/npm/etherscan/README.md index 39c86d62b..8130db3c6 100644 --- a/js/npm/etherscan/README.md +++ b/js/npm/etherscan/README.md @@ -1,4 +1,4 @@ -# @parity/Etherscan +# @parity/etherscan A thin, lightweight promise wrapper for the api.etherscan.io/apis service, exposing a common endpoint for use in JavaScript applications. @@ -9,13 +9,13 @@ A thin, lightweight promise wrapper for the api.etherscan.io/apis service, expos installation - ``` -npm install --save @parity/Etherscan +npm install --save @parity/etherscan ``` Usage - ``` -const etherscan = require('@parity/Etherscan'); +const etherscan = require('@parity/etherscan'); // api calls goes here ``` diff --git a/js/npm/etherscan/package.json b/js/npm/etherscan/package.json index 80b1a38f8..0cfdf83e1 100644 --- a/js/npm/etherscan/package.json +++ b/js/npm/etherscan/package.json @@ -1,5 +1,5 @@ { - "name": "@parity/Etherscan", + "name": "@parity/etherscan", "description": "The Parity Promise-based library for interfacing with Etherscan over HTTP", "version": "0.0.0", "main": "library.js", diff --git a/js/npm/shapeshift/README.md b/js/npm/shapeshift/README.md index e12b7b7ef..0544b6f99 100644 --- a/js/npm/shapeshift/README.md +++ b/js/npm/shapeshift/README.md @@ -1,4 +1,4 @@ -# @parity/ShapeShift +# @parity/shapeshift A thin ES6 promise wrapper around the shapeshift.io APIs as documented at https://shapeshift.io/api @@ -9,14 +9,14 @@ A thin ES6 promise wrapper around the shapeshift.io APIs as documented at https: installation - ``` -npm install --save @parity/ShapeShift +npm install --save @parity/shapeshift ``` Usage - ``` const APIKEY = 'private affiliate key or undefined'; -const shapeshift = require('@parity/ShapeShift')(APIKEY); +const shapeshift = require('@parity/shapeshift')(APIKEY); // api calls goes here ``` diff --git a/js/npm/shapeshift/package.json b/js/npm/shapeshift/package.json index c163b0e5f..b0a2c460a 100644 --- a/js/npm/shapeshift/package.json +++ b/js/npm/shapeshift/package.json @@ -1,5 +1,5 @@ { - "name": "@parity/ShapeShift", + "name": "@parity/shapeshift", "description": "The Parity Promise-based library for interfacing with ShapeShift over HTTP", "version": "0.0.0", "main": "library.js", diff --git a/js/scripts/dryrun-npm.sh b/js/scripts/dryrun-npm.sh index 21e00f157..6d9412f62 100755 --- a/js/scripts/dryrun-npm.sh +++ b/js/scripts/dryrun-npm.sh @@ -2,7 +2,7 @@ set -e # variables -PACKAGES=( "Parity" "Etherscan" "ShapeShift" ) +PACKAGES=( "parity" "etherscan" "shapeshift" ) # change into the build directory BASEDIR=`dirname $0` @@ -16,7 +16,7 @@ for PACKAGE in ${PACKAGES[@]} do echo "*** Building $PACKAGE" LIBRARY=$PACKAGE npm run ci:build:npm - DIRECTORY=.npmjs/$(echo $PACKAGE | tr '[:upper:]' '[:lower:]') + DIRECTORY=.npmjs/$PACKAGE cd $DIRECTORY echo "*** Executing $PACKAGE tests from $DIRECTORY" diff --git a/js/scripts/release.sh b/js/scripts/release.sh index e120aaf95..88422df0a 100755 --- a/js/scripts/release.sh +++ b/js/scripts/release.sh @@ -3,7 +3,7 @@ set -e # variables UTCDATE=`date -u "+%Y%m%d-%H%M%S"` -PACKAGES=( "Parity" "Etherscan" "ShapeShift" ) +PACKAGES=( "parity" "etherscan" "shapeshift" ) BRANCH=$CI_BUILD_REF_NAME GIT_JS_PRECOMPILED="https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/js-precompiled.git" GIT_PARITY="https://${GITHUB_JS_PRECOMPILED}:@github.com/ethcore/parity.git" @@ -71,7 +71,7 @@ if [ "$BRANCH" == "master" ]; then do echo "*** Building $PACKAGE" LIBRARY=$PACKAGE npm run ci:build:npm - DIRECTORY=.npmjs/$(echo $PACKAGE | tr '[:upper:]' '[:lower:]') + DIRECTORY=.npmjs/$PACKAGE echo "*** Publishing $PACKAGE from $DIRECTORY" cd $DIRECTORY From 95af942fc9f5931e7c0784de460041cbefccd784 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 09:40:44 +0000 Subject: [PATCH 107/131] [ci skip] js-precompiled 20161211-093638 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 653a51224..c15b82879 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#52ce19ee74fdea46aead753065908afce57297af" +source = "git+https://github.com/ethcore/js-precompiled.git#4465ba44b8f698640f2355508245f7f9e370343b" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 5d23998b0..a8b156dd2 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.109", + "version": "0.2.110", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 9252ebf93d0a62d6306f3306ccc08fef28a57807 Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Sun, 11 Dec 2016 12:50:48 +0100 Subject: [PATCH 108/131] block: enforce gas limit falls within engine bounds --- ethcore/src/block.rs | 3 ++- ethcore/src/engines/mod.rs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index bcbceb9aa..d37920c3e 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -266,7 +266,8 @@ impl<'x> OpenBlock<'x> { r.block.base.header.set_extra_data(extra_data); r.block.base.header.note_dirty(); - engine.populate_from_parent(&mut r.block.base.header, parent, gas_range_target.0, gas_range_target.1); + let gas_floor_target = ::std::cmp::max(gas_range_target.0, engine.params().min_gas_limit); + engine.populate_from_parent(&mut r.block.base.header, parent, gas_floor_target, gas_range_target.1); engine.on_new_block(&mut r.block); Ok(r) } diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index 8e407f0b7..1aab5f8f4 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -125,8 +125,9 @@ pub trait Engine : Sync + Send { self.verify_block_basic(header, None).and_then(|_| self.verify_block_unordered(header, None)) } - /// Don't forget to call Super::populate_from_parent when subclassing & overriding. - // TODO: consider including State in the params. + /// Populate a header's fields based on its parent's header. + /// Takes gas floor and ceiling targets. + /// The gas floor target must not be lower than the engine's minimum gas limit. fn populate_from_parent(&self, header: &mut Header, parent: &Header, _gas_floor_target: U256, _gas_ceil_target: U256) { header.set_difficulty(parent.difficulty().clone()); header.set_gas_limit(parent.gas_limit().clone()); From a56443aa6c208cca1450d4af7564e7557980d71d Mon Sep 17 00:00:00 2001 From: arkpar <arkady.paronyan@gmail.com> Date: Sun, 11 Dec 2016 13:00:49 +0100 Subject: [PATCH 109/131] Tolerate error is user_defaults --- parity/user_defaults.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/parity/user_defaults.rs b/parity/user_defaults.rs index a1078b634..652abfea1 100644 --- a/parity/user_defaults.rs +++ b/parity/user_defaults.rs @@ -128,7 +128,13 @@ impl Default for UserDefaults { impl UserDefaults { pub fn load<P>(path: P) -> Result<Self, String> where P: AsRef<Path> { match File::open(path) { - Ok(file) => from_reader(file).map_err(|e| e.to_string()), + Ok(file) => match from_reader(file) { + Ok(defaults) => Ok(defaults), + Err(e) => { + warn!("Error loading user defaults file: {:?}", e); + Ok(UserDefaults::default()) + }, + }, _ => Ok(UserDefaults::default()), } } From d3077c51fcd0638878ba3478987a954f7a1adbc1 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sun, 11 Dec 2016 15:05:10 +0100 Subject: [PATCH 110/131] Target Babel to latest Chrome Versions in dev (#3806) * Use `babel-preset-env` to target Babel to latest Chrome Versions * Opt-In mechanism for Babel Preset Env --- js/package.json | 1 + js/webpack/shared.js | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/js/package.json b/js/package.json index a8b156dd2..120ebb094 100644 --- a/js/package.json +++ b/js/package.json @@ -59,6 +59,7 @@ "babel-plugin-transform-runtime": "6.15.0", "babel-plugin-webpack-alias": "2.1.2", "babel-polyfill": "6.20.0", + "babel-preset-env": "1.0.2", "babel-preset-es2015": "6.18.0", "babel-preset-es2016": "6.16.0", "babel-preset-es2017": "6.16.0", diff --git a/js/webpack/shared.js b/js/webpack/shared.js index 8b6807b2a..3c593fd87 100644 --- a/js/webpack/shared.js +++ b/js/webpack/shared.js @@ -36,6 +36,29 @@ function getBabelrc () { // [ "es2015", { "modules": false } ] babelrc.presets[es2015Index] = [ 'es2015', { modules: false } ]; babelrc['babelrc'] = false; + + const BABEL_PRESET_ENV = process.env.BABEL_PRESET_ENV; + const npmStart = process.env.npm_lifecycle_event === 'start'; + const npmStartApp = process.env.npm_lifecycle_event === 'start:app'; + + if (BABEL_PRESET_ENV && (npmStart || npmStartApp)) { + console.log('using babel-preset-env'); + + babelrc.presets = [ + // 'es2017', + 'stage-0', 'react', + [ + 'env', + { + targets: { browsers: ['last 2 Chrome versions'] }, + modules: false, + loose: true, + useBuiltIns: true + } + ] + ]; + } + return babelrc; } From 778f5bbfaf285fcdcf4ab4852696980638d975ed Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 14:14:41 +0000 Subject: [PATCH 111/131] [ci skip] js-precompiled 20161211-141210 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c15b82879..cae9d6744 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#4465ba44b8f698640f2355508245f7f9e370343b" +source = "git+https://github.com/ethcore/js-precompiled.git#3e04f32403aab917a149d54f4191263f1c79f5ce" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 120ebb094..577ec6f14 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.110", + "version": "0.2.111", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 6724f574d639fb9df6b9dd9c464a8a5aecd9bdbe Mon Sep 17 00:00:00 2001 From: Robert Habermeier <rphmeier@gmail.com> Date: Sun, 11 Dec 2016 15:40:31 +0100 Subject: [PATCH 112/131] Light server improvements and protocol adjustments (#3801) * light: basic transaction pool * light: network timeouts * fix dead code warnings * les: update to new message format * fix indentation * les: hash or number in headers req, not both --- ethcore/light/src/client.rs | 19 +- ethcore/light/src/lib.rs | 3 +- ethcore/light/src/net/context.rs | 122 +++++------ ethcore/light/src/net/mod.rs | 277 +++++++++++++++---------- ethcore/light/src/net/tests/mod.rs | 53 +++-- ethcore/light/src/provider.rs | 28 ++- ethcore/light/src/types/les_request.rs | 29 ++- 7 files changed, 312 insertions(+), 219 deletions(-) diff --git a/ethcore/light/src/client.rs b/ethcore/light/src/client.rs index 0035406dc..fcfff81e6 100644 --- a/ethcore/light/src/client.rs +++ b/ethcore/light/src/client.rs @@ -14,8 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -//! Light client implementation. Used for raw data queries as well as the header -//! sync. +//! Light client implementation. Stores data from light sync use std::sync::Arc; @@ -29,7 +28,7 @@ use ethcore::transaction::SignedTransaction; use ethcore::blockchain_info::BlockChainInfo; use io::IoChannel; -use util::hash::H256; +use util::hash::{H256, H256FastMap}; use util::{Bytes, Mutex}; use provider::Provider; @@ -37,9 +36,10 @@ use request; /// Light client implementation. pub struct Client { - engine: Arc<Engine>, + _engine: Arc<Engine>, header_queue: HeaderQueue, - message_channel: Mutex<IoChannel<ClientIoMessage>>, + _message_channel: Mutex<IoChannel<ClientIoMessage>>, + tx_pool: Mutex<H256FastMap<SignedTransaction>>, } impl Client { @@ -55,12 +55,17 @@ impl Client { false } + /// Import a local transaction. + pub fn import_own_transaction(&self, tx: SignedTransaction) { + self.tx_pool.lock().insert(tx.hash(), tx); + } + /// Fetch a vector of all pending transactions. pub fn pending_transactions(&self) -> Vec<SignedTransaction> { - vec![] + self.tx_pool.lock().values().cloned().collect() } - /// Inquire about the status of a given block. + /// Inquire about the status of a given block (or header). pub fn status(&self, _id: BlockId) -> BlockStatus { BlockStatus::Unknown } diff --git a/ethcore/light/src/lib.rs b/ethcore/light/src/lib.rs index 7fa2f5911..f9008ac7c 100644 --- a/ethcore/light/src/lib.rs +++ b/ethcore/light/src/lib.rs @@ -28,8 +28,7 @@ //! It starts by performing a header-only sync, verifying random samples //! of members of the chain to varying degrees. -// TODO: remove when integrating with the rest of parity. -#![allow(dead_code)] +#![deny(missing_docs)] pub mod client; pub mod net; diff --git a/ethcore/light/src/net/context.rs b/ethcore/light/src/net/context.rs index c05e69b0f..96c217895 100644 --- a/ethcore/light/src/net/context.rs +++ b/ethcore/light/src/net/context.rs @@ -26,95 +26,95 @@ use request::Request; /// disconnecting peers. This is used as a generalization of the portions /// of a p2p network which the light protocol structure makes use of. pub trait IoContext { - /// Send a packet to a specific peer. - fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec<u8>); + /// Send a packet to a specific peer. + fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec<u8>); - /// Respond to a peer's message. Only works if this context is a byproduct - /// of a packet handler. - fn respond(&self, packet_id: u8, packet_body: Vec<u8>); + /// Respond to a peer's message. Only works if this context is a byproduct + /// of a packet handler. + fn respond(&self, packet_id: u8, packet_body: Vec<u8>); - /// Disconnect a peer. - fn disconnect_peer(&self, peer: PeerId); + /// Disconnect a peer. + fn disconnect_peer(&self, peer: PeerId); - /// Disable a peer -- this is a disconnect + a time-out. - fn disable_peer(&self, peer: PeerId); + /// Disable a peer -- this is a disconnect + a time-out. + fn disable_peer(&self, peer: PeerId); - /// Get a peer's protocol version. - fn protocol_version(&self, peer: PeerId) -> Option<u8>; + /// Get a peer's protocol version. + fn protocol_version(&self, peer: PeerId) -> Option<u8>; } impl<'a> IoContext for NetworkContext<'a> { - fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec<u8>) { - if let Err(e) = self.send(peer, packet_id, packet_body) { - debug!(target: "les", "Error sending packet to peer {}: {}", peer, e); - } - } + fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec<u8>) { + if let Err(e) = self.send(peer, packet_id, packet_body) { + debug!(target: "les", "Error sending packet to peer {}: {}", peer, e); + } + } - fn respond(&self, packet_id: u8, packet_body: Vec<u8>) { - if let Err(e) = self.respond(packet_id, packet_body) { - debug!(target: "les", "Error responding to peer message: {}", e); - } - } + fn respond(&self, packet_id: u8, packet_body: Vec<u8>) { + if let Err(e) = self.respond(packet_id, packet_body) { + debug!(target: "les", "Error responding to peer message: {}", e); + } + } - fn disconnect_peer(&self, peer: PeerId) { - NetworkContext::disconnect_peer(self, peer); - } + fn disconnect_peer(&self, peer: PeerId) { + NetworkContext::disconnect_peer(self, peer); + } - fn disable_peer(&self, peer: PeerId) { - NetworkContext::disable_peer(self, peer); - } + fn disable_peer(&self, peer: PeerId) { + NetworkContext::disable_peer(self, peer); + } - fn protocol_version(&self, peer: PeerId) -> Option<u8> { - self.protocol_version(self.subprotocol_name(), peer) - } + fn protocol_version(&self, peer: PeerId) -> Option<u8> { + self.protocol_version(self.subprotocol_name(), peer) + } } /// Context for a protocol event. pub trait EventContext { - /// Get the peer relevant to the event e.g. message sender, - /// disconnected/connected peer. - fn peer(&self) -> PeerId; + /// Get the peer relevant to the event e.g. message sender, + /// disconnected/connected peer. + fn peer(&self) -> PeerId; - /// Make a request from a peer. - fn request_from(&self, peer: PeerId, request: Request) -> Result<ReqId, Error>; + /// Make a request from a peer. + fn request_from(&self, peer: PeerId, request: Request) -> Result<ReqId, Error>; - /// Make an announcement of new capabilities to the rest of the peers. - // TODO: maybe just put this on a timer in LightProtocol? - fn make_announcement(&self, announcement: Announcement); + /// Make an announcement of new capabilities to the rest of the peers. + // TODO: maybe just put this on a timer in LightProtocol? + fn make_announcement(&self, announcement: Announcement); - /// Disconnect a peer. - fn disconnect_peer(&self, peer: PeerId); + /// Disconnect a peer. + fn disconnect_peer(&self, peer: PeerId); - /// Disable a peer. - fn disable_peer(&self, peer: PeerId); + /// Disable a peer. + fn disable_peer(&self, peer: PeerId); } /// Concrete implementation of `EventContext` over the light protocol struct and /// an io context. pub struct Ctx<'a> { - /// Io context to enable immediate response to events. - pub io: &'a IoContext, - /// Protocol implementation. - pub proto: &'a LightProtocol, - /// Relevant peer for event. - pub peer: PeerId, + /// Io context to enable immediate response to events. + pub io: &'a IoContext, + /// Protocol implementation. + pub proto: &'a LightProtocol, + /// Relevant peer for event. + pub peer: PeerId, } impl<'a> EventContext for Ctx<'a> { - fn peer(&self) -> PeerId { self.peer } - fn request_from(&self, peer: PeerId, request: Request) -> Result<ReqId, Error> { - self.proto.request_from(self.io, &peer, request) - } + fn peer(&self) -> PeerId { self.peer } + fn request_from(&self, peer: PeerId, request: Request) -> Result<ReqId, Error> { + self.proto.request_from(self.io, &peer, request) + } - fn make_announcement(&self, announcement: Announcement) { - self.proto.make_announcement(self.io, announcement); - } + fn make_announcement(&self, announcement: Announcement) { + self.proto.make_announcement(self.io, announcement); + } - fn disconnect_peer(&self, peer: PeerId) { - self.io.disconnect_peer(peer); - } + fn disconnect_peer(&self, peer: PeerId) { + self.io.disconnect_peer(peer); + } - fn disable_peer(&self, peer: PeerId) { - self.io.disable_peer(peer); - } + fn disable_peer(&self, peer: PeerId) { + self.io.disable_peer(peer); + } } \ No newline at end of file diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 481740a48..e5bf0cb2b 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -34,7 +34,7 @@ use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering}; use provider::Provider; -use request::{self, Request}; +use request::{self, HashOrNumber, Request}; use self::buffer_flow::{Buffer, FlowParams}; use self::context::Ctx; @@ -57,13 +57,13 @@ const TIMEOUT_INTERVAL_MS: u64 = 1000; // minimum interval between updates. const UPDATE_INTERVAL_MS: i64 = 5000; -// Supported protocol versions. +/// Supported protocol versions. pub const PROTOCOL_VERSIONS: &'static [u8] = &[1]; -// Max protocol version. +/// Max protocol version. pub const MAX_PROTOCOL_VERSION: u8 = 1; -// Packet count for LES. +/// Packet count for LES. pub const PACKET_COUNT: u8 = 15; // packet ID definitions. @@ -102,6 +102,18 @@ mod packet { pub const HEADER_PROOFS: u8 = 0x0e; } +// timeouts for different kinds of requests. all values are in milliseconds. +// TODO: variable timeouts based on request count. +mod timeout { + pub const HANDSHAKE: i64 = 2500; + pub const HEADERS: i64 = 5000; + pub const BODIES: i64 = 5000; + pub const RECEIPTS: i64 = 3500; + pub const PROOFS: i64 = 4000; + pub const CONTRACT_CODES: i64 = 5000; + pub const HEADER_PROOFS: i64 = 3500; +} + /// A request id. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct ReqId(usize); @@ -111,7 +123,6 @@ pub struct ReqId(usize); struct PendingPeer { sent_head: H256, last_update: SteadyTime, - proto_version: u8, } // data about each peer. @@ -122,7 +133,6 @@ struct Peer { remote_flow: Option<(Buffer, FlowParams)>, sent_head: H256, // last head we've given them. last_update: SteadyTime, - proto_version: u8, } impl Peer { @@ -443,17 +453,54 @@ impl LightProtocol { } }; - // if something went wrong, figure out how much to punish the peer. if let Err(e) = res { - match e.punishment() { - Punishment::None => {} - Punishment::Disconnect => { - debug!(target: "les", "Disconnecting peer {}: {}", peer, e); - io.disconnect_peer(*peer) - } - Punishment::Disable => { - debug!(target: "les", "Disabling peer {}: {}", peer, e); - io.disable_peer(*peer) + punish(*peer, io, e); + } + } + + // check timeouts and punish peers. + fn timeout_check(&self, io: &IoContext) { + let now = SteadyTime::now(); + + // handshake timeout + { + let mut pending = self.pending_peers.write(); + let slowpokes: Vec<_> = pending.iter() + .filter(|&(_, ref peer)| { + peer.last_update + Duration::milliseconds(timeout::HANDSHAKE) <= now + }) + .map(|(&p, _)| p) + .collect(); + + for slowpoke in slowpokes { + debug!(target: "les", "Peer {} handshake timed out", slowpoke); + pending.remove(&slowpoke); + io.disconnect_peer(slowpoke); + } + } + + // request timeouts + { + for r in self.pending_requests.read().values() { + let kind_timeout = match r.request.kind() { + request::Kind::Headers => timeout::HEADERS, + request::Kind::Bodies => timeout::BODIES, + request::Kind::Receipts => timeout::RECEIPTS, + request::Kind::StateProofs => timeout::PROOFS, + request::Kind::Codes => timeout::CONTRACT_CODES, + request::Kind::HeaderProofs => timeout::HEADER_PROOFS, + }; + + if r.timestamp + Duration::milliseconds(kind_timeout) <= now { + debug!(target: "les", "Request for {:?} from peer {} timed out", + r.request.kind(), r.peer_id); + + // keep the request in the `pending` set for now so + // on_disconnect will pass unfulfilled ReqIds to handlers. + // in the case that a response is received after this, the + // disconnect won't be cancelled but the ReqId won't be + // marked as abandoned. + io.disconnect_peer(r.peer_id); } } } @@ -463,19 +510,37 @@ impl LightProtocol { impl LightProtocol { // called when a peer connects. fn on_connect(&self, peer: &PeerId, io: &IoContext) { - let peer = *peer; + let proto_version = match io.protocol_version(*peer).ok_or(Error::WrongNetwork) { + Ok(pv) => pv, + Err(e) => { punish(*peer, io, e); return } + }; - trace!(target: "les", "Peer {} connecting", peer); - - match self.send_status(peer, io) { - Ok(pending_peer) => { - self.pending_peers.write().insert(peer, pending_peer); - } - Err(e) => { - trace!(target: "les", "Error while sending status: {}", e); - io.disconnect_peer(peer); - } + if PROTOCOL_VERSIONS.iter().find(|x| **x == proto_version).is_none() { + punish(*peer, io, Error::UnsupportedProtocolVersion(proto_version)); + return; } + + let chain_info = self.provider.chain_info(); + + let status = Status { + head_td: chain_info.total_difficulty, + head_hash: chain_info.best_block_hash, + head_num: chain_info.best_block_number, + genesis_hash: chain_info.genesis_hash, + protocol_version: proto_version as u32, // match peer proto version + network_id: self.network_id, + last_head: None, + }; + + let capabilities = self.capabilities.read().clone(); + let status_packet = status::write_handshake(&status, &capabilities, Some(&self.flow_params)); + + self.pending_peers.write().insert(*peer, PendingPeer { + sent_head: chain_info.best_block_hash, + last_update: SteadyTime::now(), + }); + + io.send(*peer, packet::STATUS, status_packet); } // called when a peer disconnects. @@ -508,38 +573,6 @@ impl LightProtocol { } } - // send status to a peer. - fn send_status(&self, peer: PeerId, io: &IoContext) -> Result<PendingPeer, Error> { - let proto_version = try!(io.protocol_version(peer).ok_or(Error::WrongNetwork)); - - if PROTOCOL_VERSIONS.iter().find(|x| **x == proto_version).is_none() { - return Err(Error::UnsupportedProtocolVersion(proto_version)); - } - - let chain_info = self.provider.chain_info(); - - let status = Status { - head_td: chain_info.total_difficulty, - head_hash: chain_info.best_block_hash, - head_num: chain_info.best_block_number, - genesis_hash: chain_info.genesis_hash, - protocol_version: proto_version as u32, // match peer proto version - network_id: self.network_id, - last_head: None, - }; - - let capabilities = self.capabilities.read().clone(); - let status_packet = status::write_handshake(&status, &capabilities, Some(&self.flow_params)); - - io.send(peer, packet::STATUS, status_packet); - - Ok(PendingPeer { - sent_head: chain_info.best_block_hash, - last_update: SteadyTime::now(), - proto_version: proto_version, - }) - } - // Handle status message from peer. fn status(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { let pending = match self.pending_peers.write().remove(peer) { @@ -570,7 +603,6 @@ impl LightProtocol { remote_flow: remote_flow, sent_head: pending.sent_head, last_update: pending.last_update, - proto_version: pending.proto_version, })); for handler in &self.handlers { @@ -630,7 +662,7 @@ impl LightProtocol { } // Handle a request for block headers. - fn get_block_headers(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { + fn get_block_headers(&self, peer: &PeerId, io: &IoContext, data: UntrustedRlp) -> Result<(), Error> { const MAX_HEADERS: usize = 512; let peers = self.peers.read(); @@ -645,18 +677,21 @@ impl LightProtocol { let mut peer = peer.lock(); let req_id: u64 = try!(data.val_at(0)); + let data = try!(data.at(1)); - let block = { - let rlp = try!(data.at(1)); - (try!(rlp.val_at(0)), try!(rlp.val_at(1))) + let start_block = { + if try!(data.at(0)).size() == 32 { + HashOrNumber::Hash(try!(data.val_at(0))) + } else { + HashOrNumber::Number(try!(data.val_at(0))) + } }; let req = request::Headers { - block_num: block.0, - block_hash: block.1, - max: ::std::cmp::min(MAX_HEADERS, try!(data.val_at(2))), - skip: try!(data.val_at(3)), - reverse: try!(data.val_at(4)), + start: start_block, + max: ::std::cmp::min(MAX_HEADERS, try!(data.val_at(1))), + skip: try!(data.val_at(2)), + reverse: try!(data.val_at(3)), }; let max_cost = try!(peer.deduct_max(&self.flow_params, request::Kind::Headers, req.max)); @@ -667,8 +702,8 @@ impl LightProtocol { let cur_buffer = peer.refund(&self.flow_params, max_cost - actual_cost); io.respond(packet::BLOCK_HEADERS, { - let mut stream = RlpStream::new_list(response.len() + 2); - stream.append(&req_id).append(&cur_buffer); + let mut stream = RlpStream::new_list(3); + stream.append(&req_id).append(&cur_buffer).begin_list(response.len()); for header in response { stream.append_raw(&header, 1); @@ -683,7 +718,7 @@ impl LightProtocol { // Receive a response for block headers. fn block_headers(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::Headers, &raw)); - let raw_headers: Vec<_> = raw.iter().skip(2).map(|x| x.as_raw().to_owned()).collect(); + let raw_headers: Vec<_> = try!(raw.at(2)).iter().map(|x| x.as_raw().to_owned()).collect(); for handler in &self.handlers { handler.on_block_headers(&Ctx { @@ -713,7 +748,7 @@ impl LightProtocol { let req_id: u64 = try!(data.val_at(0)); let req = request::Bodies { - block_hashes: try!(data.iter().skip(1).take(MAX_BODIES).map(|x| x.as_val()).collect()) + block_hashes: try!(try!(data.at(1)).iter().take(MAX_BODIES).map(|x| x.as_val()).collect()) }; let max_cost = try!(peer.deduct_max(&self.flow_params, request::Kind::Bodies, req.block_hashes.len())); @@ -726,8 +761,8 @@ impl LightProtocol { let cur_buffer = peer.refund(&self.flow_params, max_cost - actual_cost); io.respond(packet::BLOCK_BODIES, { - let mut stream = RlpStream::new_list(response.len() + 2); - stream.append(&req_id).append(&cur_buffer); + let mut stream = RlpStream::new_list(3); + stream.append(&req_id).append(&cur_buffer).begin_list(response.len()); for body in response { stream.append_raw(&body, 1); @@ -742,7 +777,7 @@ impl LightProtocol { // Receive a response for block bodies. fn block_bodies(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::Bodies, &raw)); - let raw_bodies: Vec<Bytes> = raw.iter().skip(2).map(|x| x.as_raw().to_owned()).collect(); + let raw_bodies: Vec<Bytes> = try!(raw.at(2)).iter().map(|x| x.as_raw().to_owned()).collect(); for handler in &self.handlers { handler.on_block_bodies(&Ctx { @@ -772,7 +807,7 @@ impl LightProtocol { let req_id: u64 = try!(data.val_at(0)); let req = request::Receipts { - block_hashes: try!(data.iter().skip(1).take(MAX_RECEIPTS).map(|x| x.as_val()).collect()) + block_hashes: try!(try!(data.at(1)).iter().take(MAX_RECEIPTS).map(|x| x.as_val()).collect()) }; let max_cost = try!(peer.deduct_max(&self.flow_params, request::Kind::Receipts, req.block_hashes.len())); @@ -785,8 +820,8 @@ impl LightProtocol { let cur_buffer = peer.refund(&self.flow_params, max_cost - actual_cost); io.respond(packet::RECEIPTS, { - let mut stream = RlpStream::new_list(response.len() + 2); - stream.append(&req_id).append(&cur_buffer); + let mut stream = RlpStream::new_list(3); + stream.append(&req_id).append(&cur_buffer).begin_list(response.len()); for receipts in response { stream.append_raw(&receipts, 1); @@ -801,9 +836,8 @@ impl LightProtocol { // Receive a response for receipts. fn receipts(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::Receipts, &raw)); - let raw_receipts: Vec<Vec<Receipt>> = try!(raw + let raw_receipts: Vec<Vec<Receipt>> = try!(try!(raw.at(2)) .iter() - .skip(2) .map(|x| x.as_val()) .collect()); @@ -835,7 +869,7 @@ impl LightProtocol { let req_id: u64 = try!(data.val_at(0)); let req = { - let requests: Result<Vec<_>, Error> = data.iter().skip(1).take(MAX_PROOFS).map(|x| { + let requests: Result<Vec<_>, Error> = try!(data.at(1)).iter().take(MAX_PROOFS).map(|x| { Ok(request::StateProof { block: try!(x.val_at(0)), key1: try!(x.val_at(1)), @@ -859,8 +893,8 @@ impl LightProtocol { let cur_buffer = peer.refund(&self.flow_params, max_cost - actual_cost); io.respond(packet::PROOFS, { - let mut stream = RlpStream::new_list(response.len() + 2); - stream.append(&req_id).append(&cur_buffer); + let mut stream = RlpStream::new_list(3); + stream.append(&req_id).append(&cur_buffer).begin_list(response.len()); for proof in response { stream.append_raw(&proof, 1); @@ -876,8 +910,7 @@ impl LightProtocol { fn proofs(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::StateProofs, &raw)); - let raw_proofs: Vec<Vec<Bytes>> = raw.iter() - .skip(2) + let raw_proofs: Vec<Vec<Bytes>> = try!(raw.at(2)).iter() .map(|x| x.iter().map(|node| node.as_raw().to_owned()).collect()) .collect(); @@ -909,7 +942,7 @@ impl LightProtocol { let req_id: u64 = try!(data.val_at(0)); let req = { - let requests: Result<Vec<_>, Error> = data.iter().skip(1).take(MAX_CODES).map(|x| { + let requests: Result<Vec<_>, Error> = try!(data.at(1)).iter().take(MAX_CODES).map(|x| { Ok(request::ContractCode { block_hash: try!(x.val_at(0)), account_key: try!(x.val_at(1)), @@ -931,8 +964,8 @@ impl LightProtocol { let cur_buffer = peer.refund(&self.flow_params, max_cost - actual_cost); io.respond(packet::CONTRACT_CODES, { - let mut stream = RlpStream::new_list(response.len() + 2); - stream.append(&req_id).append(&cur_buffer); + let mut stream = RlpStream::new_list(3); + stream.append(&req_id).append(&cur_buffer).begin_list(response.len()); for code in response { stream.append(&code); @@ -948,7 +981,7 @@ impl LightProtocol { fn contract_code(&self, peer: &PeerId, io: &IoContext, raw: UntrustedRlp) -> Result<(), Error> { let req_id = try!(self.pre_verify_response(peer, request::Kind::Codes, &raw)); - let raw_code: Vec<Bytes> = try!(raw.iter().skip(2).map(|x| x.as_val()).collect()); + let raw_code: Vec<Bytes> = try!(try!(raw.at(2)).iter().map(|x| x.as_val()).collect()); for handler in &self.handlers { handler.on_code(&Ctx { @@ -978,7 +1011,7 @@ impl LightProtocol { let req_id: u64 = try!(data.val_at(0)); let req = { - let requests: Result<Vec<_>, Error> = data.iter().skip(1).take(MAX_PROOFS).map(|x| { + let requests: Result<Vec<_>, Error> = try!(data.at(1)).iter().take(MAX_PROOFS).map(|x| { Ok(request::HeaderProof { cht_number: try!(x.val_at(0)), block_number: try!(x.val_at(1)), @@ -1001,8 +1034,8 @@ impl LightProtocol { let cur_buffer = peer.refund(&self.flow_params, max_cost - actual_cost); io.respond(packet::HEADER_PROOFS, { - let mut stream = RlpStream::new_list(response.len() + 2); - stream.append(&req_id).append(&cur_buffer); + let mut stream = RlpStream::new_list(3); + stream.append(&req_id).append(&cur_buffer).begin_list(response.len()); for proof in response { stream.append_raw(&proof, 1); @@ -1023,9 +1056,8 @@ impl LightProtocol { )) } - let req_id = try!(self.pre_verify_response(peer, request::Kind::HeaderProofs, &raw)); - let raw_proofs: Vec<_> = try!(raw.iter().skip(2).map(decode_res).collect()); + let raw_proofs: Vec<_> = try!(try!(raw.at(2)).iter().map(decode_res).collect()); for handler in &self.handlers { handler.on_header_proofs(&Ctx { @@ -1058,6 +1090,21 @@ impl LightProtocol { } } +// if something went wrong, figure out how much to punish the peer. +fn punish(peer: PeerId, io: &IoContext, e: Error) { + match e.punishment() { + Punishment::None => {} + Punishment::Disconnect => { + debug!(target: "les", "Disconnecting peer {}: {}", peer, e); + io.disconnect_peer(peer) + } + Punishment::Disable => { + debug!(target: "les", "Disabling peer {}: {}", peer, e); + io.disable_peer(peer) + } + } +} + impl NetworkProtocolHandler for LightProtocol { fn initialize(&self, io: &NetworkContext) { io.register_timer(TIMEOUT, TIMEOUT_INTERVAL_MS).expect("Error registering sync timer."); @@ -1075,11 +1122,9 @@ impl NetworkProtocolHandler for LightProtocol { self.on_disconnect(*peer, io); } - fn timeout(&self, _io: &NetworkContext, timer: TimerToken) { + fn timeout(&self, io: &NetworkContext, timer: TimerToken) { match timer { - TIMEOUT => { - // broadcast transactions to peers. - } + TIMEOUT => self.timeout_check(io), _ => warn!(target: "les", "received timeout on unknown token {}", timer), } } @@ -1089,20 +1134,24 @@ impl NetworkProtocolHandler for LightProtocol { fn encode_request(req: &Request, req_id: usize) -> Vec<u8> { match *req { Request::Headers(ref headers) => { - let mut stream = RlpStream::new_list(5); + let mut stream = RlpStream::new_list(2); + stream.append(&req_id).begin_list(4); + + match headers.start { + HashOrNumber::Hash(ref hash) => stream.append(hash), + HashOrNumber::Number(ref num) => stream.append(num), + }; + stream - .append(&req_id) - .begin_list(2) - .append(&headers.block_num) - .append(&headers.block_hash) .append(&headers.max) .append(&headers.skip) .append(&headers.reverse); + stream.out() } Request::Bodies(ref request) => { - let mut stream = RlpStream::new_list(request.block_hashes.len() + 1); - stream.append(&req_id); + let mut stream = RlpStream::new_list(2); + stream.append(&req_id).begin_list(request.block_hashes.len()); for hash in &request.block_hashes { stream.append(hash); @@ -1111,8 +1160,8 @@ fn encode_request(req: &Request, req_id: usize) -> Vec<u8> { stream.out() } Request::Receipts(ref request) => { - let mut stream = RlpStream::new_list(request.block_hashes.len() + 1); - stream.append(&req_id); + let mut stream = RlpStream::new_list(2); + stream.append(&req_id).begin_list(request.block_hashes.len()); for hash in &request.block_hashes { stream.append(hash); @@ -1121,8 +1170,8 @@ fn encode_request(req: &Request, req_id: usize) -> Vec<u8> { stream.out() } Request::StateProofs(ref request) => { - let mut stream = RlpStream::new_list(request.requests.len() + 1); - stream.append(&req_id); + let mut stream = RlpStream::new_list(2); + stream.append(&req_id).begin_list(request.requests.len()); for proof_req in &request.requests { stream.begin_list(4) @@ -1140,8 +1189,8 @@ fn encode_request(req: &Request, req_id: usize) -> Vec<u8> { stream.out() } Request::Codes(ref request) => { - let mut stream = RlpStream::new_list(request.code_requests.len() + 1); - stream.append(&req_id); + let mut stream = RlpStream::new_list(2); + stream.append(&req_id).begin_list(request.code_requests.len()); for code_req in &request.code_requests { stream.begin_list(2) @@ -1152,8 +1201,8 @@ fn encode_request(req: &Request, req_id: usize) -> Vec<u8> { stream.out() } Request::HeaderProofs(ref request) => { - let mut stream = RlpStream::new_list(request.requests.len() + 1); - stream.append(&req_id); + let mut stream = RlpStream::new_list(2); + stream.append(&req_id).begin_list(request.requests.len()); for proof_req in &request.requests { stream.begin_list(3) diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 876432ce2..7c0928cdd 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -91,16 +91,27 @@ impl Provider for TestProvider { } fn block_headers(&self, req: request::Headers) -> Vec<Bytes> { - let best_num = self.0.client.chain_info().best_block_number; - let start_num = req.block_num; + use request::HashOrNumber; + use ethcore::views::HeaderView; - match self.0.client.block_hash(BlockId::Number(req.block_num)) { - Some(hash) if hash == req.block_hash => {} - _=> { - trace!(target: "les_provider", "unknown/non-canonical start block in header request: {:?}", (req.block_num, req.block_hash)); - return vec![] + let best_num = self.chain_info().best_block_number; + let start_num = match req.start { + HashOrNumber::Number(start_num) => start_num, + HashOrNumber::Hash(hash) => match self.0.client.block_header(BlockId::Hash(hash)) { + None => { + return Vec::new(); + } + Some(header) => { + let num = HeaderView::new(&header).number(); + if req.max == 1 || self.0.client.block_hash(BlockId::Number(num)) != Some(hash) { + // Non-canonical header or single header requested. + return vec![header]; + } + + num + } } - } + }; (0u64..req.max as u64) .map(|x: u64| x.saturating_mul(req.skip + 1)) @@ -250,8 +261,7 @@ fn buffer_overflow() { // 1000 requests is far too many for the default flow params. let request = encode_request(&Request::Headers(Headers { - block_num: 1, - block_hash: provider.client.chain_info().genesis_hash, + start: 1.into(), max: 1000, skip: 0, reverse: false, @@ -284,8 +294,7 @@ fn get_block_headers() { } let request = Headers { - block_num: 1, - block_hash: provider.client.block_hash(BlockId::Number(1)).unwrap(), + start: 1.into(), max: 10, skip: 0, reverse: false, @@ -299,9 +308,9 @@ fn get_block_headers() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Headers, 10); - let mut response_stream = RlpStream::new_list(12); + let mut response_stream = RlpStream::new_list(3); - response_stream.append(&req_id).append(&new_buf); + response_stream.append(&req_id).append(&new_buf).begin_list(10); for header in headers { response_stream.append_raw(&header, 1); } @@ -346,9 +355,9 @@ fn get_block_bodies() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Bodies, 10); - let mut response_stream = RlpStream::new_list(12); + let mut response_stream = RlpStream::new_list(3); - response_stream.append(&req_id).append(&new_buf); + response_stream.append(&req_id).append(&new_buf).begin_list(10); for body in bodies { response_stream.append_raw(&body, 1); } @@ -399,9 +408,9 @@ fn get_block_receipts() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Receipts, receipts.len()); - let mut response_stream = RlpStream::new_list(2 + receipts.len()); + let mut response_stream = RlpStream::new_list(3); - response_stream.append(&req_id).append(&new_buf); + response_stream.append(&req_id).append(&new_buf).begin_list(receipts.len()); for block_receipts in receipts { response_stream.append_raw(&block_receipts, 1); } @@ -448,9 +457,9 @@ fn get_state_proofs() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::StateProofs, 2); - let mut response_stream = RlpStream::new_list(4); + let mut response_stream = RlpStream::new_list(3); - response_stream.append(&req_id).append(&new_buf); + response_stream.append(&req_id).append(&new_buf).begin_list(2); for proof in proofs { response_stream.append_raw(&proof, 1); } @@ -497,9 +506,9 @@ fn get_contract_code() { let new_buf = *flow_params.limit() - flow_params.compute_cost(request::Kind::Codes, 2); - let mut response_stream = RlpStream::new_list(4); + let mut response_stream = RlpStream::new_list(3); - response_stream.append(&req_id).append(&new_buf); + response_stream.append(&req_id).append(&new_buf).begin_list(2); for code in codes { response_stream.append(&code); } diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index ad8d8ea16..ed2f49f5d 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -97,17 +97,29 @@ impl<T: ProvingBlockChainClient + ?Sized> Provider for T { } fn block_headers(&self, req: request::Headers) -> Vec<Bytes> { + use request::HashOrNumber; + use ethcore::views::HeaderView; + let best_num = self.chain_info().best_block_number; - let start_num = req.block_num; + let start_num = match req.start { + HashOrNumber::Number(start_num) => start_num, + HashOrNumber::Hash(hash) => match self.block_header(BlockId::Hash(hash)) { + None => { + trace!(target: "les_provider", "Unknown block hash {} requested", hash); + return Vec::new(); + } + Some(header) => { + let num = HeaderView::new(&header).number(); + if req.max == 1 || self.block_hash(BlockId::Number(num)) != Some(hash) { + // Non-canonical header or single header requested. + return vec![header]; + } - match self.block_hash(BlockId::Number(req.block_num)) { - Some(hash) if hash == req.block_hash => {} - _=> { - trace!(target: "les_provider", "unknown/non-canonical start block in header request: {:?}", (req.block_num, req.block_hash)); - return vec![] + num + } } - } - + }; + (0u64..req.max as u64) .map(|x: u64| x.saturating_mul(req.skip + 1)) .take_while(|x| if req.reverse { x < &start_num } else { best_num - start_num >= *x }) diff --git a/ethcore/light/src/types/les_request.rs b/ethcore/light/src/types/les_request.rs index 49bd2e9cc..2c7bfb380 100644 --- a/ethcore/light/src/types/les_request.rs +++ b/ethcore/light/src/types/les_request.rs @@ -18,15 +18,34 @@ use util::H256; +/// Either a hash or a number. +#[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "ipc", derive(Binary))] +pub enum HashOrNumber { + /// Block hash variant. + Hash(H256), + /// Block number variant. + Number(u64), +} + +impl From<H256> for HashOrNumber { + fn from(hash: H256) -> Self { + HashOrNumber::Hash(hash) + } +} + +impl From<u64> for HashOrNumber { + fn from(num: u64) -> Self { + HashOrNumber::Number(num) + } +} + /// A request for block headers. #[derive(Debug, Clone, PartialEq, Eq)] #[cfg_attr(feature = "ipc", derive(Binary))] pub struct Headers { - /// Starting block number - pub block_num: u64, - /// Starting block hash. This and number could be combined but IPC codegen is - /// not robust enough to support it. - pub block_hash: H256, + /// Starting block number or hash. + pub start: HashOrNumber, /// The maximum amount of headers which can be returned. pub max: usize, /// The amount of headers to skip between each response entry. From 13509a9e83d384363a0762e0fa339ed0c12db576 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sun, 11 Dec 2016 16:49:38 +0100 Subject: [PATCH 113/131] Fix padding in App, again... (#3813) --- js/src/views/Application/application.css | 3 +++ js/src/views/Application/application.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/js/src/views/Application/application.css b/js/src/views/Application/application.css index 4ce748a30..e6f97f105 100644 --- a/js/src/views/Application/application.css +++ b/js/src/views/Application/application.css @@ -19,5 +19,8 @@ display: flex; flex-direction: column; min-height: 100vh; +} + +.content { padding-bottom: 1em; } diff --git a/js/src/views/Application/application.js b/js/src/views/Application/application.js index 830a44f6c..d95484970 100644 --- a/js/src/views/Application/application.js +++ b/js/src/views/Application/application.js @@ -30,6 +30,8 @@ import Status from './Status'; import Store from './store'; import TabBar from './TabBar'; +import styles from './application.css'; + const inFrame = window.parent !== window && window.parent.frames.length !== 0; @observer @@ -79,7 +81,9 @@ class Application extends Component { netChain={ netChain } isTest={ isTest } pending={ pending } /> - { children } + <div className={ styles.content }> + { children } + </div> { blockNumber ? (<Status />) : null } <Snackbar /> </Container> From 839e3385dd30552b14fac1ad6e389e86edb7b348 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 16:00:49 +0000 Subject: [PATCH 114/131] [ci skip] js-precompiled 20161211-155716 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cae9d6744..fcf12f1f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#3e04f32403aab917a149d54f4191263f1c79f5ce" +source = "git+https://github.com/ethcore/js-precompiled.git#e1c4592ba60727af643c54941bf97f63cd9b5737" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 577ec6f14..9f8eabc2c 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.111", + "version": "0.2.112", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 885d6eaa4d7c4b99f4233e42a1fec85a3f685927 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jacogr@gmail.com> Date: Sun, 11 Dec 2016 17:42:35 +0100 Subject: [PATCH 115/131] i18n string dictionaries (#3532) * TabBar & Settings -> Views i18n enabled * Proxy i18n * Settings i18n * defaultLocale * Introduce thin Translate wrapper * PropTypes util caters for multiples * Translate & LanguageSelector under ui * Update location & proptypes * Add UI Language selector * German settings pages * Add German language selection * Corrected umlaut encoding * Lint * Re-apply pre-merge conflict changes * better German i18n * Language names in locale language * i8n -> index * Allow for development/production operation * Use Yahoo react-intl (as opposed to react-i18nify) * Use default messages wih expansions * Remove non-reused variable definitions * Use FormattedMessage directly, opens up WebPack & Babel opportunities * Add flat to flatten * Extract default messages via babel * Webpack to aggegrate i18n defaultMessage * Re-add react-intl after merge * Update proptype references (merge) * Strip down external dictionary * i18n for dapps * Restore tests submodule * Allow language changes to reflect * Style updates --- js/.babelrc | 15 +- js/package.json | 4 + js/src/i18n/de/index.js | 21 +++ js/src/i18n/de/settings.js | 96 +++++++++++ js/src/i18n/en/index.js | 21 +++ js/src/i18n/en/settings.js | 63 ++++++++ js/src/i18n/index.js | 21 +++ js/src/i18n/languages.js | 20 +++ js/src/i18n/store.js | 62 +++++++ js/src/ui/ContextProvider/contextProvider.js | 16 +- js/src/ui/Form/Select/select.js | 8 +- js/src/ui/LanguageSelector/index.js | 17 ++ .../ui/LanguageSelector/languageSelector.js | 71 ++++++++ js/src/ui/index.js | 6 +- js/src/views/Application/TabBar/tabBar.js | 109 ++++--------- js/src/views/Dapps/AddDapps/AddDapps.js | 51 +++++- js/src/views/Dapps/dapps.js | 25 ++- .../views/Settings/Background/background.js | 23 ++- js/src/views/Settings/Parity/parity.js | 80 +++++---- js/src/views/Settings/Proxy/proxy.js | 35 +++- js/src/views/Settings/Views/defaults.js | 28 +--- js/src/views/Settings/Views/views.js | 153 ++++++++++++++---- js/src/views/Settings/settings.js | 25 ++- js/webpack/app.js | 9 ++ 24 files changed, 783 insertions(+), 196 deletions(-) create mode 100644 js/src/i18n/de/index.js create mode 100644 js/src/i18n/de/settings.js create mode 100644 js/src/i18n/en/index.js create mode 100644 js/src/i18n/en/settings.js create mode 100644 js/src/i18n/index.js create mode 100644 js/src/i18n/languages.js create mode 100644 js/src/i18n/store.js create mode 100644 js/src/ui/LanguageSelector/index.js create mode 100644 js/src/ui/LanguageSelector/languageSelector.js diff --git a/js/.babelrc b/js/.babelrc index 9f44b6bd2..a4f2a2006 100644 --- a/js/.babelrc +++ b/js/.babelrc @@ -13,18 +13,19 @@ "retainLines": true, "env": { "production": { - "plugins": ["transform-react-remove-prop-types"] + "plugins": [ + "transform-react-remove-prop-types" + ] }, "development": { - "plugins": ["react-hot-loader/babel"] + "plugins": [ + "react-hot-loader/babel", + ["react-intl", { "messagesDir": "./.build/i18n/" }] + ] }, "test": { "plugins": [ - [ - "babel-plugin-webpack-alias", { - "config": "webpack/test.js" - } - ] + ["babel-plugin-webpack-alias", { "config": "webpack/test.js" }] ] } } diff --git a/js/package.json b/js/package.json index 9f8eabc2c..525211517 100644 --- a/js/package.json +++ b/js/package.json @@ -52,6 +52,7 @@ "babel-eslint": "7.1.1", "babel-loader": "6.2.8", "babel-plugin-lodash": "3.2.10", + "babel-plugin-react-intl": "2.2.0", "babel-plugin-transform-class-properties": "6.18.0", "babel-plugin-transform-decorators-legacy": "1.3.4", "babel-plugin-transform-object-rest-spread": "6.20.2", @@ -111,6 +112,7 @@ "react-addons-perf": "15.4.1", "react-addons-test-utils": "15.4.1", "react-hot-loader": "3.0.0-beta.6", + "react-intl-aggregate-webpack-plugin": "0.0.1", "rucksack-css": "0.9.1", "sinon": "1.17.6", "sinon-as-promised": "4.0.2", @@ -133,6 +135,7 @@ "ethereumjs-tx": "1.1.4", "eventemitter3": "2.0.2", "file-saver": "1.3.3", + "flat": "2.0.1", "format-json": "1.0.3", "format-number": "2.0.1", "geopattern": "1.2.3", @@ -155,6 +158,7 @@ "react-copy-to-clipboard": "4.2.3", "react-dom": "15.4.1", "react-dropzone": "3.7.3", + "react-intl": "2.1.5", "react-redux": "4.4.6", "react-router": "3.0.0", "react-router-redux": "4.0.7", diff --git a/js/src/i18n/de/index.js b/js/src/i18n/de/index.js new file mode 100644 index 000000000..d8c0f9b4b --- /dev/null +++ b/js/src/i18n/de/index.js @@ -0,0 +1,21 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import settings from './settings'; + +export default { + settings +}; diff --git a/js/src/i18n/de/settings.js b/js/src/i18n/de/settings.js new file mode 100644 index 000000000..9142ff9c7 --- /dev/null +++ b/js/src/i18n/de/settings.js @@ -0,0 +1,96 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +export default { + label: 'Einstellungen', + + background: { + label: 'Hintergrund', + + overview_0: 'Dein Hintergrundmuster ist einzigartig und beruht auf deiner Parity-Installation. Es ändert sich immer dann, wenn du ein neues Signer-Token erstellst. So können dezentrale Applicationen keine Vertrauenswürdigkeit vortäuschen.', + overview_1: 'Such dir ein Muster aus und merke es dir. Dieses Muster wird dir von nun an immer angezeigt, es sei denn du löschst deinen Browser-Cache oder benutzt ein neues Signer-Token.', + + button_more: 'weitere generieren' + }, + + parity: { + label: 'Parity', + + overview_0: 'Diese Einstellungen verändern das Verhalten deines Parity-Knotens.', + + languages: { + label: 'Anzeigesprache', + hint: 'Die Sprache, in der dir diese Obefläche angezeigt wird' + }, + + modes: { + label: 'Betriebsmodus', + hint: 'Der Synchronisations-Modus deines Parity-Knotens', + + mode_active: 'Parity synchronisiert kontinuierlich die Blockchain', + mode_passive: 'Parity synchronisiert zu Beginn, schläft dann und wacht regelmäßig zum Synchronisieren auf', + mode_dark: 'Parity synchronisiert nur falls erforderlich, etwa wenn es aus der Ferne aufgerufen wird', + mode_offline: 'Parity synchronisiert nicht' + } + }, + + proxy: { + label: 'Proxy', + + overview_0: 'Die Proxy-Einstellungen ermöglichen dir einen einfachen Zugriff über einprägsame Adressen, auf die Oberfläche mit all ihren dezentralen Anwendungen.', + + details_0: 'Anstelle des Zugriffs über IP-Adresse und Port wirst du über die .parity-Subdomain auf die Parity-Oberfläche zugreifen können, indem du {homeProxy} besuchst. Dafür musst du folgenden Eintrag in den Proxy-Einstellungen deines Browsers hinzufügen:', + details_1: 'Hier findest du Anleitungen zum Anpassen der Proxy-Einstellungen in {windowsLink}, {macOSLink} oder {ubuntuLink}.' + }, + + views: { + label: 'Ansicht', + + overview_0: 'Hier kannst du entscheiden, welche Teile der Parity-Oberfläche dir angezeigt werden sollen.', + overview_1: 'Benutzt du Parity ganz normal? Die Standardeinstellungen sind gleichermaßen für Einsteigende als auch für Fortgeschrittene gedacht.', + overview_2: 'Entwickelst du mit Parity? Füge zum Beispiel den Reiter "Contracts" zu deiner Ansicht hinzu.', + overview_3: 'Bist du Miner oder betreibst du einen großen Knoten? Füge den Reiter "Status" hinzu, um alle Information über den Betrieb deines Knotens im Blick zu halten.', + + accounts: { + label: 'Konten', + description: 'Eine Liste aller Konten, die mit dieser Parity-Installation verbunden sind. Sende Transaktionen, empfange eingehende Beträge, verwalte deine Kontostände oder lade deine Konten auf.' + }, + addresses: { + label: 'Adressbuch', + description: 'Eine Liste all deiner Kontakte und der Adressen, die von dieser Parity-Installation verwaltet werden. Überwache Konten und gelange mit nur einem Klick zu Details deiner Transaktionen.' + }, + apps: { + label: 'Anwendungen', + description: 'Dezentrale Anwendungen, die mit dem Netzwerk interagieren. Füge Anwendungen hinzu, entferne oder öffne Anwendungen.' + }, + contracts: { + label: 'Contracts', + description: 'Interagiere mit Smart Contracts im Netzwerk. Diese Umgebung ist auf Fortgeschrittene mit gutem Verständnis der Fuktionsweise von Smart Contracts zugeschnitten.' + }, + status: { + label: 'Status', + description: 'Schau dir an, wie sich dein Parity-Knoten schlägt. Hier findest du zum Beispiel die Anzahl der aktuellen Verbindungen zum Netzwerk, Logs deiner laufenden Instanz und (sofern konfiguriert) Details zum Mining.' + }, + signer: { + label: 'Signer', + description: 'In diesem sicheren Bereich kannst du Transaktionen, die von dir oder von dezentralen Anwendungen erstellt wurden, prüfen und dann genehmigen oder ablehnen.' + }, + settings: { + label: 'Einstellungen', + description: 'Diese Seite. Pass die Parity-Oberfläche nach deinen Wünschen an.' + } + } +}; diff --git a/js/src/i18n/en/index.js b/js/src/i18n/en/index.js new file mode 100644 index 000000000..d8c0f9b4b --- /dev/null +++ b/js/src/i18n/en/index.js @@ -0,0 +1,21 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import settings from './settings'; + +export default { + settings +}; diff --git a/js/src/i18n/en/settings.js b/js/src/i18n/en/settings.js new file mode 100644 index 000000000..a0e7c7f1f --- /dev/null +++ b/js/src/i18n/en/settings.js @@ -0,0 +1,63 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +export default { + label: 'settings', + + background: { + label: 'background' + }, + + parity: { + label: 'parity' + }, + + proxy: { + label: 'proxy' + }, + + views: { + label: 'views', + + accounts: { + label: 'Accounts' + }, + + addresses: { + label: 'Addressbook' + }, + + apps: { + label: 'Applications' + }, + + contracts: { + label: 'Contracts' + }, + + status: { + label: 'Status' + }, + + signer: { + label: 'Signer' + }, + + settings: { + label: 'Settings' + } + } +}; diff --git a/js/src/i18n/index.js b/js/src/i18n/index.js new file mode 100644 index 000000000..4ed119c90 --- /dev/null +++ b/js/src/i18n/index.js @@ -0,0 +1,21 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import LocaleStore from './store'; + +export { + LocaleStore +}; diff --git a/js/src/i18n/languages.js b/js/src/i18n/languages.js new file mode 100644 index 000000000..f4950e401 --- /dev/null +++ b/js/src/i18n/languages.js @@ -0,0 +1,20 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +export default { + de: 'Deutsch', + en: 'English' +}; diff --git a/js/src/i18n/store.js b/js/src/i18n/store.js new file mode 100644 index 000000000..f171497e4 --- /dev/null +++ b/js/src/i18n/store.js @@ -0,0 +1,62 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import flatten from 'flat'; +import { action, observable, transaction } from 'mobx'; +import { addLocaleData } from 'react-intl'; +import de from 'react-intl/locale-data/de'; +import en from 'react-intl/locale-data/en'; + +import languages from './languages'; +import deMessages from './de'; +import enMessages from './en'; + +let instance = null; +const isProduction = process.env.NODE_ENV === 'production'; + +const DEFAULT = 'en'; +const LANGUAGES = flatten({ languages }); +const MESSAGES = { + de: Object.assign(flatten(deMessages), LANGUAGES), + en: Object.assign(flatten(enMessages), LANGUAGES) +}; +const LOCALES = isProduction + ? ['en'] + : ['en', 'de']; + +addLocaleData([...de, ...en]); + +export default class Store { + @observable locale = DEFAULT; + @observable locales = LOCALES; + @observable messages = MESSAGES[DEFAULT]; + @observable isDevelopment = !isProduction; + + @action setLocale (locale) { + transaction(() => { + this.locale = locale; + this.messages = MESSAGES[locale]; + }); + } + + static get () { + if (!instance) { + instance = new Store(); + } + + return instance; + } +} diff --git a/js/src/ui/ContextProvider/contextProvider.js b/js/src/ui/ContextProvider/contextProvider.js index 7af6d342e..543730c40 100644 --- a/js/src/ui/ContextProvider/contextProvider.js +++ b/js/src/ui/ContextProvider/contextProvider.js @@ -14,8 +14,13 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import { Component, PropTypes } from 'react'; +import React, { Component, PropTypes } from 'react'; +import { IntlProvider } from 'react-intl'; +import { observer } from 'mobx-react'; +import { LocaleStore } from '../../i18n'; + +@observer export default class ContextProvider extends Component { static propTypes = { api: PropTypes.object.isRequired, @@ -30,10 +35,17 @@ export default class ContextProvider extends Component { store: PropTypes.object } + localeStore = LocaleStore.get(); + render () { const { children } = this.props; + const { locale, messages } = this.localeStore; - return children; + return ( + <IntlProvider locale={ locale } messages={ messages }> + { children } + </IntlProvider> + ); } getChildContext () { diff --git a/js/src/ui/Form/Select/select.js b/js/src/ui/Form/Select/select.js index cb879e3f7..b966f483c 100644 --- a/js/src/ui/Form/Select/select.js +++ b/js/src/ui/Form/Select/select.js @@ -17,6 +17,8 @@ import React, { Component, PropTypes } from 'react'; import { SelectField } from 'material-ui'; +import { nodeOrStringProptype } from '~/util/proptypes'; + // TODO: duplicated in Input const UNDERLINE_DISABLED = { borderColor: 'rgba(255, 255, 255, 0.298039)' // 'transparent' // 'rgba(255, 255, 255, 0.298039)' @@ -33,9 +35,9 @@ export default class Select extends Component { children: PropTypes.node, className: PropTypes.string, disabled: PropTypes.bool, - error: PropTypes.string, - hint: PropTypes.string, - label: PropTypes.string, + error: nodeOrStringProptype(), + hint: nodeOrStringProptype(), + label: nodeOrStringProptype(), onBlur: PropTypes.func, onChange: PropTypes.func, onKeyDown: PropTypes.func, diff --git a/js/src/ui/LanguageSelector/index.js b/js/src/ui/LanguageSelector/index.js new file mode 100644 index 000000000..772167d14 --- /dev/null +++ b/js/src/ui/LanguageSelector/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +export default from './languageSelector'; diff --git a/js/src/ui/LanguageSelector/languageSelector.js b/js/src/ui/LanguageSelector/languageSelector.js new file mode 100644 index 000000000..db8949510 --- /dev/null +++ b/js/src/ui/LanguageSelector/languageSelector.js @@ -0,0 +1,71 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React, { Component } from 'react'; +import { FormattedMessage } from 'react-intl'; +import { MenuItem } from 'material-ui'; +import { observer } from 'mobx-react'; + +import Select from '../Form/Select'; +import { LocaleStore } from '../../i18n'; + +@observer +export default class LanguageSelector extends Component { + store = LocaleStore.get(); + + render () { + if (!this.store.isDevelopment) { + return null; + } + + return ( + <Select + hint={ + <FormattedMessage + id='settings.parity.languages.hint' + defaultMessage='the language this interface is displayed with' /> + } + label={ + <FormattedMessage + id='settings.parity.languages.label' + defaultMessage='UI language' /> + } + value={ this.store.locale } + onChange={ this.onChange }> + { this.renderOptions() } + </Select> + ); + } + + renderOptions () { + return this.store.locales.map((locale) => { + const label = <FormattedMessage id={ `languages.${locale}` } />; + + return ( + <MenuItem + key={ locale } + value={ locale } + label={ label }> + { label } + </MenuItem> + ); + }); + } + + onChange = (event, index, locale) => { + this.store.setLocale(locale); + } +} diff --git a/js/src/ui/index.js b/js/src/ui/index.js index c5a965458..7cf3e7ee5 100644 --- a/js/src/ui/index.js +++ b/js/src/ui/index.js @@ -34,6 +34,7 @@ import Form, { AddressSelect, FormWrap, TypedInput, Input, InputAddress, InputAd import GasPriceEditor from './GasPriceEditor'; import IdentityIcon from './IdentityIcon'; import IdentityName from './IdentityName'; +import LanguageSelector from './LanguageSelector'; import Loading from './Loading'; import MethodDecoding from './MethodDecoding'; import Modal, { Busy as BusyStep, Completed as CompletedStep } from './Modal'; @@ -74,10 +75,10 @@ export { InputAddressSelect, InputChip, InputInline, - Loading, - Select, IdentityIcon, IdentityName, + LanguageSelector, + Loading, MethodDecoding, Modal, BusyStep, @@ -87,6 +88,7 @@ export { ParityBackground, RadioButtons, ShortenedHash, + Select, SignerIcon, Tags, Tooltip, diff --git a/js/src/views/Application/TabBar/tabBar.js b/js/src/views/Application/TabBar/tabBar.js index 63f569f1f..ad2bfb779 100644 --- a/js/src/views/Application/TabBar/tabBar.js +++ b/js/src/views/Application/TabBar/tabBar.js @@ -15,6 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar'; @@ -23,85 +24,57 @@ import { isEqual } from 'lodash'; import { Badge, Tooltip } from '~/ui'; +import imagesEthcoreBlock from '~/../assets/images/parity-logo-white-no-text.svg'; + import styles from './tabBar.css'; -import imagesEthcoreBlock from '../../../../assets/images/parity-logo-white-no-text.svg'; class Tab extends Component { static propTypes = { - view: PropTypes.object, children: PropTypes.node, - pendings: PropTypes.number + pendings: PropTypes.number, + view: PropTypes.object }; - shouldComponentUpdate (nextProps) { - return (nextProps.view.id === 'signer' && nextProps.pendings !== this.props.pendings); - } - render () { const { view, children } = this.props; - const label = this.getLabel(view); - return ( <MUITab icon={ view.icon } - label={ label } - > + label={ + view.id === 'signer' + ? this.renderSignerLabel(view.id) + : this.renderLabel(view.id) + }> { children } </MUITab> ); } - getLabel (view) { - const { label } = view; - - if (view.id === 'signer') { - return this.renderSignerLabel(label); - } - - if (view.id === 'status') { - return this.renderStatusLabel(label); - } - - return this.renderLabel(label); - } - - renderLabel (name, bubble) { + renderLabel (id, bubble) { return ( <div className={ styles.label }> - { name } + <FormattedMessage + id={ `settings.views.${id}.label` } /> { bubble } </div> ); } - renderSignerLabel (label) { + renderSignerLabel (id) { const { pendings } = this.props; + let bubble; if (pendings) { - const bubble = ( + bubble = ( <Badge color='red' className={ styles.labelBubble } value={ pendings } /> ); - - return this.renderLabel(label, bubble); } - return this.renderLabel(label); - } - - renderStatusLabel (label) { - // const { isTest, netChain } = this.props; - // const bubble = ( - // <Badge - // color={ isTest ? 'red' : 'default' } - // className={ styles.labelBubble } - // value={ isTest ? 'TEST' : netChain } /> - // ); - - return this.renderLabel(label, null); + return this.renderLabel(id, bubble); } } @@ -111,28 +84,19 @@ class TabBar extends Component { }; static propTypes = { - views: PropTypes.array.isRequired, - pending: PropTypes.array, isTest: PropTypes.bool, - netChain: PropTypes.string + netChain: PropTypes.string, + pending: PropTypes.array, + views: PropTypes.array.isRequired }; static defaultProps = { pending: [] }; - shouldComponentUpdate (nextProps, nextState) { - const prevViews = this.props.views.map((v) => v.id).sort(); - const nextViews = nextProps.views.map((v) => v.id).sort(); - - return (nextProps.pending.length !== this.props.pending.length) || - (!isEqual(prevViews, nextViews)); - } - render () { return ( - <Toolbar - className={ styles.toolbar }> + <Toolbar className={ styles.toolbar }> { this.renderLogo() } { this.renderTabs() } { this.renderLast() } @@ -167,21 +131,20 @@ class TabBar extends Component { .map((view, index) => { const body = (view.id === 'accounts') ? ( - <Tooltip className={ styles.tabbarTooltip } text='navigate between the different parts and views of the application, switching between an account view, token view and distributed application view' /> + <Tooltip + className={ styles.tabbarTooltip } + text='navigate between the different parts and views of the application, switching between an account view, token view and distributed application view' /> ) : null; return ( <Link - key={ view.id } - to={ view.route } activeClassName={ styles.tabactive } - className={ styles.tabLink } - > + className={ styles.tabLink }key={ view.id } + to={ view.route }> <Tab - view={ view } pendings={ pending.length } - > + view={ view }> { body } </Tab> </Link> @@ -203,11 +166,10 @@ function mapStateToProps (initState) { .keys(views) .filter((id) => views[id].fixed || views[id].active); - let filteredViews = filteredViewIds - .map((id) => ({ - ...views[id], - id - })); + let filteredViews = filteredViewIds.map((id) => ({ + ...views[id], + id + })); return (state) => { const { views } = state.settings; @@ -221,11 +183,10 @@ function mapStateToProps (initState) { } filteredViewIds = viewIds; - filteredViews = viewIds - .map((id) => ({ - ...views[id], - id - })); + filteredViews = viewIds.map((id) => ({ + ...views[id], + id + })); return { views: filteredViews }; }; diff --git a/js/src/views/Dapps/AddDapps/AddDapps.js b/js/src/views/Dapps/AddDapps/AddDapps.js index 71d03dc50..d3876998a 100644 --- a/js/src/views/Dapps/AddDapps/AddDapps.js +++ b/js/src/views/Dapps/AddDapps/AddDapps.js @@ -15,6 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { observer } from 'mobx-react'; import DoneIcon from 'material-ui/svg-icons/action/done'; import { List, ListItem } from 'material-ui/List'; @@ -39,22 +40,56 @@ export default class AddDapps extends Component { return ( <Modal + visible compact - title='visible applications' + title={ + <FormattedMessage + id='dapps.add.label' + defaultMessage='visible applications' /> + } actions={ [ <Button - label={ 'Done' } + label={ + <FormattedMessage + id='dapps.add.button.done' + defaultMessage='Done' /> + } key='done' onClick={ store.closeModal } icon={ <DoneIcon /> } /> - ] } - visible - > + ] }> <div className={ styles.warning } /> - { this.renderList(store.sortedLocal, 'Applications locally available', 'All applications installed locally on the machine by the user for access by the Parity client.') } - { this.renderList(store.sortedBuiltin, 'Applications bundled with Parity', 'Experimental applications developed by the Parity team to show off dapp capabilities, integration, experimental features and to control certain network-wide client behaviour.') } - { this.renderList(store.sortedNetwork, 'Applications on the global network', 'These applications are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each application before interacting.') } + { + this.renderList(store.sortedLocal, + <FormattedMessage + id='dapps.add.local.label' + defaultMessage='Applications locally available' />, + <FormattedMessage + id='dapps.add.local.desc' + defaultMessage='All applications installed locally on the machine by the user for access by the Parity client.' /> + ) + } + { + this.renderList(store.sortedBuiltin, + <FormattedMessage + id='dapps.add.builtin.label' + defaultMessage='Applications bundled with Parity' />, + <FormattedMessage + id='dapps.add.builtin.desc' + defaultMessage='Experimental applications developed by the Parity team to show off dapp capabilities, integration, experimental features and to control certain network-wide client behaviour.' /> + ) + } + { + this.renderList(store.sortedNetwork, + <FormattedMessage + id='dapps.add.network.label' + defaultMessage='Applications on the global network' />, + <FormattedMessage + id='dapps.add.network.desc' + defaultMessage='These applications are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each application before interacting.' /> + ) + } </Modal> ); } diff --git a/js/src/views/Dapps/dapps.js b/js/src/views/Dapps/dapps.js index b0b731b93..160bb44b0 100644 --- a/js/src/views/Dapps/dapps.js +++ b/js/src/views/Dapps/dapps.js @@ -15,6 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { Checkbox } from 'material-ui'; import { observer } from 'mobx-react'; @@ -43,11 +44,19 @@ export default class Dapps extends Component { externalOverlay = ( <div className={ styles.overlay }> <div className={ styles.body }> - <div>Applications made available on the network by 3rd-party authors are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each before interacting.</div> + <div> + <FormattedMessage + id='dapps.external.warning' + defaultMessage='Applications made available on the network by 3rd-party authors are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each before interacting.' /> + </div> <div> <Checkbox className={ styles.accept } - label='I understand that these applications are not affiliated with Parity' + label={ + <FormattedMessage + id='dapps.external.accept' + defaultMessage='I understand that these applications are not affiliated with Parity' /> + } checked={ false } onCheck={ this.onClickAcceptExternal } /> </div> @@ -61,10 +70,18 @@ export default class Dapps extends Component { <AddDapps store={ this.store } /> <Actionbar className={ styles.toolbar } - title='Decentralized Applications' + title={ + <FormattedMessage + id='dapps.label' + defaultMessage='Decentralized Applications' /> + } buttons={ [ <FlatButton - label='edit' + label={ + <FormattedMessage + id='dapps.button.edit' + defaultMessage='edit' /> + } key='edit' icon={ <EyeIcon /> } onTouchTap={ this.store.openModal } diff --git a/js/src/views/Settings/Background/background.js b/js/src/views/Settings/Background/background.js index 0551a6145..add58d820 100644 --- a/js/src/views/Settings/Background/background.js +++ b/js/src/views/Settings/Background/background.js @@ -15,6 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import NavigationRefresh from 'material-ui/svg-icons/navigation/refresh'; @@ -55,15 +56,29 @@ class Background extends Component { render () { return ( - <Container title='Background Pattern'> + <Container title={ + <FormattedMessage id='settings.background.label' /> + }> <div className={ layout.layout }> <div className={ layout.overview }> - <div>The background pattern you can see right now is unique to your Parity installation. It will change every time you create a new Signer token. This is so that decentralized applications cannot pretend to be trustworthy.</div> - <div>Pick a pattern you like and memorize it. This Pattern will always be shown from now on, unless you clear your browser cache or use a new Signer token.</div> + <div> + <FormattedMessage + id='settings.background.overview_0' + defaultMessage='The background pattern you can see right now is unique to your Parity installation. It will change every time you create a new Signer token. This is so that decentralized applications cannot pretend to be trustworthy.' /> + </div> + <div> + <FormattedMessage + id='settings.background.overview_1' + defaultMessage='Pick a pattern you like and memorize it. This Pattern will always be shown from now on, unless you clear your browser cache or use a new Signer token.' /> + </div> <div> <Button icon={ <NavigationRefresh /> } - label='generate more' + label={ + <FormattedMessage + id='settings.background.button_more' + defaultMessage='generate more' /> + } onClick={ this.generateSeeds } /> </div> </div> diff --git a/js/src/views/Settings/Parity/parity.js b/js/src/views/Settings/Parity/parity.js index 1535f6cf2..29fab8bfb 100644 --- a/js/src/views/Settings/Parity/parity.js +++ b/js/src/views/Settings/Parity/parity.js @@ -15,19 +15,13 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { MenuItem } from 'material-ui'; -import { Select, Container } from '~/ui'; +import { Select, Container, LanguageSelector } from '~/ui'; import layout from '../layout.css'; -const MODES = { - 'active': 'Parity continuously syncs the chain', - 'passive': 'Parity syncs initially, then sleeps and wakes regularly to resync', - 'dark': 'Parity syncs only when the RPC is active', - 'offline': 'Parity doesn\'t sync' -}; - export default class Parity extends Component { static contextTypes = { api: PropTypes.object.isRequired @@ -43,12 +37,19 @@ export default class Parity extends Component { render () { return ( - <Container title='Parity'> + <Container title={ + <FormattedMessage id='settings.parity.label' /> + }> <div className={ layout.layout }> <div className={ layout.overview }> - <div>Control the Parity node settings and mode of operation via this interface.</div> + <div> + <FormattedMessage + id='settings.parity.overview_0' + defaultMessage='Control the Parity node settings and mode of operation via this interface.' /> + </div> </div> <div className={ layout.details }> + <LanguageSelector /> { this.renderModes() } </div> </div> @@ -57,30 +58,53 @@ export default class Parity extends Component { } renderModes () { - const modes = Object - .keys(MODES) - .map((mode) => { - const description = MODES[mode]; - - return ( - <MenuItem - key={ mode } - value={ mode } - label={ description }> - { description } - </MenuItem> - ); - }); - const { mode } = this.state; + const renderItem = (mode, label) => { + return ( + <MenuItem + key={ mode } + value={ mode } + label={ label }> + { label } + </MenuItem> + ); + }; + return ( <Select - label='mode of operation' - hint='the syning mode for the Parity node' + label={ + <FormattedMessage + id='settings.parity.modes.label' + defaultMessage='mode of operation' /> + } + hint={ + <FormattedMessage + id='settings.parity.modes.hint' + defaultMessage='the syning mode for the Parity node' /> + } value={ mode } onChange={ this.onChangeMode }> - { modes } + { + renderItem('active', <FormattedMessage + id='settings.parity.modes.mode_active' + defaultMessage='Parity continuously syncs the chain' />) + } + { + renderItem('passive', <FormattedMessage + id='settings.parity.modes.mode_passive' + defaultMessage='Parity syncs initially, then sleeps and wakes regularly to resync' />) + } + { + renderItem('dark', <FormattedMessage + id='settings.parity.modes.mode_dark' + defaultMessage='Parity syncs only when the RPC is active' />) + } + { + renderItem('offline', <FormattedMessage + id='settings.parity.modes.mode_offline' + defaultMessage="Parity doesn't sync" />) + } </Select> ); } diff --git a/js/src/views/Settings/Proxy/proxy.js b/js/src/views/Settings/Proxy/proxy.js index cc7fad370..45aece13b 100644 --- a/js/src/views/Settings/Proxy/proxy.js +++ b/js/src/views/Settings/Proxy/proxy.js @@ -15,6 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { Container } from '~/ui'; @@ -31,16 +32,40 @@ export default class Proxy extends Component { const proxyurl = `${dappsUrl}/proxy/proxy.pac`; return ( - <Container title='Proxy'> + <Container title={ + <FormattedMessage id='settings.proxy.label' /> + }> <div className={ layout.layout }> <div className={ layout.overview }> - <div>The proxy setup allows you to access Parity and all associated decentralized applications via memorable addresses.</div> + <div> + <FormattedMessage + id='settings.proxy.overview_0' + defaultMessage='The proxy setup allows you to access Parity and all associated decentralized applications via memorable addresses.' /> + </div> </div> <div className={ layout.details }> <div className={ styles.details }> - <div>Instead of accessing Parity via the IP address and port, you will be able to access it via the .parity subdomain, by visiting <span className={ layout.console }>http://home.parity/</span>. To setup subdomain-based routing, you need to add the relevant proxy entries to your browser,</div> - <div className={ layout.center }><a href={ proxyurl } target='_blank'>{ proxyurl }</a></div> - <div>To learn how to configure the proxy, instructions are provided for <a href='https://blogs.msdn.microsoft.com/ieinternals/2013/10/11/understanding-web-proxy-configuration/' target='_blank'>Windows</a>, <a href='https://support.apple.com/kb/PH18553?locale=en_US' target='_blank'>Max OS X</a> or <a href='http://xmodulo.com/how-to-set-up-proxy-auto-config-on-ubuntu-desktop.html' target='_blank'>Ubuntu</a>.</div> + <div> + <FormattedMessage + id='settings.proxy.details_0' + defaultMessage='Instead of accessing Parity via the IP address and port, you will be able to access it via the .parity subdomain, by visiting {homeProxy}. To setup subdomain-based routing, you need to add the relevant proxy entries to your browser,' + values={ { + homeProxy: <span className={ layout.console }>http://home.parity/</span> + } } /> + </div> + <div className={ layout.center }> + <a href={ proxyurl } target='_blank'>{ proxyurl }</a> + </div> + <div> + <FormattedMessage + id='settings.proxy.details_1' + defaultMessage='To learn how to configure the proxy, instructions are provided for {windowsLink}, {macOSLink} or {ubuntuLink}.' + values={ { + windowsLink: <a href='https://blogs.msdn.microsoft.com/ieinternals/2013/10/11/understanding-web-proxy-configuration/' target='_blank'><FormattedMessage id='details_windows' defaultMessage='Windows' /></a>, + macOSLink: <a href='https://support.apple.com/kb/PH18553?locale=en_US' target='_blank'><FormattedMessage id='settings.proxy.details_macos' defaultMessage='macOS' /></a>, + ubuntuLink: <a href='http://xmodulo.com/how-to-set-up-proxy-auto-config-on-ubuntu-desktop.html' target='_blank'><FormattedMessage id='settings.proxy.details_ubuntu' defaultMessage='Ubuntu' /></a> + } } /> + </div> </div> </div> </div> diff --git a/js/src/views/Settings/Views/defaults.js b/js/src/views/Settings/Views/defaults.js index dce593d2b..9c7971ce5 100644 --- a/js/src/views/Settings/Views/defaults.js +++ b/js/src/views/Settings/Views/defaults.js @@ -28,66 +28,52 @@ const defaultViews = { active: true, fixed: true, icon: <ActionAccountBalanceWallet />, - label: 'Accounts', route: '/accounts', - value: 'account', - description: 'A list of all the accounts associated to and imported into this Parity instance. Send transactions, receive incoming values, manage your balances and fund your accounts.' + value: 'account' }, addresses: { active: true, icon: <CommunicationContacts />, - label: 'Addressbook', route: '/addresses', - value: 'address', - description: 'A list of all contacts and address book entries that is managed by this Parity instance. Watch accounts and have the details available at the click of a button when transacting.' + value: 'address' }, apps: { active: true, icon: <NavigationApps />, - label: 'Applications', route: '/apps', - value: 'app', - description: 'Distributed applications that interact with the underlying network. Add applications, manage you application portfolio and interact with application from around the network.' + value: 'app' }, contracts: { active: false, icon: <ImageGridOn />, - label: 'Contracts', route: '/contracts', - value: 'contract', - description: 'Watch and interact with specific contracts that have been deployed on the network. This is a more technically-focused environment, specifically for advanced users that understand the inner working of certain contracts.' + value: 'contract' }, status: { active: false, icon: <ActionTrackChanges />, - label: 'Status', route: '/status', - value: 'status', - description: 'See how the Parity node is performing in terms of connections to the network, logs from the actual running instance and details of mining (if enabled and configured).' + value: 'status' }, signer: { active: true, fixed: true, icon: <ActionFingerprint />, - label: 'Signer', route: '/signer', - value: 'signer', - description: 'The secure transaction management area of the application where you can approve any outgoing transactions made from the application as well as those placed into the queue by distributed applications.' + value: 'signer' }, settings: { active: true, fixed: true, icon: <ActionSettings />, - label: 'Settings', route: '/settings', - value: 'settings', - description: 'This view. Allows you to customize the application in term of options, operation and look and feel.' + value: 'settings' } }; diff --git a/js/src/views/Settings/Views/views.js b/js/src/views/Settings/Views/views.js index 261109664..125239687 100644 --- a/js/src/views/Settings/Views/views.js +++ b/js/src/views/Settings/Views/views.js @@ -15,6 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { Checkbox } from 'material-ui'; @@ -34,16 +35,96 @@ class Views extends Component { render () { return ( - <Container title='Views'> + <Container title={ + <FormattedMessage id='settings.views.label' /> + }> <div className={ layout.layout }> <div className={ layout.overview }> - <div>Manage the available application views, using only the parts of the application that is applicable to you.</div> - <div>Are you an end-user? The defaults are setups for both beginner and advanced users alike.</div> - <div>Are you a developer? Add some features to manage contracts are interact with application deployments.</div> - <div>Are you a miner or run a large-scale node? Add the features to give you all the information needed to watch the node operation.</div> + <div> + <FormattedMessage + id='settings.views.overview_0' + defaultMessage='Manage the available application views, using only the parts of the application that is applicable to you.' /> + </div> + <div> + <FormattedMessage + id='settings.views.overview_1' + defaultMessage='Are you an end-user? The defaults are setups for both beginner and advanced users alike.' /> + </div> + <div> + <FormattedMessage + id='settings.views.overview_2' + defaultMessage='Are you a developer? Add some features to manage contracts are interact with application deployments.' /> + </div> + <div> + <FormattedMessage + id='settings.views.overview_3' + defaultMessage='Are you a miner or run a large-scale node? Add the features to give you all the information needed to watch the node operation.' /> + </div> </div> <div className={ layout.details }> - { this.renderViews() } + { + this.renderView('accounts', + <FormattedMessage + id='settings.views.accounts.label' />, + <FormattedMessage + id='settings.views.accounts.description' + defaultMessage='A list of all the accounts associated to and imported into this Parity instance. Send transactions, receive incoming values, manage your balances and fund your accounts.' /> + ) + } + { + this.renderView('addresses', + <FormattedMessage + id='settings.views.addresses.label' />, + <FormattedMessage + id='settings.views.addresses.description' + defaultMessage='A list of all contacts and address book entries that is managed by this Parity instance. Watch accounts and have the details available at the click of a button when transacting.' /> + ) + } + { + this.renderView('apps', + <FormattedMessage + id='settings.views.apps.label' />, + <FormattedMessage + id='settings.views.apps.description' + defaultMessage='Distributed applications that interact with the underlying network. Add applications, manage you application portfolio and interact with application from around the network.' /> + ) + } + { + this.renderView('contracts', + <FormattedMessage + id='settings.views.contracts.label' />, + <FormattedMessage + id='settings.views.contracts.description' + defaultMessage='Watch and interact with specific contracts that have been deployed on the network. This is a more technically-focused environment, specifically for advanced users that understand the inner working of certain contracts.' /> + ) + } + { + this.renderView('status', + <FormattedMessage + id='settings.views.status.label' />, + <FormattedMessage + id='settings.views.status.description' + defaultMessage='See how the Parity node is performing in terms of connections to the network, logs from the actual running instance and details of mining (if enabled and configured).' /> + ) + } + { + this.renderView('signer', + <FormattedMessage + id='settings.views.signer.label' />, + <FormattedMessage + id='settings.views.signer.description' + defaultMessage='The secure transaction management area of the application where you can approve any outgoing transactions made from the application as well as those placed into the queue by distributed applications.' /> + ) + } + { + this.renderView('settings', + <FormattedMessage + id='settings.views.settings.label' />, + <FormattedMessage + id='settings.views.settings.description' + defaultMessage='This view. Allows you to customize the application in term of options, operation and look and feel.' /> + ) + } </div> </div> </Container> @@ -51,37 +132,45 @@ class Views extends Component { } renderViews () { - const { settings, toggleView } = this.props; + const { settings } = this.props; return Object.keys(settings.views).map((id) => { - const toggle = () => toggleView(id); - const view = settings.views[id]; - const label = ( - <div className={ styles.header }> - <div className={ styles.labelicon }> - { view.icon } - </div> - <div className={ styles.label }> - { view.label } - </div> - </div> - ); + const description = <FormattedMessage id={ `settings.views.${id}.description` } />; + const label = <FormattedMessage id={ `settings.views.${id}.label` } />; - return ( - <div className={ styles.view } key={ id }> - <Checkbox - disabled={ view.fixed } - label={ label } - onCheck={ toggle } - checked={ view.active } - value={ view.active } /> - <div className={ styles.info }> - { view.description } - </div> - </div> - ); + this.renderView(id, label, description); }); } + + renderView = (id, label, description) => { + const { settings, toggleView } = this.props; + + const toggle = () => toggleView(id); + const view = settings.views[id]; + + return ( + <div className={ styles.view } key={ id }> + <Checkbox + disabled={ view.fixed } + label={ + <div className={ styles.header }> + <div className={ styles.labelicon }> + { view.icon } + </div> + <div className={ styles.label }> + { label } + </div> + </div> + } + onCheck={ toggle } + checked={ view.active } + value={ view.active } /> + <div className={ styles.info }> + { description } + </div> + </div> + ); + } } function mapStateToProps (state) { diff --git a/js/src/views/Settings/settings.js b/js/src/views/Settings/settings.js index a6c455dad..90bec3c62 100644 --- a/js/src/views/Settings/settings.js +++ b/js/src/views/Settings/settings.js @@ -15,6 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { Tab, Tabs } from 'material-ui'; import ActionSettingsEthernet from 'material-ui/svg-icons/action/settings-ethernet'; import ImageBlurOn from 'material-ui/svg-icons/image/blur-on'; @@ -46,7 +47,11 @@ export default class Settings extends Component { return ( <div> - <Actionbar title='settings' className={ styles.bar }> + <Actionbar + className={ styles.bar } + title={ + <FormattedMessage id='settings.label' /> + }> <Tabs className={ styles.tabs } value={ hash }> { this.renderTab(hash, 'views', <ImageRemoveRedEye />) } { this.renderTab(hash, 'background', <ImageBlurOn />) } @@ -64,12 +69,20 @@ export default class Settings extends Component { renderTab (hash, section, icon) { return ( <Tab - className={ hash === section ? styles.tabactive : styles.tab } - value={ section } - key={ section } + className={ + hash === section + ? styles.tabactive + : styles.tab + } icon={ icon } - label={ <div className={ styles.menu }>{ section }</div> } - onActive={ this.onActivate(section) } /> + key={ section } + label={ + <div className={ styles.menu }> + <FormattedMessage id={ `settings.${section}.label` } /> + </div> + } + onActive={ this.onActivate(section) } + value={ section } /> ); } diff --git a/js/webpack/app.js b/js/webpack/app.js index a7b086b96..e63e91969 100644 --- a/js/webpack/app.js +++ b/js/webpack/app.js @@ -17,6 +17,7 @@ const webpack = require('webpack'); const path = require('path'); +const ReactIntlAggregatePlugin = require('react-intl-aggregate-webpack-plugin'); const WebpackErrorNotificationPlugin = require('webpack-error-notification'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); @@ -163,7 +164,15 @@ module.exports = { })); if (!isProd) { + const DEST_I18N = path.join(__dirname, '..', DEST, 'i18n'); + plugins.push( + new ReactIntlAggregatePlugin({ + messagesPattern: DEST_I18N + '/src/**/*.json', + aggregateOutputDir: DEST_I18N + '/i18n/', + aggregateFilename: 'en' + }), + new webpack.optimize.CommonsChunkPlugin({ filename: 'commons.[hash:10].js', name: 'commons', From 929b6ee0f7165dfa77eb9e237d81d286bc5bcebe Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jacogr@gmail.com> Date: Sun, 11 Dec 2016 17:43:51 +0100 Subject: [PATCH 116/131] Allow editing of gasPrice & gas in Signer (#3777) * Rework gas display (maintainable) * Move GasPriceSelector to ui * Allow opening of gas component (WIP) * Merge * Consistency * Adjust for Signer display * Set maximum height based on screen size * Gas editor displays in-place * Cleanups * Merge * Style fixes * Fixup stash mishap (again) * Add store test * Allow edited values to refrect on the display * Fix properties * Adjust styling to show different rows * git mv * git mv * Style fixes * Style updates * Pass gas & gasPrice with confirmation * Fix build (case) * Style fixes * Basic GasPriceEditor smoketest * manual move 1 * manual move 2 * manual move 1 * manual move 2 * NODE_ENV=test ace fix * UI smoketests * Style * Format options via formatter * Initial version * Re-add even/odd class * re-add gasLimit to embedded passing * style * Updated for passing gas & price to store * Allow gas/price overrides when none available * Fix slider value, pass as number --- js/src/api/rpc/signer/signer.js | 4 +- .../modals/ExecuteContract/executeContract.js | 2 +- js/src/modals/Transfer/store.js | 2 +- js/src/modals/Transfer/transfer.js | 9 +- js/src/redux/providers/signerMiddleware.js | 6 +- js/src/ui/Editor/mode-solidity.js | 6 + .../GasPriceSelector/gasPriceSelector.js | 556 ------------------ js/src/ui/GasPriceEditor/gasPriceEditor.css | 10 +- js/src/ui/GasPriceEditor/gasPriceEditor.js | 52 +- .../ui/GasPriceEditor/gasPriceEditor.spec.js | 45 ++ js/src/ui/GasPriceEditor/store.js | 86 ++- js/src/ui/GasPriceEditor/store.spec.js | 197 +++++++ .../GasPriceSelector/CustomBar/customBar.js | 77 +++ js/src/ui/GasPriceSelector/CustomBar/index.js | 17 + .../CustomCursor/customCursor.js | 73 +++ .../ui/GasPriceSelector/CustomCursor/index.js | 17 + .../CustomShape/customShape.js | 52 ++ .../ui/GasPriceSelector/CustomShape/index.js | 17 + .../CustomTooltip/customTooltip.js | 53 ++ .../GasPriceSelector/CustomTooltip/index.js | 17 + .../GasPriceSelector/gasPriceSelector.css | 6 +- .../ui/GasPriceSelector/gasPriceSelector.js | 341 +++++++++++ .../GasPriceSelector/index.js | 0 js/src/ui/GasPriceSelector/util.js | 34 ++ js/src/ui/index.js | 2 + js/src/views/ParityBar/parityBar.css | 2 +- .../{AccountLink.css => accountLink.css} | 0 .../{AccountLink.js => accountLink.js} | 2 +- .../components/Account/AccountLink/index.js | 2 +- .../Account/{Account.css => account.css} | 0 .../Account/{Account.js => account.js} | 2 +- .../views/Signer/components/Account/index.js | 2 +- .../RequestPending/requestPending.js | 48 +- .../Signer/components/SignRequest/index.js | 2 +- .../{SignRequest.css => signRequest.css} | 0 .../{SignRequest.js => signRequest.js} | 4 +- .../SignRequest/signRequest.spec.js | 34 ++ .../TransactionMainDetails/index.js | 2 +- ...Details.css => transactionMainDetails.css} | 34 +- ...inDetails.js => transactionMainDetails.js} | 120 ++-- .../components/TransactionPending/index.js | 2 +- ...tionPending.css => transactionPending.css} | 6 +- ...actionPending.js => transactionPending.js} | 115 ++-- .../TransactionPendingFormConfirm/index.js | 2 +- ....css => transactionPendingFormConfirm.css} | 0 ...rm.js => transactionPendingFormConfirm.js} | 85 +-- .../TransactionPendingFormReject/index.js | 2 +- ...t.css => transactionPendingFormReject.css} | 0 ...ect.js => transactionPendingFormReject.js} | 2 +- .../TransactionPendingForm/index.js | 2 +- ...ingForm.css => transactionPendingForm.css} | 0 ...ndingForm.js => transactionPendingForm.js} | 18 +- .../Signer/components/TxHashLink/index.js | 2 +- .../{TxHashLink.js => txHashLink.js} | 13 +- .../Signer/containers/Embedded/embedded.css | 18 +- .../Signer/containers/Embedded/embedded.js | 33 +- .../Signer/containers/RequestsPage/index.js | 2 +- .../{RequestsPage.css => requestsPage.css} | 6 + .../{RequestsPage.js => requestsPage.js} | 36 +- 59 files changed, 1423 insertions(+), 856 deletions(-) delete mode 100644 js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.js create mode 100644 js/src/ui/GasPriceEditor/gasPriceEditor.spec.js create mode 100644 js/src/ui/GasPriceEditor/store.spec.js create mode 100644 js/src/ui/GasPriceSelector/CustomBar/customBar.js create mode 100644 js/src/ui/GasPriceSelector/CustomBar/index.js create mode 100644 js/src/ui/GasPriceSelector/CustomCursor/customCursor.js create mode 100644 js/src/ui/GasPriceSelector/CustomCursor/index.js create mode 100644 js/src/ui/GasPriceSelector/CustomShape/customShape.js create mode 100644 js/src/ui/GasPriceSelector/CustomShape/index.js create mode 100644 js/src/ui/GasPriceSelector/CustomTooltip/customTooltip.js create mode 100644 js/src/ui/GasPriceSelector/CustomTooltip/index.js rename js/src/ui/{GasPriceEditor => }/GasPriceSelector/gasPriceSelector.css (92%) create mode 100644 js/src/ui/GasPriceSelector/gasPriceSelector.js rename js/src/ui/{GasPriceEditor => }/GasPriceSelector/index.js (100%) create mode 100644 js/src/ui/GasPriceSelector/util.js rename js/src/views/Signer/components/Account/AccountLink/{AccountLink.css => accountLink.css} (100%) rename js/src/views/Signer/components/Account/AccountLink/{AccountLink.js => accountLink.js} (97%) rename js/src/views/Signer/components/Account/{Account.css => account.css} (100%) rename js/src/views/Signer/components/Account/{Account.js => account.js} (98%) rename js/src/views/Signer/components/SignRequest/{SignRequest.css => signRequest.css} (100%) rename js/src/views/Signer/components/SignRequest/{SignRequest.js => signRequest.js} (97%) create mode 100644 js/src/views/Signer/components/SignRequest/signRequest.spec.js rename js/src/views/Signer/components/TransactionMainDetails/{TransactionMainDetails.css => transactionMainDetails.css} (95%) rename js/src/views/Signer/components/TransactionMainDetails/{TransactionMainDetails.js => transactionMainDetails.js} (65%) rename js/src/views/Signer/components/TransactionPending/{TransactionPending.css => transactionPending.css} (92%) rename js/src/views/Signer/components/TransactionPending/{TransactionPending.js => transactionPending.js} (57%) rename js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/{TransactionPendingFormConfirm.css => transactionPendingFormConfirm.css} (100%) rename js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/{TransactionPendingFormConfirm.js => transactionPendingFormConfirm.js} (71%) rename js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/{TransactionPendingFormReject.css => transactionPendingFormReject.css} (100%) rename js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/{TransactionPendingFormReject.js => transactionPendingFormReject.js} (96%) rename js/src/views/Signer/components/TransactionPendingForm/{TransactionPendingForm.css => transactionPendingForm.css} (100%) rename js/src/views/Signer/components/TransactionPendingForm/{TransactionPendingForm.js => transactionPendingForm.js} (88%) rename js/src/views/Signer/components/TxHashLink/{TxHashLink.js => txHashLink.js} (84%) rename js/src/views/Signer/containers/RequestsPage/{RequestsPage.css => requestsPage.css} (90%) rename js/src/views/Signer/containers/RequestsPage/{RequestsPage.js => requestsPage.js} (88%) diff --git a/js/src/api/rpc/signer/signer.js b/js/src/api/rpc/signer/signer.js index 126ce651a..a24d8b919 100644 --- a/js/src/api/rpc/signer/signer.js +++ b/js/src/api/rpc/signer/signer.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import { inNumber16, inData } from '../../format/input'; +import { inData, inNumber16, inOptions } from '../../format/input'; import { outSignerRequest } from '../../format/output'; export default class Signer { @@ -24,7 +24,7 @@ export default class Signer { confirmRequest (requestId, options, password) { return this._transport - .execute('signer_confirmRequest', inNumber16(requestId), options, password); + .execute('signer_confirmRequest', inNumber16(requestId), inOptions(options), password); } confirmRequestRaw (requestId, data) { diff --git a/js/src/modals/ExecuteContract/executeContract.js b/js/src/modals/ExecuteContract/executeContract.js index c3ac96490..cdd816ee3 100644 --- a/js/src/modals/ExecuteContract/executeContract.js +++ b/js/src/modals/ExecuteContract/executeContract.js @@ -66,7 +66,7 @@ class ExecuteContract extends Component { onFromAddressChange: PropTypes.func.isRequired } - gasStore = new GasPriceEditor.Store(this.context.api, this.props.gasLimit); + gasStore = new GasPriceEditor.Store(this.context.api, { gasLimit: this.props.gasLimit }); state = { amount: '0', diff --git a/js/src/modals/Transfer/store.js b/js/src/modals/Transfer/store.js index e08d7203d..412cac60c 100644 --- a/js/src/modals/Transfer/store.js +++ b/js/src/modals/Transfer/store.js @@ -112,7 +112,7 @@ export default class TransferStore { this.isWallet = account && account.wallet; this.newError = newError; - this.gasStore = new GasPriceStore(api, gasLimit); + this.gasStore = new GasPriceStore(api, { gasLimit }); if (this.isWallet) { this.wallet = props.wallet; diff --git a/js/src/modals/Transfer/transfer.js b/js/src/modals/Transfer/transfer.js index 57dc569f2..1ecc60edf 100644 --- a/js/src/modals/Transfer/transfer.js +++ b/js/src/modals/Transfer/transfer.js @@ -80,8 +80,9 @@ class Transfer extends Component { <div className={ styles.hdraccount }> <div className={ styles.hdrimage }> <IdentityIcon - inline center - address={ account.address } /> + address={ account.address } + center + inline /> </div> <div className={ styles.hdrdetails }> <div className={ styles.hdrname }> @@ -165,18 +166,18 @@ class Transfer extends Component { balance={ balance } extras={ extras } images={ images } - senders={ senders } + onChange={ this.store.onUpdateDetails } recipient={ recipient } recipientError={ recipientError } sender={ sender } senderError={ senderError } + senders={ senders } sendersBalances={ sendersBalances } tag={ tag } total={ total } totalError={ totalError } value={ value } valueError={ valueError } - onChange={ this.store.onUpdateDetails } wallet={ account.wallet && this.props.wallet } /> ); diff --git a/js/src/redux/providers/signerMiddleware.js b/js/src/redux/providers/signerMiddleware.js index 1a6cbb129..c0c5d7613 100644 --- a/js/src/redux/providers/signerMiddleware.js +++ b/js/src/redux/providers/signerMiddleware.js @@ -52,9 +52,9 @@ export default class SignerMiddleware { } onConfirmStart = (store, action) => { - const { id, password, wallet, payload } = action.payload; + const { gas, gasPrice, id, password, payload, wallet } = action.payload; - const handlePromise = promise => { + const handlePromise = (promise) => { promise .then((txHash) => { console.log('confirmRequest', id, txHash); @@ -102,7 +102,7 @@ export default class SignerMiddleware { return; } - handlePromise(this._api.signer.confirmRequest(id, {}, password)); + handlePromise(this._api.signer.confirmRequest(id, { gas, gasPrice }, password)); } onRejectStart = (store, action) => { diff --git a/js/src/ui/Editor/mode-solidity.js b/js/src/ui/Editor/mode-solidity.js index f974c9e0f..0d1b95c67 100644 --- a/js/src/ui/Editor/mode-solidity.js +++ b/js/src/ui/Editor/mode-solidity.js @@ -22,6 +22,12 @@ /* eslint-disable */ var ace = window.ace; +if (process.env.NODE_ENV === 'test') { + if (!ace.define) { + ace.define = () => {}; + } +} + ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports, module) { "use strict"; diff --git a/js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.js b/js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.js deleted file mode 100644 index 893a50188..000000000 --- a/js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.js +++ /dev/null @@ -1,556 +0,0 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see <http://www.gnu.org/licenses/>. - -import React, { Component, PropTypes } from 'react'; - -import { - Bar, BarChart, - Rectangle, - Scatter, ScatterChart, - Tooltip, - XAxis, YAxis, - Dot, - ResponsiveContainer -} from 'recharts'; - -import Slider from 'material-ui/Slider'; -import BigNumber from 'bignumber.js'; - -import styles from './gasPriceSelector.css'; - -const COLORS = { - default: 'rgba(255, 99, 132, 0.2)', - selected: 'rgba(255, 99, 132, 0.5)', - hover: 'rgba(255, 99, 132, 0.15)', - grid: 'rgba(255, 99, 132, 0.5)', - line: 'rgb(255, 99, 132)', - intersection: '#fff' -}; - -const countModifier = (count) => { - const val = count.toNumber ? count.toNumber() : count; - return Math.log10(val + 1) + 0.1; -}; - -class CustomCursor extends Component { - static propTypes = { - x: PropTypes.number, - y: PropTypes.number, - width: PropTypes.number, - height: PropTypes.number, - onClick: PropTypes.func, - getIndex: PropTypes.func, - counts: PropTypes.array, - yDomain: PropTypes.array - } - - render () { - const { x, y, width, height, getIndex, counts, yDomain } = this.props; - - const index = getIndex(); - - if (index === -1) { - return null; - } - - const count = countModifier(counts[index]); - const barHeight = (count / yDomain[1]) * (y + height); - - return ( - <g> - <Rectangle - x={ x } - y={ 0 } - width={ width } - height={ height + y } - fill='transparent' - onClick={ this.onClick } - /> - <Rectangle - x={ x } - y={ y + (height - barHeight) } - width={ width } - height={ barHeight } - fill={ COLORS.hover } - onClick={ this.onClick } - /> - </g> - ); - } - - onClick = () => { - const { onClick, getIndex } = this.props; - const index = getIndex(); - onClick({ index }); - } -} - -class CustomBar extends Component { - static propTypes = { - selected: PropTypes.number, - x: PropTypes.number, - y: PropTypes.number, - width: PropTypes.number, - height: PropTypes.number, - index: PropTypes.number, - onClick: PropTypes.func - } - - render () { - const { x, y, selected, index, width, height, onClick } = this.props; - - const fill = selected === index - ? COLORS.selected - : COLORS.default; - - const borderWidth = 0.5; - const borderColor = 'rgba(255, 255, 255, 0.5)'; - - return ( - <g> - <Rectangle - x={ x - borderWidth } - y={ y } - width={ borderWidth } - height={ height } - fill={ borderColor } - /> - <Rectangle - x={ x + width } - y={ y } - width={ borderWidth } - height={ height } - fill={ borderColor } - /> - <Rectangle - x={ x - borderWidth } - y={ y - borderWidth } - width={ width + borderWidth * 2 } - height={ borderWidth } - fill={ borderColor } - /> - <Rectangle - x={ x } - y={ y } - width={ width } - height={ height } - fill={ fill } - onClick={ onClick } - /> - </g> - ); - } -} - -class CustomizedShape extends Component { - static propTypes = { - showValue: PropTypes.number.isRequired, - cx: PropTypes.number, - cy: PropTypes.number, - payload: PropTypes.object - } - - render () { - const { cx, cy, showValue, payload } = this.props; - - if (showValue !== payload.y) { - return null; - } - - return ( - <g> - <Dot - style={ { fill: 'white' } } - cx={ cx } - cy={ cy } - r={ 5 } - /> - <Dot - style={ { fill: 'rgb(255, 99, 132)' } } - cx={ cx } - cy={ cy } - r={ 3 } - /> - </g> - ); - } -} - -class CustomTooltip extends Component { - static propTypes = { - gasPriceHistogram: PropTypes.object.isRequired, - type: PropTypes.string, - payload: PropTypes.array, - label: PropTypes.number, - active: PropTypes.bool - } - - render () { - const { active, label, gasPriceHistogram } = this.props; - - if (!active) { - return null; - } - - const index = label; - - const count = gasPriceHistogram.counts[index]; - const minGasPrice = gasPriceHistogram.bucketBounds[index]; - const maxGasPrice = gasPriceHistogram.bucketBounds[index + 1]; - - return ( - <div> - <p className='label'> - { count.toNumber() } transactions - with gas price set from - <span> { minGasPrice.toFormat(0) } </span> - to - <span> { maxGasPrice.toFormat(0) } </span> - </p> - </div> - ); - } -} - -const TOOL_STYLE = { - color: 'rgba(255,255,255,0.5)', - backgroundColor: 'rgba(0, 0, 0, 0.75)', - padding: '0 0.5em', - fontSize: '0.75em' -}; - -export default class GasPriceSelector extends Component { - static propTypes = { - gasPriceHistogram: PropTypes.object.isRequired, - onChange: PropTypes.func.isRequired, - - gasPrice: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.object - ]) - } - - state = { - gasPrice: null, - sliderValue: 0.5, - selectedIndex: 0, - - chartData: { - values: [], - xDomain: [], - yDomain: [], - N: 0 - } - } - - componentWillMount () { - this.computeCharts(); - this.setGasPrice(); - } - - componentWillReceiveProps (nextProps) { - if (nextProps.gasPrice !== this.props.gasPrice) { - this.setGasPrice(nextProps); - } - } - - componentWillUpdate (nextProps, nextState) { - if (Math.floor(nextState.sliderValue) !== Math.floor(this.state.sliderValue)) { - this.updateSelectedBarChart(nextState); - } - } - - render () { - return ( - <div> - { this.renderChart() } - { this.renderSlider() } - </div> - ); - } - - renderSlider () { - const { sliderValue } = this.state; - - return ( - <div className={ styles.columns }> - <Slider - min={ 0 } - max={ 1 } - value={ sliderValue } - onChange={ this.onEditGasPriceSlider } - style={ { - flex: 1, - padding: '0 0.3em' - } } - sliderStyle={ { - marginBottom: 12 - } } - /> - </div> - ); - } - - renderChart () { - const { gasPriceHistogram } = this.props; - const { chartData, sliderValue, selectedIndex } = this.state; - - if (chartData.values.length === 0) { - return null; - } - - const height = 300; - const countIndex = Math.max(0, Math.min(selectedIndex, gasPriceHistogram.counts.length - 1)); - const selectedCount = countModifier(gasPriceHistogram.counts[countIndex]); - - return ( - <div className={ styles.columns }> - <div style={ { flex: 1, height } }> - <div className={ styles.chart }> - <ResponsiveContainer - height={ height } - > - <ScatterChart - margin={ { top: 0, right: 0, left: 0, bottom: 0 } } - > - <Scatter - data={ [ - { x: sliderValue, y: 0 }, - { x: sliderValue, y: selectedCount }, - { x: sliderValue, y: chartData.yDomain[1] } - ] } - shape={ <CustomizedShape showValue={ selectedCount } /> } - line - isAnimationActive={ false } - /> - - <XAxis - hide - height={ 0 } - dataKey='x' - domain={ [0, 1] } - /> - <YAxis - hide - width={ 0 } - dataKey='y' - domain={ chartData.yDomain } - /> - </ScatterChart> - </ResponsiveContainer> - </div> - - <div className={ styles.chart }> - <ResponsiveContainer - height={ height } - > - <BarChart - data={ chartData.values } - margin={ { top: 0, right: 0, left: 0, bottom: 0 } } - barCategoryGap={ 1 } - ref='barChart' - > - <Bar - dataKey='value' - stroke={ COLORS.line } - onClick={ this.onClickGasPrice } - shape={ <CustomBar selected={ selectedIndex } onClick={ this.onClickGasPrice } /> } - /> - - <Tooltip - wrapperStyle={ TOOL_STYLE } - cursor={ this.renderCustomCursor() } - content={ <CustomTooltip gasPriceHistogram={ gasPriceHistogram } /> } - /> - - <XAxis - hide - dataKey='index' - type='category' - domain={ chartData.xDomain } - /> - <YAxis - hide - type='number' - domain={ chartData.yDomain } - /> - </BarChart> - </ResponsiveContainer> - </div> - </div> - </div> - ); - } - - renderCustomCursor = () => { - const { gasPriceHistogram } = this.props; - const { chartData } = this.state; - - return ( - <CustomCursor - getIndex={ this.getBarHoverIndex } - onClick={ this.onClickGasPrice } - counts={ gasPriceHistogram.counts } - yDomain={ chartData.yDomain } - /> - ); - } - - getBarHoverIndex = () => { - const { barChart } = this.refs; - - if (!barChart || !barChart.state) { - return -1; - } - - return barChart.state.activeTooltipIndex; - } - - computeChartsData () { - const { gasPriceChartData } = this.state; - const { gasPriceHistogram } = this.props; - - const values = gasPriceChartData - .map((value, index) => ({ value, index })); - - const N = values.length - 1; - const maxGasCounts = countModifier( - gasPriceHistogram - .counts - .reduce((max, count) => count.greaterThan(max) ? count : max, 0) - ); - - const xDomain = [0, N]; - const yDomain = [0, maxGasCounts * 1.1]; - - const chartData = { - values, N, - xDomain, yDomain - }; - - this.setState({ chartData }, () => { - this.updateSelectedBarChart(); - }); - } - - computeCharts (props = this.props) { - const { gasPriceHistogram } = props; - - const gasPriceChartData = gasPriceHistogram - .counts - .map(count => countModifier(count)); - - this.setState( - { gasPriceChartData }, - () => this.computeChartsData() - ); - } - - updateSelectedBarChart (state = this.state) { - } - - setGasPrice (props = this.props) { - const { gasPrice, gasPriceHistogram } = props; - - // If no gas price yet... - if (!gasPrice) { - return this.setSliderValue(0.5); - } - - const bnGasPrice = (typeof gasPrice === 'string') - ? new BigNumber(gasPrice) - : gasPrice; - - // If gas price hasn't changed - if (this.state.gasPrice && bnGasPrice.equals(this.state.gasPrice)) { - return; - } - - const gasPrices = gasPriceHistogram.bucketBounds; - const startIndex = gasPrices - .findIndex(price => price.greaterThan(bnGasPrice)) - 1; - - // gasPrice Lower than the max in histogram - if (startIndex === -1) { - return this.setSliderValue(0, bnGasPrice); - } - - // gasPrice Greater than the max in histogram - if (startIndex === -2) { - return this.setSliderValue(1, bnGasPrice); - } - - const priceA = gasPrices[startIndex]; - const priceB = gasPrices[startIndex + 1]; - - const sliderValueDec = bnGasPrice - .minus(priceA) - .dividedBy(priceB.minus(priceA)) - .toNumber(); - - const sliderValue = (startIndex + sliderValueDec) / (gasPrices.length - 1); - this.setSliderValue(sliderValue, bnGasPrice); - } - - setSliderValue (value, gasPrice = this.state.gasPrice) { - const { gasPriceHistogram } = this.props; - - const N = gasPriceHistogram.bucketBounds.length - 1; - - const sliderValue = Math.max(0, Math.min(value, 1)); - const selectedIndex = Math.floor(sliderValue * N); - - this.setState({ sliderValue, gasPrice, selectedIndex }); - } - - onBarChartMouseUp = (event) => { - console.log(event); - } - - onClickGasPrice = (bar) => { - const { index } = bar; - - const ratio = (index + 0.5) / (this.state.chartData.N + 1); - - this.onEditGasPriceSlider(null, ratio); - } - - onEditGasPriceSlider = (event, sliderValue) => { - const { gasPriceHistogram } = this.props; - - const gasPrices = gasPriceHistogram.bucketBounds; - const N = gasPrices.length - 1; - const gasPriceAIdx = Math.floor(sliderValue * N); - const gasPriceBIdx = gasPriceAIdx + 1; - - if (gasPriceBIdx === N + 1) { - const gasPrice = gasPrices[gasPriceAIdx].round(); - this.props.onChange(event, gasPrice); - return; - } - - const gasPriceA = gasPrices[gasPriceAIdx]; - const gasPriceB = gasPrices[gasPriceBIdx]; - - const mult = Math.round((sliderValue % 1) * 100) / 100; - const gasPrice = gasPriceA - .plus(gasPriceB.minus(gasPriceA).times(mult)) - .round(); - - this.setSliderValue(sliderValue, gasPrice); - this.props.onChange(event, gasPrice); - } -} diff --git a/js/src/ui/GasPriceEditor/gasPriceEditor.css b/js/src/ui/GasPriceEditor/gasPriceEditor.css index cf1fff81c..bcb99a63b 100644 --- a/js/src/ui/GasPriceEditor/gasPriceEditor.css +++ b/js/src/ui/GasPriceEditor/gasPriceEditor.css @@ -15,16 +15,12 @@ /* along with Parity. If not, see <http://www.gnu.org/licenses/>. */ -.columns { +.container { display: flex; flex-wrap: wrap; position: relative; } -.graphColumn { - flex: 65; -} - .editColumn { flex: 35; padding-left: 1em; @@ -41,6 +37,10 @@ opacity: 0.5; } +.graphColumn { + flex: 65; +} + .row { display: flex; flex-wrap: wrap; diff --git a/js/src/ui/GasPriceEditor/gasPriceEditor.js b/js/src/ui/GasPriceEditor/gasPriceEditor.js index 8c94dfca7..423afc45b 100644 --- a/js/src/ui/GasPriceEditor/gasPriceEditor.js +++ b/js/src/ui/GasPriceEditor/gasPriceEditor.js @@ -15,11 +15,11 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import BigNumber from 'bignumber.js'; -import React, { Component, PropTypes } from 'react'; import { observer } from 'mobx-react'; +import React, { Component, PropTypes } from 'react'; import Input from '../Form/Input'; -import GasPriceSelector from './GasPriceSelector'; +import GasPriceSelector from '../GasPriceSelector'; import Store from './store'; import styles from './gasPriceEditor.css'; @@ -31,62 +31,60 @@ export default class GasPriceEditor extends Component { }; static propTypes = { - store: PropTypes.object.isRequired, - onChange: PropTypes.func + children: PropTypes.node, + onChange: PropTypes.func, + store: PropTypes.object.isRequired } static Store = Store; render () { const { api } = this.context; - const { store } = this.props; - const { estimated, priceDefault, price, gas, histogram, errorGas, errorPrice, errorTotal, totalValue } = store; + const { children, store } = this.props; + const { errorGas, errorPrice, errorTotal, estimated, gas, histogram, price, priceDefault, totalValue } = store; const eth = api.util.fromWei(totalValue).toFormat(); const gasLabel = `gas (estimated: ${new BigNumber(estimated).toFormat()})`; const priceLabel = `price (current: ${new BigNumber(priceDefault).toFormat()})`; return ( - <div className={ styles.columns }> + <div className={ styles.container }> <div className={ styles.graphColumn }> <GasPriceSelector - gasPriceHistogram={ histogram } - gasPrice={ price } - onChange={ this.onEditGasPrice } /> + histogram={ histogram } + onChange={ this.onEditGasPrice } + price={ price } /> <div className={ styles.gasPriceDesc }> - You can choose the gas price based on the - distribution of recent included transaction gas prices. - The lower the gas price is, the cheaper the transaction will - be. The higher the gas price is, the faster it should - get mined by the network. + You can choose the gas price based on the distribution of recent included transaction gas prices. The lower the gas price is, the cheaper the transaction will be. The higher the gas price is, the faster it should get mined by the network. </div> </div> <div className={ styles.editColumn }> <div className={ styles.row }> <Input - label={ gasLabel } - hint='the amount of gas to use for the transaction' error={ errorGas } - value={ gas } - onChange={ this.onEditGas } /> - + hint='the amount of gas to use for the transaction' + label={ gasLabel } + onChange={ this.onEditGas } + value={ gas } /> <Input - label={ priceLabel } - hint='the price of gas to use for the transaction' error={ errorPrice } - value={ price } - onChange={ this.onEditGasPrice } /> + hint='the price of gas to use for the transaction' + label={ priceLabel } + onChange={ this.onEditGasPrice } + value={ price } /> </div> - <div className={ styles.row }> <Input disabled - label='total transaction amount' - hint='the total amount of the transaction' error={ errorTotal } + hint='the total amount of the transaction' + label='total transaction amount' value={ `${eth} ETH` } /> </div> + <div className={ styles.row }> + { children } + </div> </div> </div> ); diff --git a/js/src/ui/GasPriceEditor/gasPriceEditor.spec.js b/js/src/ui/GasPriceEditor/gasPriceEditor.spec.js new file mode 100644 index 000000000..4197bc876 --- /dev/null +++ b/js/src/ui/GasPriceEditor/gasPriceEditor.spec.js @@ -0,0 +1,45 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import BigNumber from 'bignumber.js'; +import { shallow } from 'enzyme'; +import React from 'react'; +import sinon from 'sinon'; + +import GasPriceEditor from './'; + +const api = { + util: { + fromWei: (value) => new BigNumber(value) + } +}; + +const store = { + estimated: '123', + priceDefault: '456', + totalValue: '789', + setGas: sinon.stub(), + setPrice: sinon.stub() +}; + +describe('ui/GasPriceEditor', () => { + it('renders', () => { + expect(shallow( + <GasPriceEditor store={ store } />, + { context: { api } } + )).to.be.ok; + }); +}); diff --git a/js/src/ui/GasPriceEditor/store.js b/js/src/ui/GasPriceEditor/store.js index afa5e15b2..4fc16b83c 100644 --- a/js/src/ui/GasPriceEditor/store.js +++ b/js/src/ui/GasPriceEditor/store.js @@ -26,18 +26,22 @@ export default class GasPriceEditor { @observable errorPrice = null; @observable errorTotal = null; @observable estimated = DEFAULT_GAS; + @observable gas; + @observable gasLimit; @observable histogram = null; - @observable price = DEFAULT_GASPRICE; - @observable priceDefault = DEFAULT_GASPRICE; - @observable gas = DEFAULT_GAS; - @observable gasLimit = 0; + @observable isEditing = false; + @observable price; + @observable priceDefault; @observable weiValue = '0'; - constructor (api, gasLimit, loadDefaults = true) { + constructor (api, { gas, gasLimit, gasPrice }) { this._api = api; - this.gasLimit = gasLimit; - if (loadDefaults) { + this.gas = gas; + this.gasLimit = gasLimit; + this.price = gasPrice; + + if (api) { this.loadDefaults(); } } @@ -50,6 +54,10 @@ export default class GasPriceEditor { } } + @action setEditing = (isEditing) => { + this.isEditing = isEditing; + } + @action setErrorTotal = (errorTotal) => { this.errorTotal = errorTotal; } @@ -74,6 +82,30 @@ export default class GasPriceEditor { this.weiValue = weiValue; } + @action setGas = (gas) => { + transaction(() => { + const { numberError } = validatePositiveNumber(gas); + + this.gas = gas; + + if (numberError) { + this.errorGas = numberError; + } else { + const bn = new BigNumber(gas); + + if (bn.gte(this.gasLimit)) { + this.errorGas = ERRORS.gasBlockLimit; + } else { + this.errorGas = null; + } + } + }); + } + + @action setGasLimit = (gasLimit) => { + this.gasLimit = gasLimit; + } + @action setHistogram = (gasHistogram) => { this.histogram = gasHistogram; } @@ -85,39 +117,37 @@ export default class GasPriceEditor { }); } - @action setGas = (gas) => { - transaction(() => { - const { numberError } = validatePositiveNumber(gas); - const bn = new BigNumber(gas); - - this.gas = gas; - - if (numberError) { - this.errorGas = numberError; - } else if (bn.gte(this.gasLimit)) { - this.errorGas = ERRORS.gasBlockLimit; - } else { - this.errorGas = null; - } - }); - } - @action loadDefaults () { Promise .all([ this._api.parity.gasPriceHistogram(), this._api.eth.gasPrice() ]) - .then(([gasPriceHistogram, gasPrice]) => { + .then(([histogram, _price]) => { transaction(() => { - this.setPrice(gasPrice.toFixed(0)); - this.setHistogram(gasPriceHistogram); + const price = _price.toFixed(0); - this.priceDefault = gasPrice.toFixed(); + if (!this.price) { + this.setPrice(price); + } + this.setHistogram(histogram); + + this.priceDefault = price; }); }) .catch((error) => { console.warn('getDefaults', error); }); } + + overrideTransaction = (transaction) => { + if (this.errorGas || this.errorPrice) { + return transaction; + } + + return Object.assign({}, transaction, { + gas: new BigNumber(this.gas || DEFAULT_GAS), + gasPrice: new BigNumber(this.price || DEFAULT_GASPRICE) + }); + } } diff --git a/js/src/ui/GasPriceEditor/store.spec.js b/js/src/ui/GasPriceEditor/store.spec.js new file mode 100644 index 000000000..bbee1b8c4 --- /dev/null +++ b/js/src/ui/GasPriceEditor/store.spec.js @@ -0,0 +1,197 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import BigNumber from 'bignumber.js'; +import sinon from 'sinon'; + +import { DEFAULT_GAS, DEFAULT_GASPRICE, MAX_GAS_ESTIMATION } from '~/util/constants'; +import { ERRORS } from '~/util/validation'; + +import GasPriceEditor from './gasPriceEditor'; + +const { Store } = GasPriceEditor; + +const GASPRICE = new BigNumber(123456); +const GASLIMIT = 100000; +const HISTOGRAM = { + bucketBounds: [1, 2], + counts: [3, 4] +}; + +const api = { + eth: { + gasPrice: sinon.stub().resolves(GASPRICE) + }, + parity: { + gasPriceHistogram: sinon.stub().resolves(HISTOGRAM) + } +}; + +describe('ui/GasPriceEditor/store', () => { + let store = null; + + it('is available via GasPriceEditor.Store', () => { + expect(new Store(null, {})).to.be.ok; + }); + + describe('constructor (defaults)', () => { + beforeEach(() => { + store = new Store(api, { gasLimit: GASLIMIT }); + }); + + it('retrieves the histogram and gasPrice', () => { + expect(api.eth.gasPrice).to.have.been.called; + expect(api.parity.gasPriceHistogram).to.have.been.called; + }); + + it('sets the gasLimit as passed', () => { + expect(store.gasLimit).to.equal(GASLIMIT); + }); + }); + + describe('setters', () => { + beforeEach(() => { + store = new Store(null, { gasLimit: GASLIMIT }); + }); + + describe('setEditing', () => { + it('sets the value', () => { + expect(store.isEditing).to.be.false; + store.setEditing(true); + expect(store.isEditing).to.be.true; + }); + }); + + describe('setErrorTotal', () => { + it('sets the value', () => { + store.setErrorTotal('errorTotal'); + expect(store.errorTotal).to.equal('errorTotal'); + }); + }); + + describe('setEstimated', () => { + it('sets the value', () => { + store.setEstimated('789'); + expect(store.estimated).to.equal('789'); + }); + + it('sets error when above exception max', () => { + store.setEstimated(MAX_GAS_ESTIMATION); + expect(store.errorEstimated).to.equal(ERRORS.gasException); + }); + + it('sets error when above gaslimit', () => { + store.setEstimated(GASLIMIT); + expect(store.errorEstimated).to.equal(ERRORS.gasBlockLimit); + }); + }); + + describe('setEthValue', () => { + it('sets the value', () => { + store.setEthValue('123'); + expect(store.weiValue).to.equal('123'); + }); + }); + + describe('setGas', () => { + it('sets the value', () => { + store.setGas('123'); + expect(store.gas).to.equal('123'); + expect(store.errorGas).to.be.null; + }); + + it('sets error on negative numbers', () => { + store.setGas(-123); + expect(store.errorGas).not.to.be.null; + }); + + it('sets error when above block limit', () => { + store.setGas(GASLIMIT); + expect(store.errorGas).to.equal(ERRORS.gasBlockLimit); + }); + }); + + describe('setGasLimit', () => { + it('sets the value', () => { + store.setGasLimit('123'); + expect(store.gasLimit).to.equal('123'); + }); + }); + + describe('setHistogram', () => { + it('sets the value', () => { + store.setHistogram(HISTOGRAM); + expect(store.histogram).to.deep.equal(HISTOGRAM); + }); + }); + + describe('setPrice', () => { + it('sets the value', () => { + store.setPrice('123'); + expect(store.price).to.equal('123'); + expect(store.errorPrice).to.be.null; + }); + + it('sets error on negative numbers', () => { + store.setPrice(-123); + expect(store.errorPrice).not.to.be.null; + }); + }); + }); + + describe('computed', () => { + beforeEach(() => { + store = new Store(null, { gasLimit: GASLIMIT }); + }); + + describe('totalValue', () => { + it('holds the total including eth, price & gas', () => { + store.setPrice('123'); + store.setGas('123'); + store.setEthValue('123'); + expect(store.totalValue).to.deep.equal(new BigNumber(123 + 123 * 123)); + }); + }); + }); + + describe('methods', () => { + beforeEach(() => { + store = new Store(null, { gasLimit: GASLIMIT }); + }); + + describe('overrideTransaction', () => { + const TRANSACTION = { gas: '123', gasPrice: '456' }; + + it('overrides gas & gasPrice with values', () => { + store.setGas(DEFAULT_GAS); + const transaction = store.overrideTransaction(TRANSACTION); + + expect(transaction.gas).to.deep.equal(new BigNumber(DEFAULT_GAS)); + expect(transaction.gasPrice).to.deep.equal(new BigNumber(DEFAULT_GASPRICE)); + }); + + it('does not override with invalid gas', () => { + store.setGas(-123); + expect(store.overrideTransaction(TRANSACTION)).to.deep.equal(TRANSACTION); + }); + + it('does not override with invalid price', () => { + store.setPrice(-123); + expect(store.overrideTransaction(TRANSACTION)).to.deep.equal(TRANSACTION); + }); + }); + }); +}); diff --git a/js/src/ui/GasPriceSelector/CustomBar/customBar.js b/js/src/ui/GasPriceSelector/CustomBar/customBar.js new file mode 100644 index 000000000..60f066f97 --- /dev/null +++ b/js/src/ui/GasPriceSelector/CustomBar/customBar.js @@ -0,0 +1,77 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React, { Component, PropTypes } from 'react'; +import { Rectangle } from 'recharts'; + +import { COLORS } from '../util'; + +export default class CustomBar extends Component { + static propTypes = { + selected: PropTypes.number, + x: PropTypes.number, + y: PropTypes.number, + width: PropTypes.number, + height: PropTypes.number, + index: PropTypes.number, + onClick: PropTypes.func + } + + render () { + const { x, y, selected, index, width, height, onClick } = this.props; + + const fill = selected === index + ? COLORS.selected + : COLORS.default; + + const borderWidth = 0.5; + const borderColor = 'rgba(255, 255, 255, 0.5)'; + + return ( + <g> + <Rectangle + x={ x - borderWidth } + y={ y } + width={ borderWidth } + height={ height } + fill={ borderColor } + /> + <Rectangle + x={ x + width } + y={ y } + width={ borderWidth } + height={ height } + fill={ borderColor } + /> + <Rectangle + x={ x - borderWidth } + y={ y - borderWidth } + width={ width + borderWidth * 2 } + height={ borderWidth } + fill={ borderColor } + /> + <Rectangle + x={ x } + y={ y } + width={ width } + height={ height } + fill={ fill } + onClick={ onClick } + /> + </g> + ); + } +} diff --git a/js/src/ui/GasPriceSelector/CustomBar/index.js b/js/src/ui/GasPriceSelector/CustomBar/index.js new file mode 100644 index 000000000..fa4008e42 --- /dev/null +++ b/js/src/ui/GasPriceSelector/CustomBar/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +export default from './customBar'; diff --git a/js/src/ui/GasPriceSelector/CustomCursor/customCursor.js b/js/src/ui/GasPriceSelector/CustomCursor/customCursor.js new file mode 100644 index 000000000..8ce9a0e42 --- /dev/null +++ b/js/src/ui/GasPriceSelector/CustomCursor/customCursor.js @@ -0,0 +1,73 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React, { Component, PropTypes } from 'react'; +import { Rectangle } from 'recharts'; + +import { COLORS, countModifier } from '../util'; + +export default class CustomCursor extends Component { + static propTypes = { + x: PropTypes.number, + y: PropTypes.number, + width: PropTypes.number, + height: PropTypes.number, + onClick: PropTypes.func, + getIndex: PropTypes.func, + counts: PropTypes.object, + yDomain: PropTypes.array + } + + render () { + const { x, y, width, height, getIndex, counts, yDomain } = this.props; + + const index = getIndex(); + + if (index === -1) { + return null; + } + + const count = countModifier(counts[index]); + const barHeight = (count / yDomain[1]) * (y + height); + + return ( + <g> + <Rectangle + x={ x } + y={ 0 } + width={ width } + height={ height + y } + fill='transparent' + onClick={ this.onClick } + /> + <Rectangle + x={ x } + y={ y + (height - barHeight) } + width={ width } + height={ barHeight } + fill={ COLORS.hover } + onClick={ this.onClick } + /> + </g> + ); + } + + onClick = () => { + const { onClick, getIndex } = this.props; + const index = getIndex(); + onClick({ index }); + } +} diff --git a/js/src/ui/GasPriceSelector/CustomCursor/index.js b/js/src/ui/GasPriceSelector/CustomCursor/index.js new file mode 100644 index 000000000..8129d97f0 --- /dev/null +++ b/js/src/ui/GasPriceSelector/CustomCursor/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +export default from './customCursor'; diff --git a/js/src/ui/GasPriceSelector/CustomShape/customShape.js b/js/src/ui/GasPriceSelector/CustomShape/customShape.js new file mode 100644 index 000000000..1c721ab35 --- /dev/null +++ b/js/src/ui/GasPriceSelector/CustomShape/customShape.js @@ -0,0 +1,52 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React, { Component, PropTypes } from 'react'; +import { Dot } from 'recharts'; + +export default class CustomShape extends Component { + static propTypes = { + showValue: PropTypes.number.isRequired, + cx: PropTypes.number, + cy: PropTypes.number, + payload: PropTypes.object + } + + render () { + const { cx, cy, showValue, payload } = this.props; + + if (showValue !== payload.y) { + return null; + } + + return ( + <g> + <Dot + style={ { fill: 'white' } } + cx={ cx } + cy={ cy } + r={ 5 } + /> + <Dot + style={ { fill: 'rgb(255, 99, 132)' } } + cx={ cx } + cy={ cy } + r={ 3 } + /> + </g> + ); + } +} diff --git a/js/src/ui/GasPriceSelector/CustomShape/index.js b/js/src/ui/GasPriceSelector/CustomShape/index.js new file mode 100644 index 000000000..663c6b91b --- /dev/null +++ b/js/src/ui/GasPriceSelector/CustomShape/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +export default from './customShape'; diff --git a/js/src/ui/GasPriceSelector/CustomTooltip/customTooltip.js b/js/src/ui/GasPriceSelector/CustomTooltip/customTooltip.js new file mode 100644 index 000000000..4fd165cb0 --- /dev/null +++ b/js/src/ui/GasPriceSelector/CustomTooltip/customTooltip.js @@ -0,0 +1,53 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import React, { Component, PropTypes } from 'react'; + +export default class CustomTooltip extends Component { + static propTypes = { + active: PropTypes.bool, + histogram: PropTypes.object.isRequired, + label: PropTypes.number, + payload: PropTypes.array, + type: PropTypes.string + } + + render () { + const { active, label, histogram } = this.props; + + if (!active) { + return null; + } + + const index = label; + + const count = histogram.counts[index]; + const minprice = histogram.bucketBounds[index]; + const maxprice = histogram.bucketBounds[index + 1]; + + return ( + <div> + <p className='label'> + { count.toNumber() } transactions + with gas price set from + <span> { minprice.toFormat(0) } </span> + to + <span> { maxprice.toFormat(0) } </span> + </p> + </div> + ); + } +} diff --git a/js/src/ui/GasPriceSelector/CustomTooltip/index.js b/js/src/ui/GasPriceSelector/CustomTooltip/index.js new file mode 100644 index 000000000..a16f9d2f9 --- /dev/null +++ b/js/src/ui/GasPriceSelector/CustomTooltip/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +export default from './customTooltip'; diff --git a/js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.css b/js/src/ui/GasPriceSelector/gasPriceSelector.css similarity index 92% rename from js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.css rename to js/src/ui/GasPriceSelector/gasPriceSelector.css index 247211c50..ce5bd55e8 100644 --- a/js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.css +++ b/js/src/ui/GasPriceSelector/gasPriceSelector.css @@ -20,8 +20,12 @@ width: 100%; } -.columns { +.chartRow, .sliderRow { display: flex; flex-wrap: wrap; position: relative; } + +.chartRow { + margin-bottom: -24px; +} diff --git a/js/src/ui/GasPriceSelector/gasPriceSelector.js b/js/src/ui/GasPriceSelector/gasPriceSelector.js new file mode 100644 index 000000000..e37dc8b39 --- /dev/null +++ b/js/src/ui/GasPriceSelector/gasPriceSelector.js @@ -0,0 +1,341 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import BigNumber from 'bignumber.js'; +import { Slider } from 'material-ui'; +import React, { Component, PropTypes } from 'react'; +import { Bar, BarChart, ResponsiveContainer, Scatter, ScatterChart, Tooltip, XAxis, YAxis } from 'recharts'; + +import CustomBar from './CustomBar'; +import CustomCursor from './CustomCursor'; +import CustomShape from './CustomShape'; +import CustomTooltip from './CustomTooltip'; + +import { COLORS, countModifier } from './util'; + +import styles from './gasPriceSelector.css'; + +const TOOL_STYLE = { + color: 'rgba(255,255,255,0.5)', + backgroundColor: 'rgba(0, 0, 0, 0.75)', + padding: '0 0.5em', + fontSize: '0.75em' +}; + +export default class GasPriceSelector extends Component { + static propTypes = { + histogram: PropTypes.object.isRequired, + onChange: PropTypes.func.isRequired, + price: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.object + ]) + } + + state = { + price: null, + sliderValue: 0.5, + selectedIndex: 0, + + chartData: { + values: [], + xDomain: [], + yDomain: [], + N: 0 + } + } + + componentWillMount () { + this.computeCharts(); + this.setprice(); + } + + componentWillReceiveProps (nextProps) { + if (nextProps.price !== this.props.price) { + this.setprice(nextProps); + } + } + + componentWillUpdate (nextProps, nextState) { + if (Math.floor(nextState.sliderValue) !== Math.floor(this.state.sliderValue)) { + this.updateSelectedBarChart(nextState); + } + } + + render () { + return ( + <div> + { this.renderChart() } + { this.renderSlider() } + </div> + ); + } + + renderChart () { + const { histogram } = this.props; + const { chartData, sliderValue, selectedIndex } = this.state; + + if (chartData.values.length === 0) { + return null; + } + + const height = 196; + const countIndex = Math.max(0, Math.min(selectedIndex, histogram.counts.length - 1)); + const selectedCount = countModifier(histogram.counts[countIndex]); + + return ( + <div className={ styles.chartRow }> + <div style={ { flex: 1, height } }> + + <div className={ styles.chart }> + <ResponsiveContainer height={ height }> + <ScatterChart margin={ { top: 0, right: 0, left: 0, bottom: 0 } }> + <Scatter + data={ [ + { x: sliderValue, y: 0 }, + { x: sliderValue, y: selectedCount }, + { x: sliderValue, y: chartData.yDomain[1] } + ] } + isAnimationActive={ false } + line + shape={ <CustomShape showValue={ selectedCount } /> } /> + <XAxis + dataKey='x' + domain={ [0, 1] } + hide + height={ 0 } /> + <YAxis + dataKey='y' + domain={ chartData.yDomain } + hide + width={ 0 } /> + </ScatterChart> + </ResponsiveContainer> + </div> + + <div className={ styles.chart }> + <ResponsiveContainer height={ height }> + <BarChart + barCategoryGap={ 1 } + data={ chartData.values } + margin={ { top: 0, right: 0, left: 0, bottom: 0 } } + ref='barChart'> + <Bar + dataKey='value' + onClick={ this.onClickprice } + shape={ <CustomBar selected={ selectedIndex } onClick={ this.onClickprice } /> }stroke={ COLORS.line } /> + <Tooltip + content={ <CustomTooltip histogram={ histogram } /> } + cursor={ this.renderCustomCursor() } + wrapperStyle={ TOOL_STYLE } /> + <XAxis + dataKey='index' + domain={ chartData.xDomain } + hide + type='category' /> + <YAxis + domain={ chartData.yDomain } + hide + type='number' /> + </BarChart> + </ResponsiveContainer> + </div> + </div> + </div> + ); + } + + renderSlider () { + const { sliderValue } = this.state; + + return ( + <div className={ styles.sliderRow }> + <Slider + min={ 0 } + max={ 1 } + value={ sliderValue } + onChange={ this.onEditpriceSlider } + style={ { + flex: 1, + padding: '0 0.3em' + } } + sliderStyle={ { + marginBottom: 12 + } } + /> + </div> + ); + } + + renderCustomCursor = () => { + const { histogram } = this.props; + const { chartData } = this.state; + + return ( + <CustomCursor + counts={ histogram.counts } + getIndex={ this.getBarHoverIndex } + onClick={ this.onClickprice } + yDomain={ chartData.yDomain } + /> + ); + } + + getBarHoverIndex = () => { + const { barChart } = this.refs; + + if (!barChart || !barChart.state) { + return -1; + } + + return barChart.state.activeTooltipIndex; + } + + computeChartsData () { + const { priceChartData } = this.state; + const { histogram } = this.props; + + const values = priceChartData + .map((value, index) => ({ value, index })); + + const N = values.length - 1; + const maxGasCounts = countModifier( + histogram + .counts + .reduce((max, count) => count.greaterThan(max) ? count : max, 0) + ); + + const xDomain = [0, N]; + const yDomain = [0, maxGasCounts * 1.1]; + + const chartData = { + values, N, + xDomain, yDomain + }; + + this.setState({ chartData }, () => { + this.updateSelectedBarChart(); + }); + } + + computeCharts (props = this.props) { + const { histogram } = props; + + const priceChartData = histogram + .counts + .map(count => countModifier(count)); + + this.setState( + { priceChartData }, + () => this.computeChartsData() + ); + } + + updateSelectedBarChart (state = this.state) { + } + + setprice (props = this.props) { + const { price, histogram } = props; + + // If no gas price yet... + if (!price) { + return this.setSliderValue(0.5); + } + + const bnprice = (typeof price === 'string') + ? new BigNumber(price) + : price; + + // If gas price hasn't changed + if (this.state.price && bnprice.equals(this.state.price)) { + return; + } + + const prices = histogram.bucketBounds; + const startIndex = prices + .findIndex(price => price.greaterThan(bnprice)) - 1; + + // price Lower than the max in histogram + if (startIndex === -1) { + return this.setSliderValue(0, bnprice); + } + + // price Greater than the max in histogram + if (startIndex === -2) { + return this.setSliderValue(1, bnprice); + } + + const priceA = prices[startIndex]; + const priceB = prices[startIndex + 1]; + + const sliderValueDec = bnprice + .minus(priceA) + .dividedBy(priceB.minus(priceA)) + .toNumber(); + + const sliderValue = (startIndex + sliderValueDec) / (prices.length - 1); + this.setSliderValue(sliderValue, bnprice); + } + + setSliderValue (value, price = this.state.price) { + const { histogram } = this.props; + + const N = histogram.bucketBounds.length - 1; + + const sliderValue = Math.max(0, Math.min(value, 1)); + const selectedIndex = Math.floor(sliderValue * N); + + this.setState({ sliderValue, price, selectedIndex }); + } + + onBarChartMouseUp = (event) => { + console.log(event); + } + + onClickprice = (bar) => { + const { index } = bar; + + const ratio = (index + 0.5) / (this.state.chartData.N + 1); + + this.onEditpriceSlider(null, ratio); + } + + onEditpriceSlider = (event, sliderValue) => { + const { histogram } = this.props; + + const prices = histogram.bucketBounds; + const N = prices.length - 1; + const priceAIdx = Math.floor(sliderValue * N); + const priceBIdx = priceAIdx + 1; + + if (priceBIdx === N + 1) { + const price = prices[priceAIdx].round(); + this.props.onChange(event, price); + return; + } + + const priceA = prices[priceAIdx]; + const priceB = prices[priceBIdx]; + + const mult = Math.round((sliderValue % 1) * 100) / 100; + const price = priceA + .plus(priceB.minus(priceA).times(mult)) + .round(); + + this.setSliderValue(sliderValue, price); + this.props.onChange(event, price.toFixed()); + } +} diff --git a/js/src/ui/GasPriceEditor/GasPriceSelector/index.js b/js/src/ui/GasPriceSelector/index.js similarity index 100% rename from js/src/ui/GasPriceEditor/GasPriceSelector/index.js rename to js/src/ui/GasPriceSelector/index.js diff --git a/js/src/ui/GasPriceSelector/util.js b/js/src/ui/GasPriceSelector/util.js new file mode 100644 index 000000000..63c3e89b0 --- /dev/null +++ b/js/src/ui/GasPriceSelector/util.js @@ -0,0 +1,34 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +const COLORS = { + default: 'rgba(255, 99, 132, 0.2)', + selected: 'rgba(255, 99, 132, 0.5)', + hover: 'rgba(255, 99, 132, 0.15)', + grid: 'rgba(255, 99, 132, 0.5)', + line: 'rgb(255, 99, 132)', + intersection: '#fff' +}; + +const countModifier = (count) => { + const val = count.toNumber ? count.toNumber() : count; + return Math.log10(val + 1) + 0.1; +}; + +export { + COLORS, + countModifier +}; diff --git a/js/src/ui/index.js b/js/src/ui/index.js index 7cf3e7ee5..636685410 100644 --- a/js/src/ui/index.js +++ b/js/src/ui/index.js @@ -32,6 +32,7 @@ import Editor from './Editor'; import Errors from './Errors'; import Form, { AddressSelect, FormWrap, TypedInput, Input, InputAddress, InputAddressSelect, InputChip, InputInline, Select, RadioButtons } from './Form'; import GasPriceEditor from './GasPriceEditor'; +import GasPriceSelector from './GasPriceSelector'; import IdentityIcon from './IdentityIcon'; import IdentityName from './IdentityName'; import LanguageSelector from './LanguageSelector'; @@ -70,6 +71,7 @@ export { Form, FormWrap, GasPriceEditor, + GasPriceSelector, Input, InputAddress, InputAddressSelect, diff --git a/js/src/views/ParityBar/parityBar.css b/js/src/views/ParityBar/parityBar.css index dab138238..d6fd3a538 100644 --- a/js/src/views/ParityBar/parityBar.css +++ b/js/src/views/ParityBar/parityBar.css @@ -46,7 +46,7 @@ border-radius: 4px 4px 0 0; display: flex; flex-direction: column; - max-height: 19em; + max-height: 50vh; } .expanded .content { diff --git a/js/src/views/Signer/components/Account/AccountLink/AccountLink.css b/js/src/views/Signer/components/Account/AccountLink/accountLink.css similarity index 100% rename from js/src/views/Signer/components/Account/AccountLink/AccountLink.css rename to js/src/views/Signer/components/Account/AccountLink/accountLink.css diff --git a/js/src/views/Signer/components/Account/AccountLink/AccountLink.js b/js/src/views/Signer/components/Account/AccountLink/accountLink.js similarity index 97% rename from js/src/views/Signer/components/Account/AccountLink/AccountLink.js rename to js/src/views/Signer/components/Account/AccountLink/accountLink.js index f42675474..4a5578acf 100644 --- a/js/src/views/Signer/components/Account/AccountLink/AccountLink.js +++ b/js/src/views/Signer/components/Account/AccountLink/accountLink.js @@ -17,7 +17,7 @@ import React, { Component, PropTypes } from 'react'; import { addressLink } from '~/3rdparty/etherscan/links'; -import styles from './AccountLink.css'; +import styles from './accountLink.css'; export default class AccountLink extends Component { static propTypes = { diff --git a/js/src/views/Signer/components/Account/AccountLink/index.js b/js/src/views/Signer/components/Account/AccountLink/index.js index 90ae8634a..6c50400f5 100644 --- a/js/src/views/Signer/components/Account/AccountLink/index.js +++ b/js/src/views/Signer/components/Account/AccountLink/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './AccountLink'; +export default from './accountLink'; diff --git a/js/src/views/Signer/components/Account/Account.css b/js/src/views/Signer/components/Account/account.css similarity index 100% rename from js/src/views/Signer/components/Account/Account.css rename to js/src/views/Signer/components/Account/account.css diff --git a/js/src/views/Signer/components/Account/Account.js b/js/src/views/Signer/components/Account/account.js similarity index 98% rename from js/src/views/Signer/components/Account/Account.js rename to js/src/views/Signer/components/Account/account.js index 05ca180c6..79fe04d55 100644 --- a/js/src/views/Signer/components/Account/Account.js +++ b/js/src/views/Signer/components/Account/account.js @@ -19,7 +19,7 @@ import React, { Component, PropTypes } from 'react'; import { IdentityIcon, IdentityName } from '~/ui'; import AccountLink from './AccountLink'; -import styles from './Account.css'; +import styles from './account.css'; export default class Account extends Component { static propTypes = { diff --git a/js/src/views/Signer/components/Account/index.js b/js/src/views/Signer/components/Account/index.js index c42a8a810..55c215f7c 100644 --- a/js/src/views/Signer/components/Account/index.js +++ b/js/src/views/Signer/components/Account/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './Account'; +export default from './account'; diff --git a/js/src/views/Signer/components/RequestPending/requestPending.js b/js/src/views/Signer/components/RequestPending/requestPending.js index d50e5cde5..67195888a 100644 --- a/js/src/views/Signer/components/RequestPending/requestPending.js +++ b/js/src/views/Signer/components/RequestPending/requestPending.js @@ -21,21 +21,26 @@ import SignRequest from '../SignRequest'; export default class RequestPending extends Component { static propTypes = { + className: PropTypes.string, + date: PropTypes.instanceOf(Date).isRequired, + gasLimit: PropTypes.object.isRequired, id: PropTypes.object.isRequired, + isSending: PropTypes.bool.isRequired, + isTest: PropTypes.bool.isRequired, onConfirm: PropTypes.func.isRequired, onReject: PropTypes.func.isRequired, - isSending: PropTypes.bool.isRequired, - date: PropTypes.instanceOf(Date).isRequired, payload: PropTypes.oneOfType([ - PropTypes.shape({ signTransaction: PropTypes.object.isRequired }), PropTypes.shape({ sendTransaction: PropTypes.object.isRequired }), - PropTypes.shape({ sign: PropTypes.object.isRequired }) + PropTypes.shape({ sign: PropTypes.object.isRequired }), + PropTypes.shape({ signTransaction: PropTypes.object.isRequired }) ]).isRequired, - className: PropTypes.string, - isTest: PropTypes.bool.isRequired, store: PropTypes.object.isRequired }; + static defaultProps = { + isSending: false + }; + onConfirm = data => { const { onConfirm, payload } = this.props; @@ -44,24 +49,23 @@ export default class RequestPending extends Component { }; render () { - const { payload, id, className, isSending, date, onReject, isTest, store } = this.props; + const { className, date, gasLimit, id, isSending, isTest, onReject, payload, store } = this.props; if (payload.sign) { const { sign } = payload; return ( <SignRequest + address={ sign.address } className={ className } + hash={ sign.hash } + id={ id } + isFinished={ false } + isSending={ isSending } + isTest={ isTest } onConfirm={ this.onConfirm } onReject={ onReject } - isSending={ isSending } - isFinished={ false } - id={ id } - address={ sign.address } - hash={ sign.hash } - isTest={ isTest } - store={ store } - /> + store={ store } /> ); } @@ -70,19 +74,19 @@ export default class RequestPending extends Component { return ( <TransactionPending className={ className } + date={ date } + gasLimit={ gasLimit } + id={ id } + isSending={ isSending } + isTest={ isTest } onConfirm={ this.onConfirm } onReject={ onReject } - isSending={ isSending } - id={ id } - transaction={ transaction } - date={ date } - isTest={ isTest } store={ store } - /> + transaction={ transaction } /> ); } - // Unknown payload + console.error('RequestPending: Unknown payload', payload); return null; } } diff --git a/js/src/views/Signer/components/SignRequest/index.js b/js/src/views/Signer/components/SignRequest/index.js index 4aec1d19c..0fe59540e 100644 --- a/js/src/views/Signer/components/SignRequest/index.js +++ b/js/src/views/Signer/components/SignRequest/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './SignRequest'; +export default from './signRequest'; diff --git a/js/src/views/Signer/components/SignRequest/SignRequest.css b/js/src/views/Signer/components/SignRequest/signRequest.css similarity index 100% rename from js/src/views/Signer/components/SignRequest/SignRequest.css rename to js/src/views/Signer/components/SignRequest/signRequest.css diff --git a/js/src/views/Signer/components/SignRequest/SignRequest.js b/js/src/views/Signer/components/SignRequest/signRequest.js similarity index 97% rename from js/src/views/Signer/components/SignRequest/SignRequest.js rename to js/src/views/Signer/components/SignRequest/signRequest.js index ae4159c71..91acddc34 100644 --- a/js/src/views/Signer/components/SignRequest/SignRequest.js +++ b/js/src/views/Signer/components/SignRequest/signRequest.js @@ -21,7 +21,7 @@ import Account from '../Account'; import TransactionPendingForm from '../TransactionPendingForm'; import TxHashLink from '../TxHashLink'; -import styles from './SignRequest.css'; +import styles from './signRequest.css'; @observer export default class SignRequest extends Component { @@ -49,7 +49,7 @@ export default class SignRequest extends Component { const { className } = this.props; return ( - <div className={ `${styles.container} ${className || ''}` }> + <div className={ `${styles.container} ${className}` }> { this.renderDetails() } { this.renderActions() } </div> diff --git a/js/src/views/Signer/components/SignRequest/signRequest.spec.js b/js/src/views/Signer/components/SignRequest/signRequest.spec.js new file mode 100644 index 000000000..53099bb9c --- /dev/null +++ b/js/src/views/Signer/components/SignRequest/signRequest.spec.js @@ -0,0 +1,34 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import { shallow } from 'enzyme'; +import React from 'react'; +import sinon from 'sinon'; + +import SignRequest from './'; + +const store = { + balances: {}, + fetchBalance: sinon.stub() +}; + +describe('views/Signer/components/SignRequest', () => { + it('renders', () => { + expect(shallow( + <SignRequest store={ store } />, + )).to.be.ok; + }); +}); diff --git a/js/src/views/Signer/components/TransactionMainDetails/index.js b/js/src/views/Signer/components/TransactionMainDetails/index.js index f7b053acd..73420d333 100644 --- a/js/src/views/Signer/components/TransactionMainDetails/index.js +++ b/js/src/views/Signer/components/TransactionMainDetails/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './TransactionMainDetails'; +export default from './transactionMainDetails'; diff --git a/js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.css b/js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.css similarity index 95% rename from js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.css rename to js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.css index 92ed968d1..2a42789ea 100644 --- a/js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.css +++ b/js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.css @@ -17,20 +17,25 @@ @import '../../_layout.css'; -.transaction { - flex: 1; - overflow: auto; -} - -.transaction > * { - display: inline-block; -} - .account { text-align: center; } +.contractIcon { + background: #eee; + width: 50px !important; + height: 50px !important; + box-sizing: border-box; + border-radius: 50%; + padding: 13px; +} + +.editButtonRow { + text-align: right; +} + .from { + display: inline-block; width: 40%; vertical-align: top; @@ -47,6 +52,7 @@ } .method { + display: inline-block; width: 60%; vertical-align: top; line-height: 1em; @@ -66,11 +72,7 @@ opacity: .5; } -.contractIcon { - background: #eee; - width: 50px !important; - height: 50px !important; - box-sizing: border-box; - border-radius: 50%; - padding: 13px; +.transaction { + flex: 1; + overflow: auto; } diff --git a/js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.js b/js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.js similarity index 65% rename from js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.js rename to js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.js index 0a30991de..1999cfe7f 100644 --- a/js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.js +++ b/js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.js @@ -14,52 +14,43 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. +import MapsLocalGasStation from 'material-ui/svg-icons/maps/local-gas-station'; import React, { Component, PropTypes } from 'react'; - import ReactTooltip from 'react-tooltip'; -import { MethodDecoding } from '~/ui'; +import { Button, MethodDecoding } from '~/ui'; import * as tUtil from '../util/transaction'; import Account from '../Account'; -import styles from './TransactionMainDetails.css'; +import styles from './transactionMainDetails.css'; export default class TransactionMainDetails extends Component { static propTypes = { - id: PropTypes.object.isRequired, + children: PropTypes.node, from: PropTypes.string.isRequired, - fromBalance: PropTypes.object, // eth BigNumber, not required since it might take time to fetch - value: PropTypes.object.isRequired, // wei hex - totalValue: PropTypes.object.isRequired, // wei BigNumber + fromBalance: PropTypes.object, + gasStore: PropTypes.object, + id: PropTypes.object.isRequired, isTest: PropTypes.bool.isRequired, + totalValue: PropTypes.object.isRequired, transaction: PropTypes.object.isRequired, - children: PropTypes.node + value: PropTypes.object.isRequired }; componentWillMount () { - const { value, totalValue } = this.props; + const { totalValue, value } = this.props; this.updateDisplayValues(value, totalValue); } componentWillReceiveProps (nextProps) { - const { value, totalValue } = nextProps; + const { totalValue, value } = nextProps; this.updateDisplayValues(value, totalValue); } - updateDisplayValues (value, totalValue) { - this.setState({ - feeEth: tUtil.calcFeeInEth(totalValue, value), - valueDisplay: tUtil.getValueDisplay(value), - valueDisplayWei: tUtil.getValueDisplayWei(value), - totalValueDisplay: tUtil.getTotalValueDisplay(totalValue), - totalValueDisplayWei: tUtil.getTotalValueDisplayWei(totalValue) - }); - } - render () { - const { children, from, fromBalance, transaction, isTest } = this.props; + const { children, from, fromBalance, gasStore, isTest, transaction } = this.props; return ( <div className={ styles.transaction }> @@ -74,29 +65,74 @@ export default class TransactionMainDetails extends Component { <div className={ styles.method }> <MethodDecoding address={ from } - transaction={ transaction } - historic={ false } /> + historic={ false } + transaction={ + gasStore + ? gasStore.overrideTransaction(transaction) + : transaction + } /> + { this.renderEditGas() } </div> { children } </div> ); } + renderEditGas () { + const { gasStore } = this.props; + + if (!gasStore) { + return null; + } + + return ( + <div className={ styles.editButtonRow }> + <Button + icon={ <MapsLocalGasStation /> } + label='Edit gas/gasPrice' + onClick={ this.toggleGasEditor } /> + </div> + ); + } + + renderTotalValue () { + const { id } = this.props; + const { feeEth, totalValueDisplay, totalValueDisplayWei } = this.state; + const labelId = `totalValue${id}`; + + return ( + <div> + <div + className={ styles.total } + data-effect='solid' + data-for={ labelId } + data-place='bottom' + data-tip> + { totalValueDisplay } <small>ETH</small> + </div> + <ReactTooltip id={ labelId }> + The value of the transaction including the mining fee is <strong>{ totalValueDisplayWei }</strong> <small>WEI</small>. <br /> + (This includes a mining fee of <strong>{ feeEth }</strong> <small>ETH</small>) + </ReactTooltip> + </div> + ); + } + renderValue () { const { id } = this.props; const { valueDisplay, valueDisplayWei } = this.state; + const labelId = `value${id}`; return ( <div> <div - data-tip - data-for={ 'value' + id } data-effect='solid' - > + data-for={ labelId } + data-tip> <strong>{ valueDisplay } </strong> <small>ETH</small> </div> - <ReactTooltip id={ 'value' + id }> + <ReactTooltip id={ labelId }> The value of the transaction.<br /> <strong>{ valueDisplayWei }</strong> <small>WEI</small> </ReactTooltip> @@ -104,25 +140,17 @@ export default class TransactionMainDetails extends Component { ); } - renderTotalValue () { - const { id } = this.props; - const { totalValueDisplay, totalValueDisplayWei, feeEth } = this.state; + updateDisplayValues (value, totalValue) { + this.setState({ + feeEth: tUtil.calcFeeInEth(totalValue, value), + totalValueDisplay: tUtil.getTotalValueDisplay(totalValue), + totalValueDisplayWei: tUtil.getTotalValueDisplayWei(totalValue), + valueDisplay: tUtil.getValueDisplay(value), + valueDisplayWei: tUtil.getValueDisplayWei(value) + }); + } - return ( - <div> - <div - data-tip - data-for={ 'totalValue' + id } - data-effect='solid' - data-place='bottom' - className={ styles.total }> - { totalValueDisplay } <small>ETH</small> - </div> - <ReactTooltip id={ 'totalValue' + id }> - The value of the transaction including the mining fee is <strong>{ totalValueDisplayWei }</strong> <small>WEI</small>. <br /> - (This includes a mining fee of <strong>{ feeEth }</strong> <small>ETH</small>) - </ReactTooltip> - </div> - ); + toggleGasEditor = () => { + this.props.gasStore.setEditing(true); } } diff --git a/js/src/views/Signer/components/TransactionPending/index.js b/js/src/views/Signer/components/TransactionPending/index.js index 1916d0571..3581c448c 100644 --- a/js/src/views/Signer/components/TransactionPending/index.js +++ b/js/src/views/Signer/components/TransactionPending/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './TransactionPending'; +export default from './transactionPending'; diff --git a/js/src/views/Signer/components/TransactionPending/TransactionPending.css b/js/src/views/Signer/components/TransactionPending/transactionPending.css similarity index 92% rename from js/src/views/Signer/components/TransactionPending/TransactionPending.css rename to js/src/views/Signer/components/TransactionPending/transactionPending.css index 877066e57..dbda27135 100644 --- a/js/src/views/Signer/components/TransactionPending/TransactionPending.css +++ b/js/src/views/Signer/components/TransactionPending/transactionPending.css @@ -19,13 +19,9 @@ .container { display: flex; - padding: 1em 0 1em; + padding: 1.5em 1em 1.5em 0; & > * { vertical-align: middle; } } - -.container+.container { - padding-top: 2em; -} diff --git a/js/src/views/Signer/components/TransactionPending/TransactionPending.js b/js/src/views/Signer/components/TransactionPending/transactionPending.js similarity index 57% rename from js/src/views/Signer/components/TransactionPending/TransactionPending.js rename to js/src/views/Signer/components/TransactionPending/transactionPending.js index ba3c30802..eea9491ee 100644 --- a/js/src/views/Signer/components/TransactionPending/TransactionPending.js +++ b/js/src/views/Signer/components/TransactionPending/transactionPending.js @@ -17,89 +17,130 @@ import React, { Component, PropTypes } from 'react'; import { observer } from 'mobx-react'; +import { Button, GasPriceEditor } from '~/ui'; + import TransactionMainDetails from '../TransactionMainDetails'; import TransactionPendingForm from '../TransactionPendingForm'; -import styles from './TransactionPending.css'; +import styles from './transactionPending.css'; import * as tUtil from '../util/transaction'; @observer export default class TransactionPending extends Component { + static contextTypes = { + api: PropTypes.object.isRequired + }; + static propTypes = { - id: PropTypes.object.isRequired, - transaction: PropTypes.shape({ - from: PropTypes.string.isRequired, - value: PropTypes.object.isRequired, // wei hex - gasPrice: PropTypes.object.isRequired, // wei hex - gas: PropTypes.object.isRequired, // hex - data: PropTypes.string, // hex - to: PropTypes.string // undefined if it's a contract - }).isRequired, + className: PropTypes.string, date: PropTypes.instanceOf(Date).isRequired, + gasLimit: PropTypes.object, + id: PropTypes.object.isRequired, + isSending: PropTypes.bool.isRequired, + isTest: PropTypes.bool.isRequired, nonce: PropTypes.number, onConfirm: PropTypes.func.isRequired, onReject: PropTypes.func.isRequired, - isSending: PropTypes.bool.isRequired, - className: PropTypes.string, - isTest: PropTypes.bool.isRequired, - store: PropTypes.object.isRequired + store: PropTypes.object.isRequired, + transaction: PropTypes.shape({ + data: PropTypes.string, + from: PropTypes.string.isRequired, + gas: PropTypes.object.isRequired, + gasPrice: PropTypes.object.isRequired, + to: PropTypes.string, + value: PropTypes.object.isRequired + }).isRequired }; - static defaultProps = { - isSending: false - }; + gasStore = new GasPriceEditor.Store(this.context.api, { + gas: this.props.transaction.gas.toFixed(), + gasLimit: this.props.gasLimit, + gasPrice: this.props.transaction.gasPrice.toFixed() + }); componentWillMount () { - const { transaction, store } = this.props; - const { gas, gasPrice, value, from, to } = transaction; + const { store, transaction } = this.props; + const { from, gas, gasPrice, to, value } = transaction; const fee = tUtil.getFee(gas, gasPrice); // BigNumber object - const totalValue = tUtil.getTotalValue(fee, value); const gasPriceEthmDisplay = tUtil.getEthmFromWeiDisplay(gasPrice); const gasToDisplay = tUtil.getGasDisplay(gas); + const totalValue = tUtil.getTotalValue(fee, value); this.setState({ gasPriceEthmDisplay, totalValue, gasToDisplay }); + this.gasStore.setEthValue(value); store.fetchBalances([from, to]); } render () { - const { className, id, transaction, store, isTest } = this.props; - const { from, value } = transaction; + return this.gasStore.isEditing + ? this.renderGasEditor() + : this.renderTransaction(); + } + + renderTransaction () { + const { className, id, isSending, isTest, store, transaction } = this.props; const { totalValue } = this.state; + const { from, value } = transaction; const fromBalance = store.balances[from]; return ( - <div className={ `${styles.container} ${className || ''}` }> + <div className={ `${styles.container} ${className}` }> <TransactionMainDetails - id={ id } - value={ value } - from={ from } - isTest={ isTest } - fromBalance={ fromBalance } className={ styles.transactionDetails } + from={ from } + fromBalance={ fromBalance } + gasStore={ this.gasStore } + id={ id } + isTest={ isTest } + totalValue={ totalValue } transaction={ transaction } - totalValue={ totalValue } /> + value={ value } /> <TransactionPendingForm address={ from } - isSending={ this.props.isSending } + isSending={ isSending } onConfirm={ this.onConfirm } - onReject={ this.onReject } - /> + onReject={ this.onReject } /> </div> ); } - onConfirm = data => { - const { id, transaction } = this.props; - const { gasPrice } = transaction; - const { password, wallet } = data; + renderGasEditor () { + const { className } = this.props; - this.props.onConfirm({ id, password, wallet, gasPrice }); + return ( + <div className={ `${styles.container} ${className}` }> + <GasPriceEditor + store={ this.gasStore }> + <Button + label='view transaction' + onClick={ this.toggleGasEditor } /> + </GasPriceEditor> + </div> + ); + } + + onConfirm = (data) => { + const { id, transaction } = this.props; + const { password, wallet } = data; + const { gas, gasPrice } = this.gasStore.overrideTransaction(transaction); + + this.props.onConfirm({ + gas, + gasPrice, + id, + password, + wallet + }); } onReject = () => { this.props.onReject(this.props.id); } + + toggleGasEditor = () => { + this.gasStore.setEditing(false); + } } diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js index ad0f9fd1f..254fb5971 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './TransactionPendingFormConfirm'; +export default from './transactionPendingFormConfirm'; diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.css b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.css similarity index 100% rename from js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.css rename to js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.css diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js similarity index 71% rename from js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js rename to js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js index 7d2d660df..f343c1f31 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js @@ -22,7 +22,7 @@ import ReactTooltip from 'react-tooltip'; import { Form, Input, IdentityIcon } from '~/ui'; -import styles from './TransactionPendingFormConfirm.css'; +import styles from './transactionPendingFormConfirm.css'; class TransactionPendingFormConfirm extends Component { static propTypes = { @@ -35,14 +35,14 @@ class TransactionPendingFormConfirm extends Component { id = Math.random(); // for tooltip state = { - walletError: null, + password: '', wallet: null, - password: '' + walletError: null } render () { const { accounts, address, isSending } = this.props; - const { password, walletError, wallet } = this.state; + const { password, wallet, walletError } = this.state; const account = accounts[address] || {}; const isExternal = !account.uuid; @@ -51,37 +51,54 @@ class TransactionPendingFormConfirm extends Component { : null; const isWalletOk = !isExternal || (walletError === null && wallet !== null); - const keyInput = isExternal ? this.renderKeyInput() : null; + const keyInput = isExternal + ? this.renderKeyInput() + : null; return ( <div className={ styles.confirmForm }> <Form> { keyInput } <Input + hint={ + isExternal + ? 'decrypt the key' + : 'unlock the account' + } + label={ + isExternal + ? 'Key Password' + : 'Account Password' + } onChange={ this.onModifyPassword } onKeyDown={ this.onKeyDown } - label={ isExternal ? 'Key Password' : 'Account Password' } - hint={ isExternal ? 'decrypt the key' : 'unlock the account' } type='password' value={ password } /> <div className={ styles.passwordHint }> { passwordHint } </div> <div - data-tip - data-place='bottom' - data-for={ 'transactionConfirmForm' + this.id } data-effect='solid' - > + data-for={ `transactionConfirmForm${this.id}` } + data-place='bottom' + data-tip> <RaisedButton - onTouchTap={ this.onConfirm } className={ styles.confirmButton } - fullWidth - primary disabled={ isSending || !isWalletOk } - icon={ <IdentityIcon address={ address } button className={ styles.signerIcon } /> } - label={ isSending ? 'Confirming...' : 'Confirm Transaction' } - /> + fullWidth + icon={ + <IdentityIcon + address={ address } + button + className={ styles.signerIcon } /> + } + label={ + isSending + ? 'Confirming...' + : 'Confirm Transaction' + } + onTouchTap={ this.onConfirm } + primary /> </div> { this.renderTooltip() } </Form> @@ -95,11 +112,10 @@ class TransactionPendingFormConfirm extends Component { return ( <Input className={ styles.fileInput } - onChange={ this.onKeySelect } error={ walletError } label='Select Local Key' - type='file' - /> + onChange={ this.onKeySelect } + type='file' /> ); } @@ -109,34 +125,37 @@ class TransactionPendingFormConfirm extends Component { } return ( - <ReactTooltip id={ 'transactionConfirmForm' + this.id }> + <ReactTooltip id={ `transactionConfirmForm${this.id}` }> Please provide a password for this account </ReactTooltip> ); } - onKeySelect = evt => { + onKeySelect = (event) => { const fileReader = new FileReader(); - fileReader.onload = e => { + + fileReader.onload = (e) => { try { const wallet = JSON.parse(e.target.result); + this.setState({ - walletError: null, - wallet: wallet + wallet, + walletError: null }); - } catch (e) { + } catch (error) { this.setState({ - walletError: 'Given wallet file is invalid.', - wallet: null + wallet: null, + walletError: 'Given wallet file is invalid.' }); } }; - fileReader.readAsText(evt.target.files[0]); + fileReader.readAsText(event.target.files[0]); } - onModifyPassword = evt => { - const password = evt.target.value; + onModifyPassword = (event) => { + const password = event.target.value; + this.setState({ password }); @@ -150,8 +169,8 @@ class TransactionPendingFormConfirm extends Component { }); } - onKeyDown = evt => { - if (evt.which !== 13) { + onKeyDown = (event) => { + if (event.which !== 13) { return; } diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js index 3ac772104..f8c37266f 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './TransactionPendingFormReject'; +export default from './transactionPendingFormReject'; diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/TransactionPendingFormReject.css b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/transactionPendingFormReject.css similarity index 100% rename from js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/TransactionPendingFormReject.css rename to js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/transactionPendingFormReject.css diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/TransactionPendingFormReject.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/transactionPendingFormReject.js similarity index 96% rename from js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/TransactionPendingFormReject.js rename to js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/transactionPendingFormReject.js index af06e79b4..890dd3750 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/TransactionPendingFormReject.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/transactionPendingFormReject.js @@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; import RaisedButton from 'material-ui/RaisedButton'; -import styles from './TransactionPendingFormReject.css'; +import styles from './transactionPendingFormReject.css'; export default class TransactionPendingFormReject extends Component { diff --git a/js/src/views/Signer/components/TransactionPendingForm/index.js b/js/src/views/Signer/components/TransactionPendingForm/index.js index 2fe1e9037..dfdcb41ce 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/index.js +++ b/js/src/views/Signer/components/TransactionPendingForm/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './TransactionPendingForm'; +export default from './transactionPendingForm'; diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingForm.css b/js/src/views/Signer/components/TransactionPendingForm/transactionPendingForm.css similarity index 100% rename from js/src/views/Signer/components/TransactionPendingForm/TransactionPendingForm.css rename to js/src/views/Signer/components/TransactionPendingForm/transactionPendingForm.css diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingForm.js b/js/src/views/Signer/components/TransactionPendingForm/transactionPendingForm.js similarity index 88% rename from js/src/views/Signer/components/TransactionPendingForm/TransactionPendingForm.js rename to js/src/views/Signer/components/TransactionPendingForm/transactionPendingForm.js index 6f46cf571..41d50f68e 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingForm.js +++ b/js/src/views/Signer/components/TransactionPendingForm/transactionPendingForm.js @@ -20,10 +20,9 @@ import BackIcon from 'material-ui/svg-icons/navigation/arrow-back'; import TransactionPendingFormConfirm from './TransactionPendingFormConfirm'; import TransactionPendingFormReject from './TransactionPendingFormReject'; -import styles from './TransactionPendingForm.css'; +import styles from './transactionPendingForm.css'; export default class TransactionPendingForm extends Component { - static propTypes = { address: PropTypes.string.isRequired, isSending: PropTypes.bool.isRequired, @@ -60,8 +59,8 @@ export default class TransactionPendingForm extends Component { return ( <TransactionPendingFormConfirm address={ address } - onConfirm={ onConfirm } - isSending={ isSending } /> + isSending={ isSending } + onConfirm={ onConfirm } /> ); } @@ -72,14 +71,13 @@ export default class TransactionPendingForm extends Component { if (!isRejectOpen) { html = <span>reject transaction</span>; } else { - html = <span><BackIcon />I've changed my mind</span>; + html = <span><BackIcon />{ "I've changed my mind" }</span>; } return ( <a - onClick={ this.onToggleReject } className={ styles.rejectToggle } - > + onClick={ this.onToggleReject }> { html } </a> ); @@ -87,7 +85,9 @@ export default class TransactionPendingForm extends Component { onToggleReject = () => { const { isRejectOpen } = this.state; - this.setState({ isRejectOpen: !isRejectOpen }); - } + this.setState({ + isRejectOpen: !isRejectOpen + }); + } } diff --git a/js/src/views/Signer/components/TxHashLink/index.js b/js/src/views/Signer/components/TxHashLink/index.js index ef7199290..f831c9a61 100644 --- a/js/src/views/Signer/components/TxHashLink/index.js +++ b/js/src/views/Signer/components/TxHashLink/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './TxHashLink'; +export default from './txHashLink'; diff --git a/js/src/views/Signer/components/TxHashLink/TxHashLink.js b/js/src/views/Signer/components/TxHashLink/txHashLink.js similarity index 84% rename from js/src/views/Signer/components/TxHashLink/TxHashLink.js rename to js/src/views/Signer/components/TxHashLink/txHashLink.js index bce30eded..cea3fe602 100644 --- a/js/src/views/Signer/components/TxHashLink/TxHashLink.js +++ b/js/src/views/Signer/components/TxHashLink/txHashLink.js @@ -19,22 +19,21 @@ import React, { Component, PropTypes } from 'react'; import { txLink } from '~/3rdparty/etherscan/links'; export default class TxHashLink extends Component { - static propTypes = { - txHash: PropTypes.string.isRequired, - isTest: PropTypes.bool.isRequired, children: PropTypes.node, - className: PropTypes.string + className: PropTypes.string, + isTest: PropTypes.bool.isRequired, + txHash: PropTypes.string.isRequired } render () { - const { children, txHash, className, isTest } = this.props; + const { children, className, isTest, txHash } = this.props; return ( <a + className={ className } href={ txLink(txHash, isTest) } - target='_blank' - className={ className }> + target='_blank'> { children || txHash } </a> ); diff --git a/js/src/views/Signer/containers/Embedded/embedded.css b/js/src/views/Signer/containers/Embedded/embedded.css index ffc6a209f..fcd49a851 100644 --- a/js/src/views/Signer/containers/Embedded/embedded.css +++ b/js/src/views/Signer/containers/Embedded/embedded.css @@ -17,16 +17,22 @@ @import '../../_layout.css'; -.signer { - box-sizing: border-box; - padding: 0; - width: $embedWidth; +.info { + padding: 1em 0; } .none { color: #aaa; } -.info { - padding: 1em 0; +.request { + &:nth-child(even) { + background: rgba(255, 255, 255, 0.04); + } +} + +.signer { + box-sizing: border-box; + padding: 0; + width: $embedWidth; } diff --git a/js/src/views/Signer/containers/Embedded/embedded.js b/js/src/views/Signer/containers/Embedded/embedded.js index 4629a6522..51452520b 100644 --- a/js/src/views/Signer/containers/Embedded/embedded.js +++ b/js/src/views/Signer/containers/Embedded/embedded.js @@ -33,15 +33,16 @@ class Embedded extends Component { }; static propTypes = { - signer: PropTypes.shape({ - pending: PropTypes.array.isRequired, - finished: PropTypes.array.isRequired - }).isRequired, actions: PropTypes.shape({ startConfirmRequest: PropTypes.func.isRequired, startRejectRequest: PropTypes.func.isRequired }).isRequired, - isTest: PropTypes.bool.isRequired + gasLimit: PropTypes.object.isRequired, + isTest: PropTypes.bool.isRequired, + signer: PropTypes.shape({ + finished: PropTypes.array.isRequired, + pending: PropTypes.array.isRequired + }).isRequired }; store = new Store(this.context.api); @@ -78,20 +79,21 @@ class Embedded extends Component { } renderPending = (data) => { - const { actions, isTest } = this.props; - const { payload, id, isSending, date } = data; + const { actions, gasLimit, isTest } = this.props; + const { date, id, isSending, payload } = data; return ( <RequestPending className={ styles.request } + date={ date } + gasLimit={ gasLimit } + id={ id } + isSending={ isSending } + isTest={ isTest } + key={ id } onConfirm={ actions.startConfirmRequest } onReject={ actions.startRejectRequest } - isSending={ isSending || false } - key={ id } - id={ id } payload={ payload } - date={ date } - isTest={ isTest } store={ this.store } /> ); @@ -103,13 +105,14 @@ class Embedded extends Component { } function mapStateToProps (state) { - const { isTest } = state.nodeStatus; + const { gasLimit, isTest } = state.nodeStatus; const { actions, signer } = state; return { actions, - signer, - isTest + gasLimit, + isTest, + signer }; } diff --git a/js/src/views/Signer/containers/RequestsPage/index.js b/js/src/views/Signer/containers/RequestsPage/index.js index cb3fdd143..ee3b54f54 100644 --- a/js/src/views/Signer/containers/RequestsPage/index.js +++ b/js/src/views/Signer/containers/RequestsPage/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -export default from './RequestsPage'; +export default from './requestsPage'; diff --git a/js/src/views/Signer/containers/RequestsPage/RequestsPage.css b/js/src/views/Signer/containers/RequestsPage/requestsPage.css similarity index 90% rename from js/src/views/Signer/containers/RequestsPage/RequestsPage.css rename to js/src/views/Signer/containers/RequestsPage/requestsPage.css index 662c45817..f26f66e86 100644 --- a/js/src/views/Signer/containers/RequestsPage/RequestsPage.css +++ b/js/src/views/Signer/containers/RequestsPage/requestsPage.css @@ -18,3 +18,9 @@ .noRequestsMsg { color: #aaa; } + +.request { + &:nth-child(odd) { + background: rgba(255, 255, 255, 0.04); + } +} diff --git a/js/src/views/Signer/containers/RequestsPage/RequestsPage.js b/js/src/views/Signer/containers/RequestsPage/requestsPage.js similarity index 88% rename from js/src/views/Signer/containers/RequestsPage/RequestsPage.js rename to js/src/views/Signer/containers/RequestsPage/requestsPage.js index f3cd5a267..db52b008e 100644 --- a/js/src/views/Signer/containers/RequestsPage/RequestsPage.js +++ b/js/src/views/Signer/containers/RequestsPage/requestsPage.js @@ -26,7 +26,7 @@ import { Container, Page, TxList } from '~/ui'; import RequestPending from '../../components/RequestPending'; -import styles from './RequestsPage.css'; +import styles from './requestsPage.css'; @observer class RequestsPage extends Component { @@ -35,15 +35,16 @@ class RequestsPage extends Component { }; static propTypes = { - signer: PropTypes.shape({ - pending: PropTypes.array.isRequired, - finished: PropTypes.array.isRequired - }).isRequired, actions: PropTypes.shape({ startConfirmRequest: PropTypes.func.isRequired, startRejectRequest: PropTypes.func.isRequired }).isRequired, - isTest: PropTypes.bool.isRequired + gasLimit: PropTypes.object.isRequired, + isTest: PropTypes.bool.isRequired, + signer: PropTypes.shape({ + pending: PropTypes.array.isRequired, + finished: PropTypes.array.isRequired + }).isRequired }; store = new Store(this.context.api, true); @@ -104,19 +105,21 @@ class RequestsPage extends Component { } renderPending = (data) => { - const { actions, isTest } = this.props; - const { payload, id, isSending, date } = data; + const { actions, gasLimit, isTest } = this.props; + const { date, id, isSending, payload } = data; return ( <RequestPending + className={ styles.request } + date={ date } + gasLimit={ gasLimit } + id={ id } + isSending={ isSending } + isTest={ isTest } + key={ id } onConfirm={ actions.startConfirmRequest } onReject={ actions.startRejectRequest } - isSending={ isSending || false } - key={ id } - id={ id } payload={ payload } - date={ date } - isTest={ isTest } store={ this.store } /> ); @@ -124,13 +127,14 @@ class RequestsPage extends Component { } function mapStateToProps (state) { - const { isTest } = state.nodeStatus; + const { gasLimit, isTest } = state.nodeStatus; const { actions, signer } = state; return { actions, - signer, - isTest + gasLimit, + isTest, + signer }; } From 797d787a7bd53178e8b1bba1068b3603c3e7659d Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 16:51:09 +0000 Subject: [PATCH 117/131] [ci skip] js-precompiled 20161211-164839 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fcf12f1f6..2c492bc9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#e1c4592ba60727af643c54941bf97f63cd9b5737" +source = "git+https://github.com/ethcore/js-precompiled.git#6430c6ef5d00f3a411546021ae2915740abce561" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 525211517..b4ea41a61 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.112", + "version": "0.2.113", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 17cc2be4b5c1a4fc4d8185f6e6afcfc4980a8636 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Sun, 11 Dec 2016 19:30:54 +0100 Subject: [PATCH 118/131] Rename ethcore -> parity in license. --- build.rs | 2 +- dapps/build.rs | 2 +- dapps/js-glue/build.rs | 2 +- dapps/js-glue/src/codegen.rs | 2 +- dapps/js-glue/src/js.rs | 2 +- dapps/js-glue/src/lib.rs | 2 +- dapps/js-glue/src/lib.rs.in | 2 +- dapps/src/api/api.rs | 2 +- dapps/src/api/mod.rs | 2 +- dapps/src/api/response.rs | 2 +- dapps/src/api/types.rs | 2 +- dapps/src/api/types.rs.in | 2 +- dapps/src/apps/cache.rs | 2 +- dapps/src/apps/fetcher.rs | 2 +- dapps/src/apps/fs.rs | 2 +- dapps/src/apps/manifest.rs | 2 +- dapps/src/apps/mod.rs | 2 +- dapps/src/endpoint.rs | 2 +- dapps/src/handlers/auth.rs | 2 +- dapps/src/handlers/content.rs | 2 +- dapps/src/handlers/echo.rs | 2 +- dapps/src/handlers/fetch.rs | 2 +- dapps/src/handlers/mod.rs | 2 +- dapps/src/handlers/redirect.rs | 2 +- dapps/src/lib.rs | 2 +- dapps/src/page/builtin.rs | 2 +- dapps/src/page/handler.rs | 2 +- dapps/src/page/local.rs | 2 +- dapps/src/page/mod.rs | 2 +- dapps/src/proxypac.rs | 2 +- dapps/src/router/auth.rs | 2 +- dapps/src/router/host_validation.rs | 2 +- dapps/src/router/mod.rs | 2 +- dapps/src/rpc.rs | 2 +- dapps/src/tests/api.rs | 2 +- dapps/src/tests/authorization.rs | 2 +- dapps/src/tests/fetch.rs | 2 +- dapps/src/tests/helpers.rs | 2 +- dapps/src/tests/mod.rs | 2 +- dapps/src/tests/redirection.rs | 2 +- dapps/src/tests/validation.rs | 2 +- dapps/src/url.rs | 2 +- dapps/ui/src/lib.rs | 2 +- db/build.rs | 2 +- db/src/database.rs | 2 +- db/src/lib.rs | 2 +- db/src/lib.rs.in | 2 +- db/src/traits.rs | 2 +- devtools/src/http_client.rs | 2 +- devtools/src/lib.rs | 2 +- devtools/src/random_path.rs | 2 +- devtools/src/stop_guard.rs | 2 +- devtools/src/test_socket.rs | 2 +- ethash/src/compute.rs | 2 +- ethash/src/lib.rs | 2 +- ethcore/build.rs | 2 +- ethcore/hash-fetch/src/client.rs | 2 +- ethcore/hash-fetch/src/lib.rs | 2 +- ethcore/hash-fetch/src/urlhint.rs | 2 +- ethcore/light/build.rs | 2 +- ethcore/light/src/net/error.rs | 2 +- ethcore/light/src/types/mod.rs | 2 +- ethcore/light/src/types/mod.rs.in | 2 +- ethcore/src/account_db.rs | 2 +- ethcore/src/account_provider/mod.rs | 2 +- ethcore/src/account_provider/stores.rs | 2 +- ethcore/src/action_params.rs | 2 +- ethcore/src/basic_types.rs | 2 +- ethcore/src/blockchain/best_block.rs | 2 +- ethcore/src/blockchain/block_info.rs | 2 +- ethcore/src/blockchain/cache.rs | 2 +- ethcore/src/blockchain/config.rs | 2 +- ethcore/src/blockchain/extras.rs | 2 +- ethcore/src/blockchain/generator/block.rs | 2 +- ethcore/src/blockchain/generator/bloom.rs | 2 +- ethcore/src/blockchain/generator/complete.rs | 2 +- ethcore/src/blockchain/generator/fork.rs | 2 +- ethcore/src/blockchain/generator/generator.rs | 2 +- ethcore/src/blockchain/generator/mod.rs | 2 +- ethcore/src/blockchain/generator/transaction.rs | 2 +- ethcore/src/blockchain/import_route.rs | 2 +- ethcore/src/blockchain/mod.rs | 2 +- ethcore/src/blooms/bloom.rs | 2 +- ethcore/src/blooms/bloom_group.rs | 2 +- ethcore/src/blooms/group_position.rs | 2 +- ethcore/src/blooms/mod.rs | 2 +- ethcore/src/builtin.rs | 2 +- ethcore/src/cache_manager.rs | 2 +- ethcore/src/client/chain_notify.rs | 2 +- ethcore/src/client/config.rs | 2 +- ethcore/src/client/mod.rs | 2 +- ethcore/src/client/test_client.rs | 2 +- ethcore/src/client/traits.rs | 2 +- ethcore/src/db.rs | 2 +- ethcore/src/engines/authority_round.rs | 2 +- ethcore/src/engines/basic_authority.rs | 2 +- ethcore/src/engines/instant_seal.rs | 2 +- ethcore/src/engines/null_engine.rs | 2 +- ethcore/src/env_info.rs | 2 +- ethcore/src/error.rs | 2 +- ethcore/src/ethereum/denominations.rs | 2 +- ethcore/src/ethereum/mod.rs | 2 +- ethcore/src/evm/benches/mod.rs | 2 +- ethcore/src/evm/evm.rs | 2 +- ethcore/src/evm/ext.rs | 2 +- ethcore/src/evm/factory.rs | 2 +- ethcore/src/evm/interpreter/informant.rs | 2 +- ethcore/src/evm/interpreter/memory.rs | 2 +- ethcore/src/evm/interpreter/shared_cache.rs | 2 +- ethcore/src/evm/interpreter/stack.rs | 2 +- ethcore/src/evm/jit.rs | 2 +- ethcore/src/evm/mod.rs | 2 +- ethcore/src/evm/schedule.rs | 2 +- ethcore/src/externalities.rs | 2 +- ethcore/src/factory.rs | 2 +- ethcore/src/header.rs | 2 +- ethcore/src/json_tests/chain.rs | 2 +- ethcore/src/json_tests/eip150_state.rs | 2 +- ethcore/src/json_tests/eip161_state.rs | 2 +- ethcore/src/json_tests/executive.rs | 2 +- ethcore/src/json_tests/homestead_chain.rs | 2 +- ethcore/src/json_tests/homestead_state.rs | 2 +- ethcore/src/json_tests/mod.rs | 2 +- ethcore/src/json_tests/test_common.rs | 2 +- ethcore/src/json_tests/transaction.rs | 2 +- ethcore/src/json_tests/trie.rs | 2 +- ethcore/src/lib.rs | 2 +- ethcore/src/migrations/blocks/mod.rs | 2 +- ethcore/src/migrations/blocks/v8.rs | 2 +- ethcore/src/migrations/extras/mod.rs | 2 +- ethcore/src/migrations/extras/v6.rs | 2 +- ethcore/src/migrations/mod.rs | 2 +- ethcore/src/migrations/state/mod.rs | 2 +- ethcore/src/migrations/state/v7.rs | 2 +- ethcore/src/migrations/v10.rs | 2 +- ethcore/src/migrations/v9.rs | 2 +- ethcore/src/miner/banning_queue.rs | 2 +- ethcore/src/miner/external.rs | 2 +- ethcore/src/miner/local_transactions.rs | 2 +- ethcore/src/miner/mod.rs | 2 +- ethcore/src/miner/price_info.rs | 2 +- ethcore/src/miner/work_notify.rs | 2 +- ethcore/src/pod_account.rs | 2 +- ethcore/src/pod_state.rs | 2 +- ethcore/src/service.rs | 2 +- ethcore/src/snapshot/account.rs | 2 +- ethcore/src/snapshot/block.rs | 2 +- ethcore/src/snapshot/error.rs | 2 +- ethcore/src/snapshot/io.rs | 2 +- ethcore/src/snapshot/mod.rs | 2 +- ethcore/src/snapshot/service.rs | 2 +- ethcore/src/snapshot/snapshot_service_trait.rs | 2 +- ethcore/src/snapshot/tests/blocks.rs | 2 +- ethcore/src/snapshot/tests/helpers.rs | 2 +- ethcore/src/snapshot/tests/mod.rs | 2 +- ethcore/src/snapshot/tests/service.rs | 2 +- ethcore/src/snapshot/tests/state.rs | 2 +- ethcore/src/snapshot/watcher.rs | 2 +- ethcore/src/spec/genesis.rs | 2 +- ethcore/src/spec/mod.rs | 2 +- ethcore/src/spec/seal.rs | 2 +- ethcore/src/spec/spec.rs | 2 +- ethcore/src/state/account.rs | 2 +- ethcore/src/state/substate.rs | 2 +- ethcore/src/state_db.rs | 2 +- ethcore/src/tests/client.rs | 2 +- ethcore/src/tests/helpers.rs | 2 +- ethcore/src/tests/mod.rs | 2 +- ethcore/src/tests/rpc.rs | 2 +- ethcore/src/trace/config.rs | 2 +- ethcore/src/trace/db.rs | 2 +- ethcore/src/trace/error.rs | 2 +- ethcore/src/trace/executive_tracer.rs | 2 +- ethcore/src/trace/import.rs | 2 +- ethcore/src/trace/mod.rs | 2 +- ethcore/src/trace/noop_tracer.rs | 2 +- ethcore/src/types/account_diff.rs | 2 +- ethcore/src/types/block_import_error.rs | 2 +- ethcore/src/types/block_status.rs | 2 +- ethcore/src/types/blockchain_info.rs | 2 +- ethcore/src/types/call_analytics.rs | 2 +- ethcore/src/types/executed.rs | 2 +- ethcore/src/types/filter.rs | 2 +- ethcore/src/types/ids.rs | 2 +- ethcore/src/types/log_entry.rs | 2 +- ethcore/src/types/mod.rs | 2 +- ethcore/src/types/mod.rs.in | 2 +- ethcore/src/types/mode.rs | 2 +- ethcore/src/types/pruning_info.rs | 2 +- ethcore/src/types/receipt.rs | 2 +- ethcore/src/types/restoration_status.rs | 2 +- ethcore/src/types/snapshot_manifest.rs | 2 +- ethcore/src/types/state_diff.rs | 2 +- ethcore/src/types/trace_filter.rs | 2 +- ethcore/src/types/trace_types/error.rs | 2 +- ethcore/src/types/trace_types/flat.rs | 2 +- ethcore/src/types/trace_types/localized.rs | 2 +- ethcore/src/types/trace_types/mod.rs | 2 +- ethcore/src/types/transaction.rs | 2 +- ethcore/src/types/transaction_import.rs | 2 +- ethcore/src/types/tree_route.rs | 2 +- ethcore/src/types/verification_queue_info.rs | 2 +- ethcore/src/verification/canon_verifier.rs | 2 +- ethcore/src/verification/mod.rs | 2 +- ethcore/src/verification/noop_verifier.rs | 2 +- ethcore/src/verification/queue/kind.rs | 2 +- ethcore/src/verification/verification.rs | 2 +- ethcore/src/verification/verifier.rs | 2 +- ethcore/src/views/block.rs | 2 +- ethcore/src/views/body.rs | 2 +- ethcore/src/views/header.rs | 2 +- ethcore/src/views/mod.rs | 2 +- ethcore/src/views/transaction.rs | 2 +- ethcrypto/src/lib.rs | 2 +- ethkey/src/bin/ethkey.rs | 2 +- ethkey/src/bin/main.rs | 2 +- ethkey/src/brain.rs | 2 +- ethkey/src/error.rs | 2 +- ethkey/src/keccak.rs | 2 +- ethkey/src/keypair.rs | 2 +- ethkey/src/lib.rs | 2 +- ethkey/src/prefix.rs | 2 +- ethkey/src/random.rs | 2 +- ethkey/src/signature.rs | 2 +- ethstore/build.rs | 2 +- ethstore/src/account/cipher.rs | 2 +- ethstore/src/account/kdf.rs | 2 +- ethstore/src/account/mod.rs | 2 +- ethstore/src/account/safe_account.rs | 2 +- ethstore/src/account/version.rs | 2 +- ethstore/src/bin/ethstore.rs | 2 +- ethstore/src/bin/main.rs | 2 +- ethstore/src/dir/disk.rs | 2 +- ethstore/src/dir/geth.rs | 2 +- ethstore/src/dir/mod.rs | 2 +- ethstore/src/dir/parity.rs | 2 +- ethstore/src/error.rs | 2 +- ethstore/src/ethkey.rs | 2 +- ethstore/src/ethstore.rs | 2 +- ethstore/src/import.rs | 2 +- ethstore/src/json/cipher.rs | 2 +- ethstore/src/json/crypto.rs | 2 +- ethstore/src/json/error.rs | 2 +- ethstore/src/json/hash.rs | 2 +- ethstore/src/json/id.rs | 2 +- ethstore/src/json/kdf.rs | 2 +- ethstore/src/json/key_file.rs | 2 +- ethstore/src/json/mod.rs | 2 +- ethstore/src/json/version.rs | 2 +- ethstore/src/lib.rs | 2 +- ethstore/src/random.rs | 2 +- ethstore/src/secret_store.rs | 2 +- ethstore/tests/api.rs | 2 +- ethstore/tests/cli.rs | 2 +- ethstore/tests/util/mod.rs | 2 +- ethstore/tests/util/transient_dir.rs | 2 +- evmbin/benches/mod.rs | 2 +- evmbin/src/ext.rs | 2 +- evmbin/src/main.rs | 2 +- evmjit/src/lib.rs | 2 +- ipc/codegen/build.rs | 2 +- ipc/codegen/src/lib.rs | 2 +- ipc/codegen/src/lib.rs.in | 2 +- ipc/hypervisor/build.rs | 2 +- ipc/hypervisor/src/lib.rs | 2 +- ipc/hypervisor/src/service.rs | 2 +- ipc/hypervisor/src/service.rs.in | 2 +- ipc/nano/src/lib.rs | 2 +- ipc/rpc/src/interface.rs | 2 +- ipc/rpc/src/lib.rs | 2 +- ipc/tests/binary.rs | 2 +- ipc/tests/binary.rs.in | 2 +- ipc/tests/build.rs | 2 +- ipc/tests/examples.rs | 2 +- ipc/tests/nested.rs | 2 +- ipc/tests/nested.rs.in | 2 +- ipc/tests/over_nano.rs | 2 +- ipc/tests/run.rs | 2 +- ipc/tests/service.rs | 2 +- ipc/tests/service.rs.in | 2 +- ipc/tests/with_attrs.rs | 2 +- ipc/tests/with_attrs.rs.in | 2 +- js/build.rs | 2 +- js/src/abi/abi.js | 2 +- js/src/abi/decoder/bytesTaken.js | 2 +- js/src/abi/decoder/bytesTaken.spec.js | 2 +- js/src/abi/decoder/decodeResult.js | 2 +- js/src/abi/decoder/decodeResult.spec.js | 2 +- js/src/abi/decoder/decoder.js | 2 +- js/src/abi/decoder/index.js | 2 +- js/src/abi/encoder/encoder.js | 2 +- js/src/abi/encoder/index.js | 2 +- js/src/abi/encoder/mediate.js | 2 +- js/src/abi/encoder/mediate.spec.js | 2 +- js/src/abi/index.js | 2 +- js/src/abi/spec/constructor.js | 2 +- js/src/abi/spec/constructor.spec.js | 2 +- js/src/abi/spec/function.js | 2 +- js/src/abi/spec/function.spec.js | 2 +- js/src/abi/spec/index.js | 2 +- js/src/abi/spec/interface.js | 2 +- js/src/abi/spec/interface.spec.js | 2 +- js/src/abi/spec/param.js | 2 +- js/src/abi/spec/param.spec.js | 2 +- js/src/abi/token/index.js | 2 +- js/src/abi/token/token.js | 2 +- js/src/abi/token/token.spec.js | 2 +- js/src/abi/util/address.js | 2 +- js/src/abi/util/address.spec.js | 2 +- js/src/abi/util/pad.js | 2 +- js/src/abi/util/pad.spec.js | 2 +- js/src/abi/util/signature.js | 2 +- js/src/abi/util/signature.spec.js | 2 +- js/src/abi/util/slice.js | 2 +- js/src/abi/util/slice.spec.js | 2 +- js/src/abi/util/sliceAs.js | 2 +- js/src/abi/util/sliceAs.spec.js | 2 +- js/src/abi/util/types.js | 2 +- js/src/abi/util/types.spec.js | 2 +- js/src/api/api.js | 2 +- js/src/api/api.spec.js | 2 +- js/src/api/contract/index.js | 2 +- js/src/api/format/input.js | 2 +- js/src/api/format/input.spec.js | 2 +- js/src/api/format/output.js | 2 +- js/src/api/index.js | 2 +- js/src/api/rpc/index.js | 2 +- js/src/api/subscriptions/eth.js | 2 +- js/src/api/subscriptions/eth.spec.js | 2 +- js/src/api/subscriptions/index.js | 2 +- js/src/api/subscriptions/logging.js | 2 +- js/src/api/subscriptions/logging.spec.js | 2 +- js/src/api/subscriptions/manager.js | 2 +- js/src/api/subscriptions/manager.spec.js | 2 +- js/src/api/subscriptions/personal.js | 2 +- js/src/api/subscriptions/personal.spec.js | 2 +- js/src/api/subscriptions/signer.js | 2 +- js/src/api/transport/error.js | 2 +- js/src/api/transport/index.js | 2 +- js/src/api/transport/jsonRpcBase.js | 2 +- js/src/api/transport/jsonRpcBase.spec.js | 2 +- js/src/api/util/decode.js | 2 +- js/src/api/util/decode.spec.js | 2 +- js/src/api/util/format.js | 2 +- js/src/api/util/format.spec.js | 2 +- js/src/api/util/index.js | 2 +- js/src/api/util/sha3.js | 2 +- js/src/api/util/sha3.spec.js | 2 +- js/src/api/util/types.js | 2 +- js/src/api/util/types.spec.js | 2 +- js/src/api/util/wei.js | 2 +- js/src/api/util/wei.spec.js | 2 +- js/src/contracts/abi/index.js | 2 +- js/src/contracts/badgereg.js | 2 +- js/src/contracts/code/index.js | 2 +- js/src/contracts/dappreg.js | 2 +- js/src/contracts/githubhint.js | 2 +- js/src/contracts/index.js | 2 +- js/src/contracts/registry.js | 2 +- js/src/contracts/signaturereg.js | 2 +- js/src/contracts/sms-verification.js | 2 +- js/src/contracts/tokenreg.js | 2 +- js/src/dapps/basiccoin.js | 2 +- js/src/dapps/basiccoin/parity.js | 2 +- js/src/dapps/basiccoin/services.js | 2 +- js/src/dapps/dappreg.js | 2 +- js/src/dapps/dappreg/modalStore.js | 2 +- js/src/dapps/dappreg/parity.js | 2 +- js/src/dapps/githubhint.js | 2 +- js/src/dapps/githubhint/parity.js | 2 +- js/src/dapps/githubhint/services.js | 2 +- js/src/dapps/index.js | 2 +- js/src/dapps/localtx.js | 2 +- js/src/dapps/localtx/parity.js | 2 +- js/src/dapps/registry.js | 2 +- js/src/dapps/registry/Container.js | 2 +- js/src/dapps/registry/actions.js | 2 +- js/src/dapps/registry/parity.js | 2 +- js/src/dapps/registry/reducers.js | 2 +- js/src/dapps/registry/store.js | 2 +- js/src/dapps/signaturereg.js | 2 +- js/src/dapps/signaturereg/format.js | 2 +- js/src/dapps/signaturereg/parity.js | 2 +- js/src/dapps/signaturereg/services.js | 2 +- js/src/dapps/tokenreg.js | 2 +- js/src/dapps/tokenreg/Container.js | 2 +- js/src/dapps/tokenreg/constants.js | 2 +- js/src/dapps/tokenreg/parity.js | 2 +- js/src/dapps/tokenreg/reducers.js | 2 +- js/src/dapps/tokenreg/store.js | 2 +- js/src/dapps/tokenreg/utils.js | 2 +- js/src/environment/index.js | 2 +- js/src/environment/integration-tests/fake-backend.js | 2 +- js/src/environment/integration-tests/index.js | 2 +- js/src/environment/perf-debug/index.js | 2 +- js/src/environment/perf-debug/why-update.js | 2 +- js/src/environment/tests/index.js | 2 +- js/src/environment/tests/test-utils.js | 2 +- js/src/index.js | 2 +- js/src/jsonrpc/generator/build-json.js | 2 +- js/src/jsonrpc/generator/build-markdown.js | 2 +- js/src/jsonrpc/index.js | 2 +- js/src/jsonrpc/index.spec.js | 2 +- js/src/jsonrpc/interfaces/db.js | 2 +- js/src/jsonrpc/interfaces/net.js | 2 +- js/src/jsonrpc/interfaces/personal.js | 2 +- js/src/jsonrpc/interfaces/shh.js | 2 +- js/src/jsonrpc/interfaces/signer.js | 2 +- js/src/jsonrpc/interfaces/trace.js | 2 +- js/src/jsonrpc/interfaces/web3.js | 2 +- js/src/jsonrpc/types.js | 2 +- js/src/lib.rs | 2 +- js/src/lib.rs.in | 2 +- js/src/modals/AddAddress/index.js | 2 +- js/src/modals/AddContract/addContract.js | 2 +- js/src/modals/AddContract/index.js | 2 +- js/src/modals/CreateAccount/index.js | 2 +- js/src/modals/CreateAccount/print.js | 2 +- js/src/modals/CreateWallet/createWallet.js | 2 +- js/src/modals/CreateWallet/createWalletStore.js | 2 +- js/src/modals/CreateWallet/index.js | 2 +- js/src/modals/DeleteAccount/deleteAccount.js | 2 +- js/src/modals/DeleteAccount/index.js | 2 +- js/src/modals/DeployContract/index.js | 2 +- js/src/modals/EditMeta/editMeta.js | 2 +- js/src/modals/EditMeta/index.js | 2 +- js/src/modals/ExecuteContract/index.js | 2 +- js/src/modals/FirstRun/firstRun.js | 2 +- js/src/modals/FirstRun/index.js | 2 +- js/src/modals/LoadContract/index.js | 2 +- js/src/modals/LoadContract/loadContract.js | 2 +- js/src/modals/PasswordManager/index.js | 2 +- js/src/modals/SMSVerification/SMSVerification.js | 2 +- js/src/modals/SMSVerification/index.js | 2 +- js/src/modals/SMSVerification/store.js | 2 +- js/src/modals/SaveContract/index.js | 2 +- js/src/modals/SaveContract/saveContract.js | 2 +- js/src/modals/Shapeshift/index.js | 2 +- js/src/modals/Shapeshift/shapeshift.js | 2 +- js/src/modals/Transfer/errors.js | 2 +- js/src/modals/Transfer/index.js | 2 +- js/src/modals/WalletSettings/index.js | 2 +- js/src/modals/WalletSettings/walletSettingsStore.js | 2 +- js/src/modals/index.js | 2 +- js/src/parity.js | 2 +- js/src/redux/actions.js | 2 +- js/src/redux/index.js | 2 +- js/src/redux/middleware.js | 2 +- js/src/redux/providers/apiActions.js | 2 +- js/src/redux/providers/apiReducer.js | 2 +- js/src/redux/providers/balances.js | 2 +- js/src/redux/providers/balancesReducer.js | 2 +- js/src/redux/providers/blockchainActions.js | 2 +- js/src/redux/providers/blockchainReducer.js | 2 +- js/src/redux/providers/compilerActions.js | 2 +- js/src/redux/providers/compilerReducer.js | 2 +- js/src/redux/providers/compilerWorker.js | 2 +- js/src/redux/providers/imagesActions.js | 2 +- js/src/redux/providers/imagesReducer.js | 2 +- js/src/redux/providers/index.js | 2 +- js/src/redux/providers/personal.js | 2 +- js/src/redux/providers/personalActions.js | 2 +- js/src/redux/providers/personalReducer.js | 2 +- js/src/redux/providers/signer.js | 2 +- js/src/redux/providers/signerActions.js | 2 +- js/src/redux/providers/signerReducer.js | 2 +- js/src/redux/providers/snackbarActions.js | 2 +- js/src/redux/providers/snackbarReducer.js | 2 +- js/src/redux/providers/status.js | 2 +- js/src/redux/providers/statusActions.js | 2 +- js/src/redux/providers/statusReducer.js | 2 +- js/src/redux/providers/walletReducer.js | 2 +- js/src/redux/reducers.js | 2 +- js/src/redux/store.js | 2 +- js/src/redux/util.js | 2 +- js/src/secureApi.js | 2 +- js/src/ui/Actionbar/actionbar.js | 2 +- js/src/ui/Actionbar/actionbar.spec.js | 2 +- js/src/ui/Actionbar/index.js | 2 +- js/src/ui/Badge/badge.js | 2 +- js/src/ui/Badge/badge.spec.js | 2 +- js/src/ui/Badge/index.js | 2 +- js/src/ui/Balance/balance.js | 2 +- js/src/ui/Balance/index.js | 2 +- js/src/ui/BlockStatus/blockStatus.js | 2 +- js/src/ui/BlockStatus/index.js | 2 +- js/src/ui/Button/button.js | 2 +- js/src/ui/Button/button.spec.js | 2 +- js/src/ui/Button/index.js | 2 +- js/src/ui/Certifications/certifications.js | 2 +- js/src/ui/Certifications/index.js | 2 +- js/src/ui/ConfirmDialog/confirmDialog.js | 2 +- js/src/ui/ConfirmDialog/index.js | 2 +- js/src/ui/Container/container.js | 2 +- js/src/ui/Container/container.spec.js | 2 +- js/src/ui/Container/index.js | 2 +- js/src/ui/CopyToClipboard/copyToClipboard.js | 2 +- js/src/ui/CopyToClipboard/index.js | 2 +- js/src/ui/Editor/editor.js | 2 +- js/src/ui/Editor/index.js | 2 +- js/src/ui/Errors/actions.js | 2 +- js/src/ui/Errors/errors.js | 2 +- js/src/ui/Errors/index.js | 2 +- js/src/ui/Errors/middleware.js | 2 +- js/src/ui/Errors/reducers.js | 2 +- js/src/ui/Form/form.js | 2 +- js/src/ui/Form/index.js | 2 +- js/src/ui/GasPriceEditor/index.js | 2 +- js/src/ui/IdentityIcon/identityIcon.js | 2 +- js/src/ui/IdentityIcon/index.js | 2 +- js/src/ui/IdentityName/identityName.js | 2 +- js/src/ui/IdentityName/identityName.spec.js | 2 +- js/src/ui/IdentityName/index.js | 2 +- js/src/ui/Loading/index.js | 2 +- js/src/ui/Loading/loading.js | 2 +- js/src/ui/MethodDecoding/index.js | 2 +- js/src/ui/Modal/index.js | 2 +- js/src/ui/Modal/modal.js | 2 +- js/src/ui/Page/index.js | 2 +- js/src/ui/Page/page.js | 2 +- js/src/ui/ParityBackground/index.js | 2 +- js/src/ui/ParityBackground/parityBackground.js | 2 +- js/src/ui/ShortenedHash/index.js | 2 +- js/src/ui/ShortenedHash/shortenedHash.js | 2 +- js/src/ui/SignerIcon/index.js | 2 +- js/src/ui/SignerIcon/signerIcon.js | 2 +- js/src/ui/Tags/index.js | 2 +- js/src/ui/Tags/tags.js | 2 +- js/src/ui/Theme/index.js | 2 +- js/src/ui/Theme/theme.js | 2 +- js/src/ui/Theme/theme.spec.js | 2 +- js/src/ui/Tooltips/actions.js | 2 +- js/src/ui/Tooltips/index.js | 2 +- js/src/ui/Tooltips/reducers.js | 2 +- js/src/ui/Tooltips/tooltips.js | 2 +- js/src/ui/TxHash/index.js | 2 +- js/src/ui/TxHash/txHash.js | 2 +- js/src/ui/TxList/index.js | 2 +- js/src/ui/TxList/store.js | 2 +- js/src/ui/TxList/store.spec.js | 2 +- js/src/ui/TxList/txList.js | 2 +- js/src/ui/TxList/txList.spec.js | 2 +- js/src/util/abi.js | 2 +- js/src/util/constants.js | 2 +- js/src/util/notifications.js | 2 +- js/src/util/proptypes.js | 2 +- js/src/util/subscribe-to-event.js | 2 +- js/src/util/tx.js | 2 +- js/src/util/validation.js | 2 +- js/src/util/wallet.js | 2 +- js/src/util/wallets.js | 2 +- js/src/util/web3.extensions.js | 2 +- js/src/views/Account/index.js | 2 +- js/src/views/Accounts/index.js | 2 +- js/src/views/Address/index.js | 2 +- js/src/views/Addresses/index.js | 2 +- js/src/views/Application/index.js | 2 +- js/src/views/Application/store.js | 2 +- js/src/views/Connection/connection.js | 2 +- js/src/views/Connection/index.js | 2 +- js/src/views/Contract/index.js | 2 +- js/src/views/Contracts/index.js | 2 +- js/src/views/Dapp/dapp.js | 2 +- js/src/views/Dapp/index.js | 2 +- js/src/views/Dapps/dappsStore.js | 2 +- js/src/views/Dapps/index.js | 2 +- js/src/views/ParityBar/index.js | 2 +- js/src/views/ParityBar/parityBar.js | 2 +- js/src/views/Settings/actions.js | 2 +- js/src/views/Settings/index.js | 2 +- js/src/views/Settings/middleware.js | 2 +- js/src/views/Settings/reducers.js | 2 +- js/src/views/Signer/index.js | 2 +- js/src/views/Signer/signer.js | 2 +- js/src/views/Signer/store.js | 2 +- js/src/views/Status/index.js | 2 +- js/src/views/Status/status.js | 2 +- js/src/views/Wallet/index.js | 2 +- js/src/views/WriteContract/index.js | 2 +- js/src/views/index.js | 2 +- js/src/web3.js | 2 +- js/test/babel.js | 2 +- js/test/e2e/ethapi.js | 2 +- js/test/mocha.config.js | 2 +- js/test/mockRpc.js | 2 +- js/test/types.js | 2 +- js/webpack/build.server.js | 2 +- js/webpack/dev.server.js | 2 +- js/webpack/libraries.js | 2 +- js/webpack/test.js | 2 +- js/webpack/vendor.js | 2 +- json/build.rs | 2 +- json/src/blockchain/account.rs | 2 +- json/src/blockchain/block.rs | 2 +- json/src/blockchain/blockchain.rs | 2 +- json/src/blockchain/header.rs | 2 +- json/src/blockchain/mod.rs | 2 +- json/src/blockchain/state.rs | 2 +- json/src/blockchain/test.rs | 2 +- json/src/blockchain/transaction.rs | 2 +- json/src/bytes.rs | 2 +- json/src/hash.rs | 2 +- json/src/lib.rs | 2 +- json/src/lib.rs.in | 2 +- json/src/misc/account_meta.rs | 2 +- json/src/misc/dapps_settings.rs | 2 +- json/src/misc/mod.rs | 2 +- json/src/spec/account.rs | 2 +- json/src/spec/authority_round.rs | 2 +- json/src/spec/basic_authority.rs | 2 +- json/src/spec/builtin.rs | 2 +- json/src/spec/engine.rs | 2 +- json/src/spec/ethash.rs | 2 +- json/src/spec/genesis.rs | 2 +- json/src/spec/mod.rs | 2 +- json/src/spec/params.rs | 2 +- json/src/spec/seal.rs | 2 +- json/src/spec/spec.rs | 2 +- json/src/spec/state.rs | 2 +- json/src/state/log.rs | 2 +- json/src/state/mod.rs | 2 +- json/src/state/state.rs | 2 +- json/src/state/test.rs | 2 +- json/src/state/transaction.rs | 2 +- json/src/transaction/mod.rs | 2 +- json/src/transaction/test.rs | 2 +- json/src/transaction/transaction.rs | 2 +- json/src/transaction/txtest.rs | 2 +- json/src/trie/input.rs | 2 +- json/src/trie/mod.rs | 2 +- json/src/trie/test.rs | 2 +- json/src/trie/trie.rs | 2 +- json/src/uint.rs | 2 +- json/src/vm/call.rs | 2 +- json/src/vm/env.rs | 2 +- json/src/vm/log.rs | 2 +- json/src/vm/mod.rs | 2 +- json/src/vm/test.rs | 2 +- json/src/vm/transaction.rs | 2 +- json/src/vm/vm.rs | 2 +- license_header | 2 +- logger/src/lib.rs | 2 +- parity/account.rs | 2 +- parity/blockchain.rs | 2 +- parity/boot.rs | 2 +- parity/cache.rs | 2 +- parity/cli/mod.rs | 2 +- parity/cli/usage.rs | 2 +- parity/configuration.rs | 2 +- parity/dapps.rs | 2 +- parity/deprecated.rs | 2 +- parity/dir.rs | 2 +- parity/helpers.rs | 2 +- parity/informant.rs | 2 +- parity/io_handler.rs | 2 +- parity/main.rs | 2 +- parity/migration.rs | 2 +- parity/modules.rs | 2 +- parity/params.rs | 2 +- parity/presale.rs | 2 +- parity/rpc.rs | 2 +- parity/rpc_apis.rs | 2 +- parity/run.rs | 2 +- parity/signer.rs | 2 +- parity/snapshot.rs | 2 +- parity/stratum.rs | 2 +- parity/sync.rs | 2 +- parity/upgrade.rs | 2 +- parity/url.rs | 2 +- rpc/build.rs | 2 +- rpc/rpctest/src/main.rs | 2 +- rpc/src/lib.rs | 2 +- rpc/src/v1/helpers/block_import.rs | 2 +- rpc/src/v1/helpers/dispatch.rs | 2 +- rpc/src/v1/helpers/mod.rs | 2 +- rpc/src/v1/helpers/network_settings.rs | 2 +- rpc/src/v1/helpers/params.rs | 2 +- rpc/src/v1/helpers/poll_manager.rs | 2 +- rpc/src/v1/helpers/requests.rs | 2 +- rpc/src/v1/helpers/signer.rs | 2 +- rpc/src/v1/impls/eth_filter.rs | 2 +- rpc/src/v1/impls/mod.rs | 2 +- rpc/src/v1/impls/net.rs | 2 +- rpc/src/v1/impls/parity_accounts.rs | 2 +- rpc/src/v1/impls/parity_set.rs | 2 +- rpc/src/v1/impls/personal.rs | 2 +- rpc/src/v1/impls/rpc.rs | 2 +- rpc/src/v1/impls/signer.rs | 2 +- rpc/src/v1/impls/signing.rs | 2 +- rpc/src/v1/impls/signing_unsafe.rs | 2 +- rpc/src/v1/impls/traces.rs | 2 +- rpc/src/v1/impls/web3.rs | 2 +- rpc/src/v1/mod.rs | 2 +- rpc/src/v1/traits/eth.rs | 2 +- rpc/src/v1/traits/eth_signing.rs | 2 +- rpc/src/v1/traits/mod.rs | 2 +- rpc/src/v1/traits/net.rs | 2 +- rpc/src/v1/traits/parity.rs | 2 +- rpc/src/v1/traits/parity_accounts.rs | 2 +- rpc/src/v1/traits/parity_set.rs | 2 +- rpc/src/v1/traits/parity_signing.rs | 2 +- rpc/src/v1/traits/personal.rs | 2 +- rpc/src/v1/traits/rpc.rs | 2 +- rpc/src/v1/traits/signer.rs | 2 +- rpc/src/v1/traits/traces.rs | 2 +- rpc/src/v1/traits/web3.rs | 2 +- rpc/src/v1/types/block_number.rs | 2 +- rpc/src/v1/types/bytes.rs | 2 +- rpc/src/v1/types/call_request.rs | 2 +- rpc/src/v1/types/dapp_id.rs | 2 +- rpc/src/v1/types/filter.rs | 2 +- rpc/src/v1/types/hash.rs | 2 +- rpc/src/v1/types/histogram.rs | 2 +- rpc/src/v1/types/index.rs | 2 +- rpc/src/v1/types/log.rs | 2 +- signer/build.rs | 2 +- signer/src/authcode_store.rs | 2 +- signer/src/lib.rs | 2 +- signer/src/tests/mod.rs | 2 +- signer/src/ws_server/mod.rs | 2 +- signer/src/ws_server/session.rs | 2 +- stratum/build.rs | 2 +- stratum/src/lib.rs | 2 +- stratum/src/traits.rs | 2 +- sync/build.rs | 2 +- sync/src/api.rs | 2 +- sync/src/block_sync.rs | 2 +- sync/src/blocks.rs | 2 +- sync/src/lib.rs | 2 +- sync/src/snapshot.rs | 2 +- sync/src/sync_io.rs | 2 +- sync/src/tests/chain.rs | 2 +- sync/src/tests/consensus.rs | 2 +- sync/src/tests/helpers.rs | 2 +- sync/src/tests/mod.rs | 2 +- sync/src/tests/rpc.rs | 2 +- sync/src/tests/snapshot.rs | 2 +- sync/src/transactions_stats.rs | 2 +- util/benches/bigint.rs | 2 +- util/benches/rlp.rs | 2 +- util/benches/trie.rs | 2 +- util/bigint/build.rs | 2 +- util/bigint/src/hash.rs | 2 +- util/bigint/src/lib.rs | 2 +- util/bloom/src/lib.rs | 2 +- util/build.rs | 2 +- util/fetch/src/client.rs | 2 +- util/fetch/src/fetch_file.rs | 2 +- util/fetch/src/lib.rs | 2 +- util/https-fetch/src/client.rs | 2 +- util/https-fetch/src/http.rs | 2 +- util/https-fetch/src/lib.rs | 2 +- util/https-fetch/src/tlsclient.rs | 2 +- util/https-fetch/src/url.rs | 2 +- util/io/src/lib.rs | 2 +- util/io/src/panics.rs | 2 +- util/io/src/service.rs | 2 +- util/io/src/worker.rs | 2 +- util/network/src/error.rs | 2 +- util/network/src/ip_utils.rs | 2 +- util/network/src/lib.rs | 2 +- util/network/src/node_table.rs | 2 +- util/network/src/service.rs | 2 +- util/network/src/stats.rs | 2 +- util/network/src/tests.rs | 2 +- util/rlp/src/bytes.rs | 2 +- util/rlp/src/commonrlps.rs | 2 +- util/rlp/src/lib.rs | 2 +- util/rlp/src/rlpcompression.rs | 2 +- util/rlp/src/rlperrors.rs | 2 +- util/rlp/src/rlpin.rs | 2 +- util/rlp/src/rlpstream.rs | 2 +- util/rlp/src/rlptraits.rs | 2 +- util/rlp/src/tests.rs | 2 +- util/rlp/src/untrusted_rlp.rs | 2 +- util/sha3/build.rs | 2 +- util/sha3/src/lib.rs | 2 +- util/src/bloom.rs | 2 +- util/src/bytes.rs | 2 +- util/src/cache.rs | 2 +- util/src/common.rs | 2 +- util/src/error.rs | 2 +- util/src/from_json.rs | 2 +- util/src/hashdb.rs | 2 +- util/src/journaldb/archivedb.rs | 2 +- util/src/journaldb/mod.rs | 2 +- util/src/journaldb/refcounteddb.rs | 2 +- util/src/journaldb/traits.rs | 2 +- util/src/kvdb.rs | 2 +- util/src/lib.rs | 2 +- util/src/log.rs | 2 +- util/src/memorydb.rs | 2 +- util/src/migration/mod.rs | 2 +- util/src/migration/tests.rs | 2 +- util/src/misc.rs | 2 +- util/src/nibbleslice.rs | 2 +- util/src/nibblevec.rs | 2 +- util/src/overlaydb.rs | 2 +- util/src/path.rs | 2 +- util/src/semantic_version.rs | 2 +- util/src/sha3.rs | 2 +- util/src/snappy.rs | 2 +- util/src/standard.rs | 2 +- util/src/stats.rs | 2 +- util/src/timer.rs | 2 +- util/src/trie/fatdb.rs | 2 +- util/src/trie/fatdbmut.rs | 2 +- util/src/trie/journal.rs | 2 +- util/src/trie/mod.rs | 2 +- util/src/trie/node.rs | 2 +- util/src/trie/recorder.rs | 2 +- util/src/trie/sectriedb.rs | 2 +- util/src/trie/sectriedbmut.rs | 2 +- util/src/trie/standardmap.rs | 2 +- util/src/trie/triedb.rs | 2 +- util/src/triehash.rs | 2 +- util/src/vector.rs | 2 +- util/table/src/lib.rs | 2 +- util/using_queue/src/lib.rs | 2 +- windows/ptray/ptray.cpp | 2 +- 820 files changed, 820 insertions(+), 820 deletions(-) diff --git a/build.rs b/build.rs index 41b9a1b3e..28cd9ef69 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/build.rs b/dapps/build.rs index b178027ae..d2a7919db 100644 --- a/dapps/build.rs +++ b/dapps/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/build.rs b/dapps/js-glue/build.rs index 82f990188..b81724774 100644 --- a/dapps/js-glue/build.rs +++ b/dapps/js-glue/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/src/codegen.rs b/dapps/js-glue/src/codegen.rs index 1a6b6fc7e..e51a8333d 100644 --- a/dapps/js-glue/src/codegen.rs +++ b/dapps/js-glue/src/codegen.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/src/js.rs b/dapps/js-glue/src/js.rs index 39c33689c..31946fc58 100644 --- a/dapps/js-glue/src/js.rs +++ b/dapps/js-glue/src/js.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/src/lib.rs b/dapps/js-glue/src/lib.rs index 28ac8d712..70cba4e9a 100644 --- a/dapps/js-glue/src/lib.rs +++ b/dapps/js-glue/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/src/lib.rs.in b/dapps/js-glue/src/lib.rs.in index 07c57705f..1abf6a3e6 100644 --- a/dapps/js-glue/src/lib.rs.in +++ b/dapps/js-glue/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/api.rs b/dapps/src/api/api.rs index 90ab837f5..440396898 100644 --- a/dapps/src/api/api.rs +++ b/dapps/src/api/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/mod.rs b/dapps/src/api/mod.rs index 402e84257..fa0b1f01b 100644 --- a/dapps/src/api/mod.rs +++ b/dapps/src/api/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/response.rs b/dapps/src/api/response.rs index 3e8f196ec..bb1be2448 100644 --- a/dapps/src/api/response.rs +++ b/dapps/src/api/response.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/types.rs b/dapps/src/api/types.rs index 64697123b..a6815105f 100644 --- a/dapps/src/api/types.rs +++ b/dapps/src/api/types.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/types.rs.in b/dapps/src/api/types.rs.in index a95a0d446..48fd00e39 100644 --- a/dapps/src/api/types.rs.in +++ b/dapps/src/api/types.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/cache.rs b/dapps/src/apps/cache.rs index 9d1642fb0..3f531fe41 100644 --- a/dapps/src/apps/cache.rs +++ b/dapps/src/apps/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/fetcher.rs b/dapps/src/apps/fetcher.rs index e7f36d144..2430af035 100644 --- a/dapps/src/apps/fetcher.rs +++ b/dapps/src/apps/fetcher.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/fs.rs b/dapps/src/apps/fs.rs index f0b4ddfa8..b7188b0b4 100644 --- a/dapps/src/apps/fs.rs +++ b/dapps/src/apps/fs.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/manifest.rs b/dapps/src/apps/manifest.rs index 6d9874b86..62571d71d 100644 --- a/dapps/src/apps/manifest.rs +++ b/dapps/src/apps/manifest.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/mod.rs b/dapps/src/apps/mod.rs index 4c9270aa5..3f3b1aaba 100644 --- a/dapps/src/apps/mod.rs +++ b/dapps/src/apps/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/endpoint.rs b/dapps/src/endpoint.rs index eea7a872f..ccf716644 100644 --- a/dapps/src/endpoint.rs +++ b/dapps/src/endpoint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/auth.rs b/dapps/src/handlers/auth.rs index 7f72f7cf8..797fdf29f 100644 --- a/dapps/src/handlers/auth.rs +++ b/dapps/src/handlers/auth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/content.rs b/dapps/src/handlers/content.rs index fde5fbcf0..42bb2fc48 100644 --- a/dapps/src/handlers/content.rs +++ b/dapps/src/handlers/content.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/echo.rs b/dapps/src/handlers/echo.rs index 165ceb171..afe679944 100644 --- a/dapps/src/handlers/echo.rs +++ b/dapps/src/handlers/echo.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/fetch.rs b/dapps/src/handlers/fetch.rs index a34b58fa7..6fb524293 100644 --- a/dapps/src/handlers/fetch.rs +++ b/dapps/src/handlers/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/mod.rs b/dapps/src/handlers/mod.rs index 1299a9c12..bb292ad4d 100644 --- a/dapps/src/handlers/mod.rs +++ b/dapps/src/handlers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/redirect.rs b/dapps/src/handlers/redirect.rs index e43d32e24..d97f559b7 100644 --- a/dapps/src/handlers/redirect.rs +++ b/dapps/src/handlers/redirect.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/lib.rs b/dapps/src/lib.rs index 9bb3be4a7..c1ce5de19 100644 --- a/dapps/src/lib.rs +++ b/dapps/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/page/builtin.rs b/dapps/src/page/builtin.rs index 40c0e23a6..3fbfcff16 100644 --- a/dapps/src/page/builtin.rs +++ b/dapps/src/page/builtin.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/page/handler.rs b/dapps/src/page/handler.rs index 1494a04c7..382dfa5d1 100644 --- a/dapps/src/page/handler.rs +++ b/dapps/src/page/handler.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/page/local.rs b/dapps/src/page/local.rs index ec24cac36..77c91019d 100644 --- a/dapps/src/page/local.rs +++ b/dapps/src/page/local.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/page/mod.rs b/dapps/src/page/mod.rs index 92c066df3..9619f1b10 100644 --- a/dapps/src/page/mod.rs +++ b/dapps/src/page/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/proxypac.rs b/dapps/src/proxypac.rs index 88ecb6ab3..8ca87a1e2 100644 --- a/dapps/src/proxypac.rs +++ b/dapps/src/proxypac.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/router/auth.rs b/dapps/src/router/auth.rs index a220e2ab0..e6b781f3d 100644 --- a/dapps/src/router/auth.rs +++ b/dapps/src/router/auth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/router/host_validation.rs b/dapps/src/router/host_validation.rs index 802466efd..57634e07a 100644 --- a/dapps/src/router/host_validation.rs +++ b/dapps/src/router/host_validation.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/router/mod.rs b/dapps/src/router/mod.rs index c0a33f2eb..b444b1526 100644 --- a/dapps/src/router/mod.rs +++ b/dapps/src/router/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/rpc.rs b/dapps/src/rpc.rs index c47777bee..f7d988ce8 100644 --- a/dapps/src/rpc.rs +++ b/dapps/src/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/api.rs b/dapps/src/tests/api.rs index ea4c08c60..5edfa20f5 100644 --- a/dapps/src/tests/api.rs +++ b/dapps/src/tests/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/authorization.rs b/dapps/src/tests/authorization.rs index 86fe4d207..3c16f6296 100644 --- a/dapps/src/tests/authorization.rs +++ b/dapps/src/tests/authorization.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/fetch.rs b/dapps/src/tests/fetch.rs index d50b2bdde..8540a407f 100644 --- a/dapps/src/tests/fetch.rs +++ b/dapps/src/tests/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/helpers.rs b/dapps/src/tests/helpers.rs index 66bf0f8eb..13d7c69d2 100644 --- a/dapps/src/tests/helpers.rs +++ b/dapps/src/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/mod.rs b/dapps/src/tests/mod.rs index cc0e693c9..d936bf848 100644 --- a/dapps/src/tests/mod.rs +++ b/dapps/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/redirection.rs b/dapps/src/tests/redirection.rs index b0a5ca9a2..b676616a4 100644 --- a/dapps/src/tests/redirection.rs +++ b/dapps/src/tests/redirection.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/validation.rs b/dapps/src/tests/validation.rs index ae02a6c2c..6124542c7 100644 --- a/dapps/src/tests/validation.rs +++ b/dapps/src/tests/validation.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/url.rs b/dapps/src/url.rs index c9eb2f78f..b8b8393cc 100644 --- a/dapps/src/url.rs +++ b/dapps/src/url.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/ui/src/lib.rs b/dapps/ui/src/lib.rs index 6a69a503d..286007451 100644 --- a/dapps/ui/src/lib.rs +++ b/dapps/ui/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/build.rs b/db/build.rs index 239185d84..a5e55eed5 100644 --- a/db/build.rs +++ b/db/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/src/database.rs b/db/src/database.rs index e1774159b..c17270034 100644 --- a/db/src/database.rs +++ b/db/src/database.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/src/lib.rs b/db/src/lib.rs index 1daaf55c9..a46e34487 100644 --- a/db/src/lib.rs +++ b/db/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/src/lib.rs.in b/db/src/lib.rs.in index 54fccb097..31dbfd71c 100644 --- a/db/src/lib.rs.in +++ b/db/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/src/traits.rs b/db/src/traits.rs index fe4cd5d44..ee4e502ac 100644 --- a/db/src/traits.rs +++ b/db/src/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/src/http_client.rs b/devtools/src/http_client.rs index 2440a7cda..bb3b896af 100644 --- a/devtools/src/http_client.rs +++ b/devtools/src/http_client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/src/lib.rs b/devtools/src/lib.rs index 87457f7f3..25d27a9e7 100644 --- a/devtools/src/lib.rs +++ b/devtools/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/src/random_path.rs b/devtools/src/random_path.rs index 9c6c261a2..ee8c39ad3 100644 --- a/devtools/src/random_path.rs +++ b/devtools/src/random_path.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/src/stop_guard.rs b/devtools/src/stop_guard.rs index f1db59725..8745f7048 100644 --- a/devtools/src/stop_guard.rs +++ b/devtools/src/stop_guard.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/src/test_socket.rs b/devtools/src/test_socket.rs index 0d38e66a5..33bb862ab 100644 --- a/devtools/src/test_socket.rs +++ b/devtools/src/test_socket.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethash/src/compute.rs b/ethash/src/compute.rs index 6fcf17cf1..269c3d863 100644 --- a/ethash/src/compute.rs +++ b/ethash/src/compute.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethash/src/lib.rs b/ethash/src/lib.rs index a04e2486b..06182bc50 100644 --- a/ethash/src/lib.rs +++ b/ethash/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/build.rs b/ethcore/build.rs index 5a3a3f0ba..fc93b1035 100644 --- a/ethcore/build.rs +++ b/ethcore/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/hash-fetch/src/client.rs b/ethcore/hash-fetch/src/client.rs index f5d19afa5..b72aa3bc9 100644 --- a/ethcore/hash-fetch/src/client.rs +++ b/ethcore/hash-fetch/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/hash-fetch/src/lib.rs b/ethcore/hash-fetch/src/lib.rs index ffb74b260..d8d1123d2 100644 --- a/ethcore/hash-fetch/src/lib.rs +++ b/ethcore/hash-fetch/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/hash-fetch/src/urlhint.rs b/ethcore/hash-fetch/src/urlhint.rs index 9cbd13b1e..79575e8f3 100644 --- a/ethcore/hash-fetch/src/urlhint.rs +++ b/ethcore/hash-fetch/src/urlhint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/build.rs b/ethcore/light/build.rs index 7d4e0064c..2995d28ad 100644 --- a/ethcore/light/build.rs +++ b/ethcore/light/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/error.rs b/ethcore/light/src/net/error.rs index 01a15928b..42d038679 100644 --- a/ethcore/light/src/net/error.rs +++ b/ethcore/light/src/net/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/types/mod.rs b/ethcore/light/src/types/mod.rs index d7f473553..86d269766 100644 --- a/ethcore/light/src/types/mod.rs +++ b/ethcore/light/src/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/types/mod.rs.in b/ethcore/light/src/types/mod.rs.in index 2b7386b5b..48ef2da90 100644 --- a/ethcore/light/src/types/mod.rs.in +++ b/ethcore/light/src/types/mod.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/account_db.rs b/ethcore/src/account_db.rs index 63524a442..a42399073 100644 --- a/ethcore/src/account_db.rs +++ b/ethcore/src/account_db.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/account_provider/mod.rs b/ethcore/src/account_provider/mod.rs index 59fbda045..1175f2d02 100644 --- a/ethcore/src/account_provider/mod.rs +++ b/ethcore/src/account_provider/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/account_provider/stores.rs b/ethcore/src/account_provider/stores.rs index 8bf555d68..d7e96243c 100644 --- a/ethcore/src/account_provider/stores.rs +++ b/ethcore/src/account_provider/stores.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/action_params.rs b/ethcore/src/action_params.rs index 8b863c625..3d15c7392 100644 --- a/ethcore/src/action_params.rs +++ b/ethcore/src/action_params.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/basic_types.rs b/ethcore/src/basic_types.rs index 79f009fd1..b49a93c44 100644 --- a/ethcore/src/basic_types.rs +++ b/ethcore/src/basic_types.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/best_block.rs b/ethcore/src/blockchain/best_block.rs index d5a6c06b2..e748a9556 100644 --- a/ethcore/src/blockchain/best_block.rs +++ b/ethcore/src/blockchain/best_block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/block_info.rs b/ethcore/src/blockchain/block_info.rs index fee0e825b..fa8310c03 100644 --- a/ethcore/src/blockchain/block_info.rs +++ b/ethcore/src/blockchain/block_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/cache.rs b/ethcore/src/blockchain/cache.rs index 819676ca5..88a0727a0 100644 --- a/ethcore/src/blockchain/cache.rs +++ b/ethcore/src/blockchain/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/config.rs b/ethcore/src/blockchain/config.rs index 324474958..807535573 100644 --- a/ethcore/src/blockchain/config.rs +++ b/ethcore/src/blockchain/config.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/extras.rs b/ethcore/src/blockchain/extras.rs index 6dc7aef98..bf32258f9 100644 --- a/ethcore/src/blockchain/extras.rs +++ b/ethcore/src/blockchain/extras.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/block.rs b/ethcore/src/blockchain/generator/block.rs index 6b8aa78f2..e2ad51818 100644 --- a/ethcore/src/blockchain/generator/block.rs +++ b/ethcore/src/blockchain/generator/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/bloom.rs b/ethcore/src/blockchain/generator/bloom.rs index f61c9d1ff..21fa59f45 100644 --- a/ethcore/src/blockchain/generator/bloom.rs +++ b/ethcore/src/blockchain/generator/bloom.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/complete.rs b/ethcore/src/blockchain/generator/complete.rs index 39bd587a0..1d24b32c7 100644 --- a/ethcore/src/blockchain/generator/complete.rs +++ b/ethcore/src/blockchain/generator/complete.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/fork.rs b/ethcore/src/blockchain/generator/fork.rs index f3a4eb267..a6953d536 100644 --- a/ethcore/src/blockchain/generator/fork.rs +++ b/ethcore/src/blockchain/generator/fork.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/generator.rs b/ethcore/src/blockchain/generator/generator.rs index ebe9e22c0..eb00f0dfb 100644 --- a/ethcore/src/blockchain/generator/generator.rs +++ b/ethcore/src/blockchain/generator/generator.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/mod.rs b/ethcore/src/blockchain/generator/mod.rs index 683ab7dfb..941c1d470 100644 --- a/ethcore/src/blockchain/generator/mod.rs +++ b/ethcore/src/blockchain/generator/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/transaction.rs b/ethcore/src/blockchain/generator/transaction.rs index aa1d3bdd3..12cf549fe 100644 --- a/ethcore/src/blockchain/generator/transaction.rs +++ b/ethcore/src/blockchain/generator/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/import_route.rs b/ethcore/src/blockchain/import_route.rs index 02469bb90..8063416d9 100644 --- a/ethcore/src/blockchain/import_route.rs +++ b/ethcore/src/blockchain/import_route.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/mod.rs b/ethcore/src/blockchain/mod.rs index 7b9ae0e60..44dea3055 100644 --- a/ethcore/src/blockchain/mod.rs +++ b/ethcore/src/blockchain/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blooms/bloom.rs b/ethcore/src/blooms/bloom.rs index b535bcb21..ae6315aa0 100644 --- a/ethcore/src/blooms/bloom.rs +++ b/ethcore/src/blooms/bloom.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blooms/bloom_group.rs b/ethcore/src/blooms/bloom_group.rs index 9e3b53f18..2dbc4e455 100644 --- a/ethcore/src/blooms/bloom_group.rs +++ b/ethcore/src/blooms/bloom_group.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blooms/group_position.rs b/ethcore/src/blooms/group_position.rs index 3a6cc8e83..9952d1508 100644 --- a/ethcore/src/blooms/group_position.rs +++ b/ethcore/src/blooms/group_position.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blooms/mod.rs b/ethcore/src/blooms/mod.rs index 9d8a71d71..b962387fa 100644 --- a/ethcore/src/blooms/mod.rs +++ b/ethcore/src/blooms/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/builtin.rs b/ethcore/src/builtin.rs index e8eb0ed68..7c1bbb2c6 100644 --- a/ethcore/src/builtin.rs +++ b/ethcore/src/builtin.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/cache_manager.rs b/ethcore/src/cache_manager.rs index 6ad01b453..afc77f683 100644 --- a/ethcore/src/cache_manager.rs +++ b/ethcore/src/cache_manager.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/chain_notify.rs b/ethcore/src/client/chain_notify.rs index e0282d460..d9ebac299 100644 --- a/ethcore/src/client/chain_notify.rs +++ b/ethcore/src/client/chain_notify.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index 045b8ee05..575d5ac31 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 4e5554b01..2b64ef628 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 2e08b22bf..8442d723b 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index ad21d2ba5..4b6609cf6 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/db.rs b/ethcore/src/db.rs index 92c0f1b39..16d538f4e 100644 --- a/ethcore/src/db.rs +++ b/ethcore/src/db.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs index 98190c1ea..9f78d8cec 100644 --- a/ethcore/src/engines/authority_round.rs +++ b/ethcore/src/engines/authority_round.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/basic_authority.rs b/ethcore/src/engines/basic_authority.rs index 1070d3a3d..5676365da 100644 --- a/ethcore/src/engines/basic_authority.rs +++ b/ethcore/src/engines/basic_authority.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/instant_seal.rs b/ethcore/src/engines/instant_seal.rs index 83335fb03..f15ccba81 100644 --- a/ethcore/src/engines/instant_seal.rs +++ b/ethcore/src/engines/instant_seal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/null_engine.rs b/ethcore/src/engines/null_engine.rs index bd5a4474a..4272060a5 100644 --- a/ethcore/src/engines/null_engine.rs +++ b/ethcore/src/engines/null_engine.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/env_info.rs b/ethcore/src/env_info.rs index ddef71608..bdefeefce 100644 --- a/ethcore/src/env_info.rs +++ b/ethcore/src/env_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/error.rs b/ethcore/src/error.rs index 261eab268..4afbe25b8 100644 --- a/ethcore/src/error.rs +++ b/ethcore/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/ethereum/denominations.rs b/ethcore/src/ethereum/denominations.rs index a8ac2c44c..6df11fd49 100644 --- a/ethcore/src/ethereum/denominations.rs +++ b/ethcore/src/ethereum/denominations.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/ethereum/mod.rs b/ethcore/src/ethereum/mod.rs index 3916e5ccc..3a20f1e43 100644 --- a/ethcore/src/ethereum/mod.rs +++ b/ethcore/src/ethereum/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/benches/mod.rs b/ethcore/src/evm/benches/mod.rs index cbed7d881..de7f318c4 100644 --- a/ethcore/src/evm/benches/mod.rs +++ b/ethcore/src/evm/benches/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/evm.rs b/ethcore/src/evm/evm.rs index 8d2202480..3270b06e4 100644 --- a/ethcore/src/evm/evm.rs +++ b/ethcore/src/evm/evm.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/ext.rs b/ethcore/src/evm/ext.rs index 1c340b5b1..38c2d9fed 100644 --- a/ethcore/src/evm/ext.rs +++ b/ethcore/src/evm/ext.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/factory.rs b/ethcore/src/evm/factory.rs index a3d94bde8..e84acb4a4 100644 --- a/ethcore/src/evm/factory.rs +++ b/ethcore/src/evm/factory.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/informant.rs b/ethcore/src/evm/interpreter/informant.rs index 200b01526..e16267174 100644 --- a/ethcore/src/evm/interpreter/informant.rs +++ b/ethcore/src/evm/interpreter/informant.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/memory.rs b/ethcore/src/evm/interpreter/memory.rs index 8195a0da3..7a564ee6d 100644 --- a/ethcore/src/evm/interpreter/memory.rs +++ b/ethcore/src/evm/interpreter/memory.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/shared_cache.rs b/ethcore/src/evm/interpreter/shared_cache.rs index cacc4dde3..25a64f100 100644 --- a/ethcore/src/evm/interpreter/shared_cache.rs +++ b/ethcore/src/evm/interpreter/shared_cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/stack.rs b/ethcore/src/evm/interpreter/stack.rs index 0d7ef4dbb..187d7db18 100644 --- a/ethcore/src/evm/interpreter/stack.rs +++ b/ethcore/src/evm/interpreter/stack.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/jit.rs b/ethcore/src/evm/jit.rs index 6fa617396..a40c6eac3 100644 --- a/ethcore/src/evm/jit.rs +++ b/ethcore/src/evm/jit.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/mod.rs b/ethcore/src/evm/mod.rs index bfead60c1..36931220c 100644 --- a/ethcore/src/evm/mod.rs +++ b/ethcore/src/evm/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/schedule.rs b/ethcore/src/evm/schedule.rs index 773708956..d49c1afcd 100644 --- a/ethcore/src/evm/schedule.rs +++ b/ethcore/src/evm/schedule.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/externalities.rs b/ethcore/src/externalities.rs index 3704ead67..7a8f60b79 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/factory.rs b/ethcore/src/factory.rs index dec341820..da22d56ee 100644 --- a/ethcore/src/factory.rs +++ b/ethcore/src/factory.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/header.rs b/ethcore/src/header.rs index 228933570..666ed3ec2 100644 --- a/ethcore/src/header.rs +++ b/ethcore/src/header.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/chain.rs b/ethcore/src/json_tests/chain.rs index b50241199..5d79aab56 100644 --- a/ethcore/src/json_tests/chain.rs +++ b/ethcore/src/json_tests/chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/eip150_state.rs b/ethcore/src/json_tests/eip150_state.rs index 9076286eb..cda1b64b4 100644 --- a/ethcore/src/json_tests/eip150_state.rs +++ b/ethcore/src/json_tests/eip150_state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/eip161_state.rs b/ethcore/src/json_tests/eip161_state.rs index da7997fa1..10c863793 100644 --- a/ethcore/src/json_tests/eip161_state.rs +++ b/ethcore/src/json_tests/eip161_state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/executive.rs b/ethcore/src/json_tests/executive.rs index 60321f971..ffaf36d5e 100644 --- a/ethcore/src/json_tests/executive.rs +++ b/ethcore/src/json_tests/executive.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/homestead_chain.rs b/ethcore/src/json_tests/homestead_chain.rs index 37a9d0a21..7a4fe2121 100644 --- a/ethcore/src/json_tests/homestead_chain.rs +++ b/ethcore/src/json_tests/homestead_chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/homestead_state.rs b/ethcore/src/json_tests/homestead_state.rs index 0b611dad7..d824e2b0b 100644 --- a/ethcore/src/json_tests/homestead_state.rs +++ b/ethcore/src/json_tests/homestead_state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/mod.rs b/ethcore/src/json_tests/mod.rs index 13d3fb5bb..833b40270 100644 --- a/ethcore/src/json_tests/mod.rs +++ b/ethcore/src/json_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/test_common.rs b/ethcore/src/json_tests/test_common.rs index e77b3df93..f794cfcb3 100644 --- a/ethcore/src/json_tests/test_common.rs +++ b/ethcore/src/json_tests/test_common.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/transaction.rs b/ethcore/src/json_tests/transaction.rs index 12e82bca2..7f8731343 100644 --- a/ethcore/src/json_tests/transaction.rs +++ b/ethcore/src/json_tests/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/trie.rs b/ethcore/src/json_tests/trie.rs index 4090ec762..065985b0a 100644 --- a/ethcore/src/json_tests/trie.rs +++ b/ethcore/src/json_tests/trie.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index ca343b1a7..244ab932f 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/blocks/mod.rs b/ethcore/src/migrations/blocks/mod.rs index 7253208bb..172e6df43 100644 --- a/ethcore/src/migrations/blocks/mod.rs +++ b/ethcore/src/migrations/blocks/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/blocks/v8.rs b/ethcore/src/migrations/blocks/v8.rs index 21024f93d..b58e66ea3 100644 --- a/ethcore/src/migrations/blocks/v8.rs +++ b/ethcore/src/migrations/blocks/v8.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/extras/mod.rs b/ethcore/src/migrations/extras/mod.rs index 0635596ea..d91691b56 100644 --- a/ethcore/src/migrations/extras/mod.rs +++ b/ethcore/src/migrations/extras/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/extras/v6.rs b/ethcore/src/migrations/extras/v6.rs index 9b746b9d2..f80394dc7 100644 --- a/ethcore/src/migrations/extras/v6.rs +++ b/ethcore/src/migrations/extras/v6.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/mod.rs b/ethcore/src/migrations/mod.rs index 7ccafac74..32b7048e0 100644 --- a/ethcore/src/migrations/mod.rs +++ b/ethcore/src/migrations/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/state/mod.rs b/ethcore/src/migrations/state/mod.rs index 9a6b9e086..f48b4c247 100644 --- a/ethcore/src/migrations/state/mod.rs +++ b/ethcore/src/migrations/state/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/state/v7.rs b/ethcore/src/migrations/state/v7.rs index 49df041eb..69178188b 100644 --- a/ethcore/src/migrations/state/v7.rs +++ b/ethcore/src/migrations/state/v7.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/v10.rs b/ethcore/src/migrations/v10.rs index 77531eb08..3726d2e97 100644 --- a/ethcore/src/migrations/v10.rs +++ b/ethcore/src/migrations/v10.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/v9.rs b/ethcore/src/migrations/v9.rs index 83729dc55..b99de0f51 100644 --- a/ethcore/src/migrations/v9.rs +++ b/ethcore/src/migrations/v9.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/banning_queue.rs b/ethcore/src/miner/banning_queue.rs index 0fdea2ac3..d8b038c15 100644 --- a/ethcore/src/miner/banning_queue.rs +++ b/ethcore/src/miner/banning_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/external.rs b/ethcore/src/miner/external.rs index c3fcf723f..199e795fd 100644 --- a/ethcore/src/miner/external.rs +++ b/ethcore/src/miner/external.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/local_transactions.rs b/ethcore/src/miner/local_transactions.rs index c8afcc0d5..62cec7151 100644 --- a/ethcore/src/miner/local_transactions.rs +++ b/ethcore/src/miner/local_transactions.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs index 8c466581b..814953c81 100644 --- a/ethcore/src/miner/mod.rs +++ b/ethcore/src/miner/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/price_info.rs b/ethcore/src/miner/price_info.rs index 77bc1ce0f..e1cf82f99 100644 --- a/ethcore/src/miner/price_info.rs +++ b/ethcore/src/miner/price_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/work_notify.rs b/ethcore/src/miner/work_notify.rs index 557f02f31..1b2ce67b1 100644 --- a/ethcore/src/miner/work_notify.rs +++ b/ethcore/src/miner/work_notify.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/pod_account.rs b/ethcore/src/pod_account.rs index 92a78cebd..20a9a46d4 100644 --- a/ethcore/src/pod_account.rs +++ b/ethcore/src/pod_account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/pod_state.rs b/ethcore/src/pod_state.rs index d9f44680e..18045c510 100644 --- a/ethcore/src/pod_state.rs +++ b/ethcore/src/pod_state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/service.rs b/ethcore/src/service.rs index 36b5e7157..bf346e707 100644 --- a/ethcore/src/service.rs +++ b/ethcore/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/account.rs b/ethcore/src/snapshot/account.rs index 327979ce3..9d5385d92 100644 --- a/ethcore/src/snapshot/account.rs +++ b/ethcore/src/snapshot/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/block.rs b/ethcore/src/snapshot/block.rs index 4f7f912ca..94b7a4289 100644 --- a/ethcore/src/snapshot/block.rs +++ b/ethcore/src/snapshot/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/error.rs b/ethcore/src/snapshot/error.rs index cc84d8e48..46ef6f41b 100644 --- a/ethcore/src/snapshot/error.rs +++ b/ethcore/src/snapshot/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/io.rs b/ethcore/src/snapshot/io.rs index cd57b35d3..2d581d571 100644 --- a/ethcore/src/snapshot/io.rs +++ b/ethcore/src/snapshot/io.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/mod.rs b/ethcore/src/snapshot/mod.rs index 9b45f2687..1e646effc 100644 --- a/ethcore/src/snapshot/mod.rs +++ b/ethcore/src/snapshot/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/service.rs b/ethcore/src/snapshot/service.rs index 05c4c1f9f..b433108fd 100644 --- a/ethcore/src/snapshot/service.rs +++ b/ethcore/src/snapshot/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/snapshot_service_trait.rs b/ethcore/src/snapshot/snapshot_service_trait.rs index 42223f878..aa2782a5a 100644 --- a/ethcore/src/snapshot/snapshot_service_trait.rs +++ b/ethcore/src/snapshot/snapshot_service_trait.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/blocks.rs b/ethcore/src/snapshot/tests/blocks.rs index 3d9390d2e..058d311e2 100644 --- a/ethcore/src/snapshot/tests/blocks.rs +++ b/ethcore/src/snapshot/tests/blocks.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/helpers.rs b/ethcore/src/snapshot/tests/helpers.rs index c97f138d7..164f99121 100644 --- a/ethcore/src/snapshot/tests/helpers.rs +++ b/ethcore/src/snapshot/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/mod.rs b/ethcore/src/snapshot/tests/mod.rs index d9c0abc73..d63abec53 100644 --- a/ethcore/src/snapshot/tests/mod.rs +++ b/ethcore/src/snapshot/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/service.rs b/ethcore/src/snapshot/tests/service.rs index efdb12323..b460d5806 100644 --- a/ethcore/src/snapshot/tests/service.rs +++ b/ethcore/src/snapshot/tests/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/state.rs b/ethcore/src/snapshot/tests/state.rs index 36c268f73..380e9fb0d 100644 --- a/ethcore/src/snapshot/tests/state.rs +++ b/ethcore/src/snapshot/tests/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/watcher.rs b/ethcore/src/snapshot/watcher.rs index ab4dde134..2ee186020 100644 --- a/ethcore/src/snapshot/watcher.rs +++ b/ethcore/src/snapshot/watcher.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/spec/genesis.rs b/ethcore/src/spec/genesis.rs index 380c48aba..be3b7c808 100644 --- a/ethcore/src/spec/genesis.rs +++ b/ethcore/src/spec/genesis.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/spec/mod.rs b/ethcore/src/spec/mod.rs index 356f3b219..b7288c268 100644 --- a/ethcore/src/spec/mod.rs +++ b/ethcore/src/spec/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/spec/seal.rs b/ethcore/src/spec/seal.rs index f3e5dca95..eaf951189 100644 --- a/ethcore/src/spec/seal.rs +++ b/ethcore/src/spec/seal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index e14ea3949..5d0cc8360 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/state/account.rs b/ethcore/src/state/account.rs index c3d812c46..d778412c4 100644 --- a/ethcore/src/state/account.rs +++ b/ethcore/src/state/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/state/substate.rs b/ethcore/src/state/substate.rs index c11f802a1..0f1ac2ecd 100644 --- a/ethcore/src/state/substate.rs +++ b/ethcore/src/state/substate.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/state_db.rs b/ethcore/src/state_db.rs index eafa4022e..79c1a4a2c 100644 --- a/ethcore/src/state_db.rs +++ b/ethcore/src/state_db.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/tests/client.rs b/ethcore/src/tests/client.rs index 0b688345d..51c7086b6 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/tests/helpers.rs b/ethcore/src/tests/helpers.rs index e952fe27a..602217d88 100644 --- a/ethcore/src/tests/helpers.rs +++ b/ethcore/src/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/tests/mod.rs b/ethcore/src/tests/mod.rs index 4157e486d..e9eb39c88 100644 --- a/ethcore/src/tests/mod.rs +++ b/ethcore/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/tests/rpc.rs b/ethcore/src/tests/rpc.rs index 2da94b3d0..9e4d3db7b 100644 --- a/ethcore/src/tests/rpc.rs +++ b/ethcore/src/tests/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/config.rs b/ethcore/src/trace/config.rs index 9dab7524d..01b1c60e1 100644 --- a/ethcore/src/trace/config.rs +++ b/ethcore/src/trace/config.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/db.rs b/ethcore/src/trace/db.rs index 174c9b386..c55bd0748 100644 --- a/ethcore/src/trace/db.rs +++ b/ethcore/src/trace/db.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/error.rs b/ethcore/src/trace/error.rs index 32c372f7e..e8c103594 100644 --- a/ethcore/src/trace/error.rs +++ b/ethcore/src/trace/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/executive_tracer.rs b/ethcore/src/trace/executive_tracer.rs index bb18c61a8..f3cabf832 100644 --- a/ethcore/src/trace/executive_tracer.rs +++ b/ethcore/src/trace/executive_tracer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/import.rs b/ethcore/src/trace/import.rs index 7da3e5fe2..2fea9429e 100644 --- a/ethcore/src/trace/import.rs +++ b/ethcore/src/trace/import.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/mod.rs b/ethcore/src/trace/mod.rs index da3bbc02b..d5c0d361f 100644 --- a/ethcore/src/trace/mod.rs +++ b/ethcore/src/trace/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/noop_tracer.rs b/ethcore/src/trace/noop_tracer.rs index f126d85aa..a1b994550 100644 --- a/ethcore/src/trace/noop_tracer.rs +++ b/ethcore/src/trace/noop_tracer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/account_diff.rs b/ethcore/src/types/account_diff.rs index e4766d7f1..c8d5c9eec 100644 --- a/ethcore/src/types/account_diff.rs +++ b/ethcore/src/types/account_diff.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/block_import_error.rs b/ethcore/src/types/block_import_error.rs index 355f29152..e229db6d2 100644 --- a/ethcore/src/types/block_import_error.rs +++ b/ethcore/src/types/block_import_error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/block_status.rs b/ethcore/src/types/block_status.rs index 857daae10..d1c6c7d5b 100644 --- a/ethcore/src/types/block_status.rs +++ b/ethcore/src/types/block_status.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/blockchain_info.rs b/ethcore/src/types/blockchain_info.rs index ff6aa8dde..6757acf64 100644 --- a/ethcore/src/types/blockchain_info.rs +++ b/ethcore/src/types/blockchain_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/call_analytics.rs b/ethcore/src/types/call_analytics.rs index d38be0cc7..9da2d11ae 100644 --- a/ethcore/src/types/call_analytics.rs +++ b/ethcore/src/types/call_analytics.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/executed.rs b/ethcore/src/types/executed.rs index b4328b75d..3ce8d2634 100644 --- a/ethcore/src/types/executed.rs +++ b/ethcore/src/types/executed.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/filter.rs b/ethcore/src/types/filter.rs index ecc997f71..8aecef43b 100644 --- a/ethcore/src/types/filter.rs +++ b/ethcore/src/types/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/ids.rs b/ethcore/src/types/ids.rs index 2c3c777b4..2828c4798 100644 --- a/ethcore/src/types/ids.rs +++ b/ethcore/src/types/ids.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/log_entry.rs b/ethcore/src/types/log_entry.rs index 0e5f7d531..19531a9e9 100644 --- a/ethcore/src/types/log_entry.rs +++ b/ethcore/src/types/log_entry.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/mod.rs b/ethcore/src/types/mod.rs index d01829ea0..959ff694a 100644 --- a/ethcore/src/types/mod.rs +++ b/ethcore/src/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/mod.rs.in b/ethcore/src/types/mod.rs.in index d462d3cb9..47a4b6a84 100644 --- a/ethcore/src/types/mod.rs.in +++ b/ethcore/src/types/mod.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/mode.rs b/ethcore/src/types/mode.rs index dff75e158..a1df3c76f 100644 --- a/ethcore/src/types/mode.rs +++ b/ethcore/src/types/mode.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/pruning_info.rs b/ethcore/src/types/pruning_info.rs index 40564f488..fd5689d2d 100644 --- a/ethcore/src/types/pruning_info.rs +++ b/ethcore/src/types/pruning_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/receipt.rs b/ethcore/src/types/receipt.rs index deefeb383..c15f039bc 100644 --- a/ethcore/src/types/receipt.rs +++ b/ethcore/src/types/receipt.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/restoration_status.rs b/ethcore/src/types/restoration_status.rs index ddf4cf1db..507659d5b 100644 --- a/ethcore/src/types/restoration_status.rs +++ b/ethcore/src/types/restoration_status.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/snapshot_manifest.rs b/ethcore/src/types/snapshot_manifest.rs index 859ec016f..dac164b0b 100644 --- a/ethcore/src/types/snapshot_manifest.rs +++ b/ethcore/src/types/snapshot_manifest.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/state_diff.rs b/ethcore/src/types/state_diff.rs index ee416d1d0..6b8242db6 100644 --- a/ethcore/src/types/state_diff.rs +++ b/ethcore/src/types/state_diff.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_filter.rs b/ethcore/src/types/trace_filter.rs index af9d7c3ee..5a7ed8429 100644 --- a/ethcore/src/types/trace_filter.rs +++ b/ethcore/src/types/trace_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/error.rs b/ethcore/src/types/trace_types/error.rs index 5b2510c81..72b873fc9 100644 --- a/ethcore/src/types/trace_types/error.rs +++ b/ethcore/src/types/trace_types/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/flat.rs b/ethcore/src/types/trace_types/flat.rs index d0c7cbe9b..8a949c210 100644 --- a/ethcore/src/types/trace_types/flat.rs +++ b/ethcore/src/types/trace_types/flat.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/localized.rs b/ethcore/src/types/trace_types/localized.rs index f276e9b25..57abea362 100644 --- a/ethcore/src/types/trace_types/localized.rs +++ b/ethcore/src/types/trace_types/localized.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/mod.rs b/ethcore/src/types/trace_types/mod.rs index f940263b2..df5c803bb 100644 --- a/ethcore/src/types/trace_types/mod.rs +++ b/ethcore/src/types/trace_types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/transaction.rs b/ethcore/src/types/transaction.rs index 1c6ef92e3..6388120c3 100644 --- a/ethcore/src/types/transaction.rs +++ b/ethcore/src/types/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/transaction_import.rs b/ethcore/src/types/transaction_import.rs index e53313df7..cfd3d5243 100644 --- a/ethcore/src/types/transaction_import.rs +++ b/ethcore/src/types/transaction_import.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/tree_route.rs b/ethcore/src/types/tree_route.rs index 5d08f5601..7a97cac03 100644 --- a/ethcore/src/types/tree_route.rs +++ b/ethcore/src/types/tree_route.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/verification_queue_info.rs b/ethcore/src/types/verification_queue_info.rs index 35954e7a9..3361155df 100644 --- a/ethcore/src/types/verification_queue_info.rs +++ b/ethcore/src/types/verification_queue_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/canon_verifier.rs b/ethcore/src/verification/canon_verifier.rs index b5b01279e..75b0943ea 100644 --- a/ethcore/src/verification/canon_verifier.rs +++ b/ethcore/src/verification/canon_verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/mod.rs b/ethcore/src/verification/mod.rs index 55663052b..5dc28634c 100644 --- a/ethcore/src/verification/mod.rs +++ b/ethcore/src/verification/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/noop_verifier.rs b/ethcore/src/verification/noop_verifier.rs index 7db688a85..83ca11efd 100644 --- a/ethcore/src/verification/noop_verifier.rs +++ b/ethcore/src/verification/noop_verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/queue/kind.rs b/ethcore/src/verification/queue/kind.rs index 17b997490..5d4bb7451 100644 --- a/ethcore/src/verification/queue/kind.rs +++ b/ethcore/src/verification/queue/kind.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index 7e42e8881..661c40c96 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/verifier.rs b/ethcore/src/verification/verifier.rs index 05d488f95..f3cea1a78 100644 --- a/ethcore/src/verification/verifier.rs +++ b/ethcore/src/verification/verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/block.rs b/ethcore/src/views/block.rs index 97cf26441..ede5b1985 100644 --- a/ethcore/src/views/block.rs +++ b/ethcore/src/views/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/body.rs b/ethcore/src/views/body.rs index 989acd465..c6168f6d8 100644 --- a/ethcore/src/views/body.rs +++ b/ethcore/src/views/body.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/header.rs b/ethcore/src/views/header.rs index 6c3b14b15..e20d7f7c9 100644 --- a/ethcore/src/views/header.rs +++ b/ethcore/src/views/header.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/mod.rs b/ethcore/src/views/mod.rs index e8267e15a..d827f8fb0 100644 --- a/ethcore/src/views/mod.rs +++ b/ethcore/src/views/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/transaction.rs b/ethcore/src/views/transaction.rs index df861d9fd..1256d98d5 100644 --- a/ethcore/src/views/transaction.rs +++ b/ethcore/src/views/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcrypto/src/lib.rs b/ethcrypto/src/lib.rs index c98d14027..4cb086365 100644 --- a/ethcrypto/src/lib.rs +++ b/ethcrypto/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/bin/ethkey.rs b/ethkey/src/bin/ethkey.rs index 778ae39c9..af301732b 100644 --- a/ethkey/src/bin/ethkey.rs +++ b/ethkey/src/bin/ethkey.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/bin/main.rs b/ethkey/src/bin/main.rs index 7c7512a97..ac795b335 100644 --- a/ethkey/src/bin/main.rs +++ b/ethkey/src/bin/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/brain.rs b/ethkey/src/brain.rs index dd8913c66..2db460812 100644 --- a/ethkey/src/brain.rs +++ b/ethkey/src/brain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/error.rs b/ethkey/src/error.rs index 2597e8827..530ffe0f1 100644 --- a/ethkey/src/error.rs +++ b/ethkey/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/keccak.rs b/ethkey/src/keccak.rs index 18b31a868..8e8e5fb8f 100644 --- a/ethkey/src/keccak.rs +++ b/ethkey/src/keccak.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/keypair.rs b/ethkey/src/keypair.rs index fa7c1a85e..2b9c1a204 100644 --- a/ethkey/src/keypair.rs +++ b/ethkey/src/keypair.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/lib.rs b/ethkey/src/lib.rs index 1f345b2ff..79faf0ef9 100644 --- a/ethkey/src/lib.rs +++ b/ethkey/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/prefix.rs b/ethkey/src/prefix.rs index ad5e02c4a..59e64abda 100644 --- a/ethkey/src/prefix.rs +++ b/ethkey/src/prefix.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/random.rs b/ethkey/src/random.rs index ea4cdaec6..8b0c98c64 100644 --- a/ethkey/src/random.rs +++ b/ethkey/src/random.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/signature.rs b/ethkey/src/signature.rs index e1afb3940..97a2e0715 100644 --- a/ethkey/src/signature.rs +++ b/ethkey/src/signature.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/build.rs b/ethstore/build.rs index 65606cab9..d0aeb8837 100644 --- a/ethstore/build.rs +++ b/ethstore/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/cipher.rs b/ethstore/src/account/cipher.rs index 1b9d49b26..c6688252d 100644 --- a/ethstore/src/account/cipher.rs +++ b/ethstore/src/account/cipher.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/kdf.rs b/ethstore/src/account/kdf.rs index 0cabce625..3fa0a8f8a 100644 --- a/ethstore/src/account/kdf.rs +++ b/ethstore/src/account/kdf.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/mod.rs b/ethstore/src/account/mod.rs index b4c3e1113..9e3b927ed 100644 --- a/ethstore/src/account/mod.rs +++ b/ethstore/src/account/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/safe_account.rs b/ethstore/src/account/safe_account.rs index 336e72875..133e6eeac 100644 --- a/ethstore/src/account/safe_account.rs +++ b/ethstore/src/account/safe_account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/version.rs b/ethstore/src/account/version.rs index 465ce4e1b..a6a48bbe4 100644 --- a/ethstore/src/account/version.rs +++ b/ethstore/src/account/version.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/bin/ethstore.rs b/ethstore/src/bin/ethstore.rs index 9d499723b..954be2aa9 100644 --- a/ethstore/src/bin/ethstore.rs +++ b/ethstore/src/bin/ethstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/bin/main.rs b/ethstore/src/bin/main.rs index eee1fa39c..e33fc1c23 100644 --- a/ethstore/src/bin/main.rs +++ b/ethstore/src/bin/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/dir/disk.rs b/ethstore/src/dir/disk.rs index c86123d1a..80e95fb66 100644 --- a/ethstore/src/dir/disk.rs +++ b/ethstore/src/dir/disk.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/dir/geth.rs b/ethstore/src/dir/geth.rs index f63ebbea2..40c3d938a 100644 --- a/ethstore/src/dir/geth.rs +++ b/ethstore/src/dir/geth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/dir/mod.rs b/ethstore/src/dir/mod.rs index e29bd1ec4..8f5a8a7ad 100644 --- a/ethstore/src/dir/mod.rs +++ b/ethstore/src/dir/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/dir/parity.rs b/ethstore/src/dir/parity.rs index 7aa50c80b..8c5e9c2d6 100644 --- a/ethstore/src/dir/parity.rs +++ b/ethstore/src/dir/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/error.rs b/ethstore/src/error.rs index cee689b24..8c77e7a7f 100644 --- a/ethstore/src/error.rs +++ b/ethstore/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/ethkey.rs b/ethstore/src/ethkey.rs index 9d8858b79..d635d34a0 100644 --- a/ethstore/src/ethkey.rs +++ b/ethstore/src/ethkey.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/ethstore.rs b/ethstore/src/ethstore.rs index 3747431fb..ec1f82626 100644 --- a/ethstore/src/ethstore.rs +++ b/ethstore/src/ethstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/import.rs b/ethstore/src/import.rs index 63cc93111..b112bce75 100644 --- a/ethstore/src/import.rs +++ b/ethstore/src/import.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/cipher.rs b/ethstore/src/json/cipher.rs index 119024437..05628cded 100644 --- a/ethstore/src/json/cipher.rs +++ b/ethstore/src/json/cipher.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/crypto.rs b/ethstore/src/json/crypto.rs index 739a2fea9..99ef026b3 100644 --- a/ethstore/src/json/crypto.rs +++ b/ethstore/src/json/crypto.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/error.rs b/ethstore/src/json/error.rs index a3ea4d326..fdec03c50 100644 --- a/ethstore/src/json/error.rs +++ b/ethstore/src/json/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/hash.rs b/ethstore/src/json/hash.rs index 25bf51130..3496a034c 100644 --- a/ethstore/src/json/hash.rs +++ b/ethstore/src/json/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/id.rs b/ethstore/src/json/id.rs index 664716d95..cf098c83f 100644 --- a/ethstore/src/json/id.rs +++ b/ethstore/src/json/id.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/kdf.rs b/ethstore/src/json/kdf.rs index 676df1f95..af751ad33 100644 --- a/ethstore/src/json/kdf.rs +++ b/ethstore/src/json/kdf.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/key_file.rs b/ethstore/src/json/key_file.rs index 093479b3a..323086fa0 100644 --- a/ethstore/src/json/key_file.rs +++ b/ethstore/src/json/key_file.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/mod.rs b/ethstore/src/json/mod.rs index 208d474df..5a28a6932 100644 --- a/ethstore/src/json/mod.rs +++ b/ethstore/src/json/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/version.rs b/ethstore/src/json/version.rs index f394f61c2..be03795ed 100644 --- a/ethstore/src/json/version.rs +++ b/ethstore/src/json/version.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/lib.rs b/ethstore/src/lib.rs index f8619ff19..a55ad207a 100644 --- a/ethstore/src/lib.rs +++ b/ethstore/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/random.rs b/ethstore/src/random.rs index 954ec500f..6140f0fae 100644 --- a/ethstore/src/random.rs +++ b/ethstore/src/random.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/secret_store.rs b/ethstore/src/secret_store.rs index bf0a4ec44..2b3afb2ea 100644 --- a/ethstore/src/secret_store.rs +++ b/ethstore/src/secret_store.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/tests/api.rs b/ethstore/tests/api.rs index e1667607b..0b3e3ca23 100644 --- a/ethstore/tests/api.rs +++ b/ethstore/tests/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/tests/cli.rs b/ethstore/tests/cli.rs index d4ebdc448..50fed6b27 100644 --- a/ethstore/tests/cli.rs +++ b/ethstore/tests/cli.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/tests/util/mod.rs b/ethstore/tests/util/mod.rs index 73c47ee61..c1bad398d 100644 --- a/ethstore/tests/util/mod.rs +++ b/ethstore/tests/util/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/tests/util/transient_dir.rs b/ethstore/tests/util/transient_dir.rs index 23523e48c..839e9722d 100644 --- a/ethstore/tests/util/transient_dir.rs +++ b/ethstore/tests/util/transient_dir.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/evmbin/benches/mod.rs b/evmbin/benches/mod.rs index 3013dca54..424ed4815 100644 --- a/evmbin/benches/mod.rs +++ b/evmbin/benches/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/evmbin/src/ext.rs b/evmbin/src/ext.rs index cac89d76c..af0836ad0 100644 --- a/evmbin/src/ext.rs +++ b/evmbin/src/ext.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index aa9faa1da..8a08bd163 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/evmjit/src/lib.rs b/evmjit/src/lib.rs index d916906b6..16bb7ab0d 100644 --- a/evmjit/src/lib.rs +++ b/evmjit/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/build.rs b/ipc/codegen/build.rs index 82f990188..b81724774 100644 --- a/ipc/codegen/build.rs +++ b/ipc/codegen/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/src/lib.rs b/ipc/codegen/src/lib.rs index dc58c6a8a..caa0228fc 100644 --- a/ipc/codegen/src/lib.rs +++ b/ipc/codegen/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/src/lib.rs.in b/ipc/codegen/src/lib.rs.in index 169bd2a82..afd3f92c0 100644 --- a/ipc/codegen/src/lib.rs.in +++ b/ipc/codegen/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/hypervisor/build.rs b/ipc/hypervisor/build.rs index 391ac648d..57f929702 100644 --- a/ipc/hypervisor/build.rs +++ b/ipc/hypervisor/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/hypervisor/src/lib.rs b/ipc/hypervisor/src/lib.rs index c7543ca91..0900c7410 100644 --- a/ipc/hypervisor/src/lib.rs +++ b/ipc/hypervisor/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/hypervisor/src/service.rs b/ipc/hypervisor/src/service.rs index ffc83dc7c..b19c581a0 100644 --- a/ipc/hypervisor/src/service.rs +++ b/ipc/hypervisor/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/hypervisor/src/service.rs.in b/ipc/hypervisor/src/service.rs.in index e80a1ec30..2f3a1ebac 100644 --- a/ipc/hypervisor/src/service.rs.in +++ b/ipc/hypervisor/src/service.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/nano/src/lib.rs b/ipc/nano/src/lib.rs index 1157e75d3..ce40183e9 100644 --- a/ipc/nano/src/lib.rs +++ b/ipc/nano/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/rpc/src/interface.rs b/ipc/rpc/src/interface.rs index a3c170c2b..5e2718a77 100644 --- a/ipc/rpc/src/interface.rs +++ b/ipc/rpc/src/interface.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/rpc/src/lib.rs b/ipc/rpc/src/lib.rs index a78320343..c17acff98 100644 --- a/ipc/rpc/src/lib.rs +++ b/ipc/rpc/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/binary.rs b/ipc/tests/binary.rs index c8d100c6e..3d9d454e0 100644 --- a/ipc/tests/binary.rs +++ b/ipc/tests/binary.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/binary.rs.in b/ipc/tests/binary.rs.in index 1498a45e0..34e33609f 100644 --- a/ipc/tests/binary.rs.in +++ b/ipc/tests/binary.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/build.rs b/ipc/tests/build.rs index 688d139be..a62815e72 100644 --- a/ipc/tests/build.rs +++ b/ipc/tests/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/examples.rs b/ipc/tests/examples.rs index a27c0637a..b635b012c 100644 --- a/ipc/tests/examples.rs +++ b/ipc/tests/examples.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/nested.rs b/ipc/tests/nested.rs index 6e6e3942f..c8116c4e7 100644 --- a/ipc/tests/nested.rs +++ b/ipc/tests/nested.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/nested.rs.in b/ipc/tests/nested.rs.in index df0c9bde3..a12371ecf 100644 --- a/ipc/tests/nested.rs.in +++ b/ipc/tests/nested.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/over_nano.rs b/ipc/tests/over_nano.rs index bdeaec3d5..9dbf2454e 100644 --- a/ipc/tests/over_nano.rs +++ b/ipc/tests/over_nano.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/run.rs b/ipc/tests/run.rs index 522f566cf..369f8f4b1 100644 --- a/ipc/tests/run.rs +++ b/ipc/tests/run.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/service.rs b/ipc/tests/service.rs index 3d5159a9b..8b8b27c14 100644 --- a/ipc/tests/service.rs +++ b/ipc/tests/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/service.rs.in b/ipc/tests/service.rs.in index cd9a5a6b2..9bfe93cb3 100644 --- a/ipc/tests/service.rs.in +++ b/ipc/tests/service.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/with_attrs.rs b/ipc/tests/with_attrs.rs index bda734368..0a48f1cd9 100644 --- a/ipc/tests/with_attrs.rs +++ b/ipc/tests/with_attrs.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/with_attrs.rs.in b/ipc/tests/with_attrs.rs.in index f65627fce..afaa4a138 100644 --- a/ipc/tests/with_attrs.rs.in +++ b/ipc/tests/with_attrs.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/build.rs b/js/build.rs index 82bf1ac93..570864512 100644 --- a/js/build.rs +++ b/js/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/abi.js b/js/src/abi/abi.js index cdf3b1f63..457f5e416 100644 --- a/js/src/abi/abi.js +++ b/js/src/abi/abi.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/bytesTaken.js b/js/src/abi/decoder/bytesTaken.js index 49b443d21..5a32ca523 100644 --- a/js/src/abi/decoder/bytesTaken.js +++ b/js/src/abi/decoder/bytesTaken.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/bytesTaken.spec.js b/js/src/abi/decoder/bytesTaken.spec.js index 65bb9e1b6..a5e078d7e 100644 --- a/js/src/abi/decoder/bytesTaken.spec.js +++ b/js/src/abi/decoder/bytesTaken.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/decodeResult.js b/js/src/abi/decoder/decodeResult.js index 8595642df..3fe455f61 100644 --- a/js/src/abi/decoder/decodeResult.js +++ b/js/src/abi/decoder/decodeResult.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/decodeResult.spec.js b/js/src/abi/decoder/decodeResult.spec.js index 892836d07..c30928d4d 100644 --- a/js/src/abi/decoder/decodeResult.spec.js +++ b/js/src/abi/decoder/decodeResult.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/decoder.js b/js/src/abi/decoder/decoder.js index 0d2183122..c1cac6034 100644 --- a/js/src/abi/decoder/decoder.js +++ b/js/src/abi/decoder/decoder.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/index.js b/js/src/abi/decoder/index.js index f9839c10d..123acf28f 100644 --- a/js/src/abi/decoder/index.js +++ b/js/src/abi/decoder/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/encoder.js b/js/src/abi/encoder/encoder.js index bb3a17d26..8634b9511 100644 --- a/js/src/abi/encoder/encoder.js +++ b/js/src/abi/encoder/encoder.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/index.js b/js/src/abi/encoder/index.js index e19ff81e6..d98637f04 100644 --- a/js/src/abi/encoder/index.js +++ b/js/src/abi/encoder/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/mediate.js b/js/src/abi/encoder/mediate.js index cb7fce6a7..b41f7b1df 100644 --- a/js/src/abi/encoder/mediate.js +++ b/js/src/abi/encoder/mediate.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/mediate.spec.js b/js/src/abi/encoder/mediate.spec.js index cfd0211f2..89783607f 100644 --- a/js/src/abi/encoder/mediate.spec.js +++ b/js/src/abi/encoder/mediate.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/index.js b/js/src/abi/index.js index f055a6913..a7658dbe6 100644 --- a/js/src/abi/index.js +++ b/js/src/abi/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/constructor.js b/js/src/abi/spec/constructor.js index 89ea99610..a75e627f7 100644 --- a/js/src/abi/spec/constructor.js +++ b/js/src/abi/spec/constructor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/constructor.spec.js b/js/src/abi/spec/constructor.spec.js index e02f6cf71..80f3efe90 100644 --- a/js/src/abi/spec/constructor.spec.js +++ b/js/src/abi/spec/constructor.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/function.js b/js/src/abi/spec/function.js index 0c91a9b6f..68a6ca342 100644 --- a/js/src/abi/spec/function.js +++ b/js/src/abi/spec/function.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/function.spec.js b/js/src/abi/spec/function.spec.js index 1650bd314..6ad755d70 100644 --- a/js/src/abi/spec/function.spec.js +++ b/js/src/abi/spec/function.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/index.js b/js/src/abi/spec/index.js index 89354d49b..5855a888a 100644 --- a/js/src/abi/spec/index.js +++ b/js/src/abi/spec/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/interface.js b/js/src/abi/spec/interface.js index 1ea32e9a9..9116f5ca3 100644 --- a/js/src/abi/spec/interface.js +++ b/js/src/abi/spec/interface.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/interface.spec.js b/js/src/abi/spec/interface.spec.js index ba5c38a28..8dda460d8 100644 --- a/js/src/abi/spec/interface.spec.js +++ b/js/src/abi/spec/interface.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/param.js b/js/src/abi/spec/param.js index 95c3b9d18..88696ceed 100644 --- a/js/src/abi/spec/param.js +++ b/js/src/abi/spec/param.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/param.spec.js b/js/src/abi/spec/param.spec.js index bd172e4a6..9957df909 100644 --- a/js/src/abi/spec/param.spec.js +++ b/js/src/abi/spec/param.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/token/index.js b/js/src/abi/token/index.js index 4b822b4bd..50ef7b227 100644 --- a/js/src/abi/token/index.js +++ b/js/src/abi/token/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/token/token.js b/js/src/abi/token/token.js index 84c675ee6..1d8bc6c8a 100644 --- a/js/src/abi/token/token.js +++ b/js/src/abi/token/token.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/token/token.spec.js b/js/src/abi/token/token.spec.js index 2abaad6ac..da4ba15ee 100644 --- a/js/src/abi/token/token.spec.js +++ b/js/src/abi/token/token.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/address.js b/js/src/abi/util/address.js index f0e188f2c..a961e7035 100644 --- a/js/src/abi/util/address.js +++ b/js/src/abi/util/address.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/address.spec.js b/js/src/abi/util/address.spec.js index 9b0ec38cb..6048d2294 100644 --- a/js/src/abi/util/address.spec.js +++ b/js/src/abi/util/address.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/pad.js b/js/src/abi/util/pad.js index 5a6751a4f..ce8777974 100644 --- a/js/src/abi/util/pad.js +++ b/js/src/abi/util/pad.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/pad.spec.js b/js/src/abi/util/pad.spec.js index 96c733682..578083b6f 100644 --- a/js/src/abi/util/pad.spec.js +++ b/js/src/abi/util/pad.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/signature.js b/js/src/abi/util/signature.js index 10aedf13f..f192e576b 100644 --- a/js/src/abi/util/signature.js +++ b/js/src/abi/util/signature.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/signature.spec.js b/js/src/abi/util/signature.spec.js index 61664b8fc..144c1c7aa 100644 --- a/js/src/abi/util/signature.spec.js +++ b/js/src/abi/util/signature.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/slice.js b/js/src/abi/util/slice.js index f4bdf38e2..00c9c1b35 100644 --- a/js/src/abi/util/slice.js +++ b/js/src/abi/util/slice.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/slice.spec.js b/js/src/abi/util/slice.spec.js index d653c6901..330e570c4 100644 --- a/js/src/abi/util/slice.spec.js +++ b/js/src/abi/util/slice.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/sliceAs.js b/js/src/abi/util/sliceAs.js index 47c3e9758..bec5ea87f 100644 --- a/js/src/abi/util/sliceAs.js +++ b/js/src/abi/util/sliceAs.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/sliceAs.spec.js b/js/src/abi/util/sliceAs.spec.js index af6886008..9ad4cf831 100644 --- a/js/src/abi/util/sliceAs.spec.js +++ b/js/src/abi/util/sliceAs.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/types.js b/js/src/abi/util/types.js index 649f26db6..d18357f5d 100644 --- a/js/src/abi/util/types.js +++ b/js/src/abi/util/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/types.spec.js b/js/src/abi/util/types.spec.js index 2e1a538a6..3a82d7fa1 100644 --- a/js/src/abi/util/types.spec.js +++ b/js/src/abi/util/types.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/api.js b/js/src/api/api.js index 75d4392d0..9e0ad11b8 100644 --- a/js/src/api/api.js +++ b/js/src/api/api.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/api.spec.js b/js/src/api/api.spec.js index 16831ea66..1cad5b530 100644 --- a/js/src/api/api.spec.js +++ b/js/src/api/api.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/contract/index.js b/js/src/api/contract/index.js index 18051a69f..3ab8765b0 100644 --- a/js/src/api/contract/index.js +++ b/js/src/api/contract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/format/input.js b/js/src/api/format/input.js index 16fbd4d2e..4cbcbdce4 100644 --- a/js/src/api/format/input.js +++ b/js/src/api/format/input.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/format/input.spec.js b/js/src/api/format/input.spec.js index a22c8d131..27d200b93 100644 --- a/js/src/api/format/input.spec.js +++ b/js/src/api/format/input.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/format/output.js b/js/src/api/format/output.js index 1094cdb83..632ab6f28 100644 --- a/js/src/api/format/output.js +++ b/js/src/api/format/output.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/index.js b/js/src/api/index.js index b03419eac..49de88674 100644 --- a/js/src/api/index.js +++ b/js/src/api/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/index.js b/js/src/api/rpc/index.js index 7961da81c..d70f30544 100644 --- a/js/src/api/rpc/index.js +++ b/js/src/api/rpc/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/eth.js b/js/src/api/subscriptions/eth.js index 28d9cc6ff..f36d9dc73 100644 --- a/js/src/api/subscriptions/eth.js +++ b/js/src/api/subscriptions/eth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/eth.spec.js b/js/src/api/subscriptions/eth.spec.js index 24398483e..87cc76d03 100644 --- a/js/src/api/subscriptions/eth.spec.js +++ b/js/src/api/subscriptions/eth.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/index.js b/js/src/api/subscriptions/index.js index 3e627e62a..b94b33261 100644 --- a/js/src/api/subscriptions/index.js +++ b/js/src/api/subscriptions/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/logging.js b/js/src/api/subscriptions/logging.js index b03558207..e75710637 100644 --- a/js/src/api/subscriptions/logging.js +++ b/js/src/api/subscriptions/logging.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/logging.spec.js b/js/src/api/subscriptions/logging.spec.js index 2a1cabb46..4b28bf890 100644 --- a/js/src/api/subscriptions/logging.spec.js +++ b/js/src/api/subscriptions/logging.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/manager.js b/js/src/api/subscriptions/manager.js index 25e6e6129..6485a665c 100644 --- a/js/src/api/subscriptions/manager.js +++ b/js/src/api/subscriptions/manager.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/manager.spec.js b/js/src/api/subscriptions/manager.spec.js index 5e434efec..565944877 100644 --- a/js/src/api/subscriptions/manager.spec.js +++ b/js/src/api/subscriptions/manager.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/personal.js b/js/src/api/subscriptions/personal.js index 82671184e..e00169b6a 100644 --- a/js/src/api/subscriptions/personal.js +++ b/js/src/api/subscriptions/personal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/personal.spec.js b/js/src/api/subscriptions/personal.spec.js index d6fd2b203..c7d8da2b9 100644 --- a/js/src/api/subscriptions/personal.spec.js +++ b/js/src/api/subscriptions/personal.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/signer.js b/js/src/api/subscriptions/signer.js index 4413fe432..3fe32f4d6 100644 --- a/js/src/api/subscriptions/signer.js +++ b/js/src/api/subscriptions/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/error.js b/js/src/api/transport/error.js index 6cb0dac17..5fe9aac06 100644 --- a/js/src/api/transport/error.js +++ b/js/src/api/transport/error.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/index.js b/js/src/api/transport/index.js index 84fbac826..41b809525 100644 --- a/js/src/api/transport/index.js +++ b/js/src/api/transport/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/jsonRpcBase.js b/js/src/api/transport/jsonRpcBase.js index dc2f9bc8e..76f380935 100644 --- a/js/src/api/transport/jsonRpcBase.js +++ b/js/src/api/transport/jsonRpcBase.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/jsonRpcBase.spec.js b/js/src/api/transport/jsonRpcBase.spec.js index 78fc6549c..a27bca019 100644 --- a/js/src/api/transport/jsonRpcBase.spec.js +++ b/js/src/api/transport/jsonRpcBase.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/decode.js b/js/src/api/util/decode.js index 2d6eee75b..a6a2ddda4 100644 --- a/js/src/api/util/decode.js +++ b/js/src/api/util/decode.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/decode.spec.js b/js/src/api/util/decode.spec.js index 70bc44bc5..4652c7c5b 100644 --- a/js/src/api/util/decode.spec.js +++ b/js/src/api/util/decode.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/format.js b/js/src/api/util/format.js index d8cf74a8f..531dfc549 100644 --- a/js/src/api/util/format.js +++ b/js/src/api/util/format.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/format.spec.js b/js/src/api/util/format.spec.js index c779d71ef..cfb07dee7 100644 --- a/js/src/api/util/format.spec.js +++ b/js/src/api/util/format.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/index.js b/js/src/api/util/index.js index 2058cd011..e33bb9273 100644 --- a/js/src/api/util/index.js +++ b/js/src/api/util/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/sha3.js b/js/src/api/util/sha3.js index fcbda091a..93b01d8dd 100644 --- a/js/src/api/util/sha3.js +++ b/js/src/api/util/sha3.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/sha3.spec.js b/js/src/api/util/sha3.spec.js index bede8bd60..20cd0e7d5 100644 --- a/js/src/api/util/sha3.spec.js +++ b/js/src/api/util/sha3.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/types.js b/js/src/api/util/types.js index a34f30649..6fe442e93 100644 --- a/js/src/api/util/types.js +++ b/js/src/api/util/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/types.spec.js b/js/src/api/util/types.spec.js index 252876be3..df9bf2f1f 100644 --- a/js/src/api/util/types.spec.js +++ b/js/src/api/util/types.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/wei.js b/js/src/api/util/wei.js index d04e73921..43cba7643 100644 --- a/js/src/api/util/wei.js +++ b/js/src/api/util/wei.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/wei.spec.js b/js/src/api/util/wei.spec.js index 8d0b1f09c..b5ab91e72 100644 --- a/js/src/api/util/wei.spec.js +++ b/js/src/api/util/wei.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/abi/index.js b/js/src/contracts/abi/index.js index f15765b1a..35f96b924 100644 --- a/js/src/contracts/abi/index.js +++ b/js/src/contracts/abi/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/badgereg.js b/js/src/contracts/badgereg.js index 45760b277..6cf3d8bc9 100644 --- a/js/src/contracts/badgereg.js +++ b/js/src/contracts/badgereg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/code/index.js b/js/src/contracts/code/index.js index ff6d218eb..4ebc53d69 100644 --- a/js/src/contracts/code/index.js +++ b/js/src/contracts/code/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/dappreg.js b/js/src/contracts/dappreg.js index ae982af56..b9ee15764 100644 --- a/js/src/contracts/dappreg.js +++ b/js/src/contracts/dappreg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/githubhint.js b/js/src/contracts/githubhint.js index 47d7eca6e..0ccaf01f6 100644 --- a/js/src/contracts/githubhint.js +++ b/js/src/contracts/githubhint.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/index.js b/js/src/contracts/index.js index 075837ce6..ccf6cf5f1 100644 --- a/js/src/contracts/index.js +++ b/js/src/contracts/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/registry.js b/js/src/contracts/registry.js index 9354a59e5..04c562f50 100644 --- a/js/src/contracts/registry.js +++ b/js/src/contracts/registry.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/signaturereg.js b/js/src/contracts/signaturereg.js index 459f165b1..905530cbf 100644 --- a/js/src/contracts/signaturereg.js +++ b/js/src/contracts/signaturereg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/sms-verification.js b/js/src/contracts/sms-verification.js index 34a6bad76..05b7ea35f 100644 --- a/js/src/contracts/sms-verification.js +++ b/js/src/contracts/sms-verification.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/tokenreg.js b/js/src/contracts/tokenreg.js index 5e317880b..6c2ce66fc 100644 --- a/js/src/contracts/tokenreg.js +++ b/js/src/contracts/tokenreg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin.js b/js/src/dapps/basiccoin.js index eb3213c79..6cbf2a4b2 100644 --- a/js/src/dapps/basiccoin.js +++ b/js/src/dapps/basiccoin.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/parity.js b/js/src/dapps/basiccoin/parity.js index f6d59f44d..450ac31b1 100644 --- a/js/src/dapps/basiccoin/parity.js +++ b/js/src/dapps/basiccoin/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/services.js b/js/src/dapps/basiccoin/services.js index f76b7fb61..f87259f30 100644 --- a/js/src/dapps/basiccoin/services.js +++ b/js/src/dapps/basiccoin/services.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg.js b/js/src/dapps/dappreg.js index 9bd96f1a7..7adfaf1b3 100644 --- a/js/src/dapps/dappreg.js +++ b/js/src/dapps/dappreg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/modalStore.js b/js/src/dapps/dappreg/modalStore.js index 374011fc3..8d78c9ef9 100644 --- a/js/src/dapps/dappreg/modalStore.js +++ b/js/src/dapps/dappreg/modalStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/parity.js b/js/src/dapps/dappreg/parity.js index fe8de6e97..a4651214a 100644 --- a/js/src/dapps/dappreg/parity.js +++ b/js/src/dapps/dappreg/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint.js b/js/src/dapps/githubhint.js index ab807a44b..ea7d7b558 100644 --- a/js/src/dapps/githubhint.js +++ b/js/src/dapps/githubhint.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/parity.js b/js/src/dapps/githubhint/parity.js index acee4dee0..df80b13b3 100644 --- a/js/src/dapps/githubhint/parity.js +++ b/js/src/dapps/githubhint/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/services.js b/js/src/dapps/githubhint/services.js index fc889b7f6..ed143968f 100644 --- a/js/src/dapps/githubhint/services.js +++ b/js/src/dapps/githubhint/services.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/index.js b/js/src/dapps/index.js index 9cba69701..584fbb319 100644 --- a/js/src/dapps/index.js +++ b/js/src/dapps/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx.js b/js/src/dapps/localtx.js index 3e848ede9..5525e1a9f 100644 --- a/js/src/dapps/localtx.js +++ b/js/src/dapps/localtx.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/parity.js b/js/src/dapps/localtx/parity.js index acee4dee0..df80b13b3 100644 --- a/js/src/dapps/localtx/parity.js +++ b/js/src/dapps/localtx/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry.js b/js/src/dapps/registry.js index d132da3d8..0b8a8be55 100644 --- a/js/src/dapps/registry.js +++ b/js/src/dapps/registry.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Container.js b/js/src/dapps/registry/Container.js index e379038fa..2de041126 100644 --- a/js/src/dapps/registry/Container.js +++ b/js/src/dapps/registry/Container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/actions.js b/js/src/dapps/registry/actions.js index dd6652d76..0526802b9 100644 --- a/js/src/dapps/registry/actions.js +++ b/js/src/dapps/registry/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/parity.js b/js/src/dapps/registry/parity.js index cf9819b60..739e9d4f2 100644 --- a/js/src/dapps/registry/parity.js +++ b/js/src/dapps/registry/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/reducers.js b/js/src/dapps/registry/reducers.js index e0f620b70..06b8f024b 100644 --- a/js/src/dapps/registry/reducers.js +++ b/js/src/dapps/registry/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/store.js b/js/src/dapps/registry/store.js index 5fb7d4b6a..94117fbf4 100644 --- a/js/src/dapps/registry/store.js +++ b/js/src/dapps/registry/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg.js b/js/src/dapps/signaturereg.js index d0d0cd423..dd6087815 100644 --- a/js/src/dapps/signaturereg.js +++ b/js/src/dapps/signaturereg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/format.js b/js/src/dapps/signaturereg/format.js index 24b6428f4..6e28a61a4 100644 --- a/js/src/dapps/signaturereg/format.js +++ b/js/src/dapps/signaturereg/format.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/parity.js b/js/src/dapps/signaturereg/parity.js index f6d59f44d..450ac31b1 100644 --- a/js/src/dapps/signaturereg/parity.js +++ b/js/src/dapps/signaturereg/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/services.js b/js/src/dapps/signaturereg/services.js index 82dba383b..cd0fd59c7 100644 --- a/js/src/dapps/signaturereg/services.js +++ b/js/src/dapps/signaturereg/services.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg.js b/js/src/dapps/tokenreg.js index 1bc76e123..c359dd072 100644 --- a/js/src/dapps/tokenreg.js +++ b/js/src/dapps/tokenreg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Container.js b/js/src/dapps/tokenreg/Container.js index 9a8d7c636..00f726cf9 100644 --- a/js/src/dapps/tokenreg/Container.js +++ b/js/src/dapps/tokenreg/Container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/constants.js b/js/src/dapps/tokenreg/constants.js index e9e7bebca..cc4d38fcb 100644 --- a/js/src/dapps/tokenreg/constants.js +++ b/js/src/dapps/tokenreg/constants.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/parity.js b/js/src/dapps/tokenreg/parity.js index f6d59f44d..450ac31b1 100644 --- a/js/src/dapps/tokenreg/parity.js +++ b/js/src/dapps/tokenreg/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/reducers.js b/js/src/dapps/tokenreg/reducers.js index cf533432f..e2ea73e39 100644 --- a/js/src/dapps/tokenreg/reducers.js +++ b/js/src/dapps/tokenreg/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/store.js b/js/src/dapps/tokenreg/store.js index 5fb7d4b6a..94117fbf4 100644 --- a/js/src/dapps/tokenreg/store.js +++ b/js/src/dapps/tokenreg/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/utils.js b/js/src/dapps/tokenreg/utils.js index f156b78dd..6461998f3 100644 --- a/js/src/dapps/tokenreg/utils.js +++ b/js/src/dapps/tokenreg/utils.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/index.js b/js/src/environment/index.js index 9b95bb0da..276811982 100644 --- a/js/src/environment/index.js +++ b/js/src/environment/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/integration-tests/fake-backend.js b/js/src/environment/integration-tests/fake-backend.js index 16fcae3ad..3c71edaaf 100644 --- a/js/src/environment/integration-tests/fake-backend.js +++ b/js/src/environment/integration-tests/fake-backend.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/integration-tests/index.js b/js/src/environment/integration-tests/index.js index d62acaa32..d8f503621 100644 --- a/js/src/environment/integration-tests/index.js +++ b/js/src/environment/integration-tests/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/perf-debug/index.js b/js/src/environment/perf-debug/index.js index 29f84f50f..6c9d70e6e 100644 --- a/js/src/environment/perf-debug/index.js +++ b/js/src/environment/perf-debug/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/perf-debug/why-update.js b/js/src/environment/perf-debug/why-update.js index 35eef2edc..602cf7bc0 100644 --- a/js/src/environment/perf-debug/why-update.js +++ b/js/src/environment/perf-debug/why-update.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/tests/index.js b/js/src/environment/tests/index.js index 3e6241fb1..0261a77bd 100644 --- a/js/src/environment/tests/index.js +++ b/js/src/environment/tests/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/tests/test-utils.js b/js/src/environment/tests/test-utils.js index 785a6f3ad..acf7ad7ab 100644 --- a/js/src/environment/tests/test-utils.js +++ b/js/src/environment/tests/test-utils.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/index.js b/js/src/index.js index 46d6c9c74..b90f9c61a 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/generator/build-json.js b/js/src/jsonrpc/generator/build-json.js index 362df7bf5..ddbd41c25 100644 --- a/js/src/jsonrpc/generator/build-json.js +++ b/js/src/jsonrpc/generator/build-json.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/generator/build-markdown.js b/js/src/jsonrpc/generator/build-markdown.js index 278138d54..101c8f3cf 100644 --- a/js/src/jsonrpc/generator/build-markdown.js +++ b/js/src/jsonrpc/generator/build-markdown.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/index.js b/js/src/jsonrpc/index.js index 9e9692279..2f234fea7 100644 --- a/js/src/jsonrpc/index.js +++ b/js/src/jsonrpc/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/index.spec.js b/js/src/jsonrpc/index.spec.js index 0f1247477..443cbf8bf 100644 --- a/js/src/jsonrpc/index.spec.js +++ b/js/src/jsonrpc/index.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/db.js b/js/src/jsonrpc/interfaces/db.js index ab4d35b34..557a73156 100644 --- a/js/src/jsonrpc/interfaces/db.js +++ b/js/src/jsonrpc/interfaces/db.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/net.js b/js/src/jsonrpc/interfaces/net.js index 9cc3bc076..ee8cd9069 100644 --- a/js/src/jsonrpc/interfaces/net.js +++ b/js/src/jsonrpc/interfaces/net.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/personal.js b/js/src/jsonrpc/interfaces/personal.js index eb7e5fc0f..945057084 100644 --- a/js/src/jsonrpc/interfaces/personal.js +++ b/js/src/jsonrpc/interfaces/personal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/shh.js b/js/src/jsonrpc/interfaces/shh.js index e9f727dac..b8d6ecfd1 100644 --- a/js/src/jsonrpc/interfaces/shh.js +++ b/js/src/jsonrpc/interfaces/shh.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/signer.js b/js/src/jsonrpc/interfaces/signer.js index f50bb1115..e4ffc1e03 100644 --- a/js/src/jsonrpc/interfaces/signer.js +++ b/js/src/jsonrpc/interfaces/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/trace.js b/js/src/jsonrpc/interfaces/trace.js index efe45f34e..38fa77d89 100644 --- a/js/src/jsonrpc/interfaces/trace.js +++ b/js/src/jsonrpc/interfaces/trace.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/web3.js b/js/src/jsonrpc/interfaces/web3.js index 783663716..af35ee218 100644 --- a/js/src/jsonrpc/interfaces/web3.js +++ b/js/src/jsonrpc/interfaces/web3.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/types.js b/js/src/jsonrpc/types.js index 026e010ed..86f528a34 100644 --- a/js/src/jsonrpc/types.js +++ b/js/src/jsonrpc/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/lib.rs b/js/src/lib.rs index 25d336fab..996d8db50 100644 --- a/js/src/lib.rs +++ b/js/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/lib.rs.in b/js/src/lib.rs.in index b3f09556a..ddbdec10b 100644 --- a/js/src/lib.rs.in +++ b/js/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/AddAddress/index.js b/js/src/modals/AddAddress/index.js index fb891f0fe..f873e3a9a 100644 --- a/js/src/modals/AddAddress/index.js +++ b/js/src/modals/AddAddress/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/AddContract/addContract.js b/js/src/modals/AddContract/addContract.js index b19398001..0d04438c3 100644 --- a/js/src/modals/AddContract/addContract.js +++ b/js/src/modals/AddContract/addContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/AddContract/index.js b/js/src/modals/AddContract/index.js index 05f53efd5..da84e291a 100644 --- a/js/src/modals/AddContract/index.js +++ b/js/src/modals/AddContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/index.js b/js/src/modals/CreateAccount/index.js index f75cecaac..a66124c9b 100644 --- a/js/src/modals/CreateAccount/index.js +++ b/js/src/modals/CreateAccount/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/print.js b/js/src/modals/CreateAccount/print.js index 18cddeee9..1f92744d4 100644 --- a/js/src/modals/CreateAccount/print.js +++ b/js/src/modals/CreateAccount/print.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/createWallet.js b/js/src/modals/CreateWallet/createWallet.js index d99ef05b4..c19d3303c 100644 --- a/js/src/modals/CreateWallet/createWallet.js +++ b/js/src/modals/CreateWallet/createWallet.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/createWalletStore.js b/js/src/modals/CreateWallet/createWalletStore.js index b28bfbd26..2a3f08a6b 100644 --- a/js/src/modals/CreateWallet/createWalletStore.js +++ b/js/src/modals/CreateWallet/createWalletStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/index.js b/js/src/modals/CreateWallet/index.js index 5779fb553..6421a806a 100644 --- a/js/src/modals/CreateWallet/index.js +++ b/js/src/modals/CreateWallet/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeleteAccount/deleteAccount.js b/js/src/modals/DeleteAccount/deleteAccount.js index 77f52f141..f5b988a8e 100644 --- a/js/src/modals/DeleteAccount/deleteAccount.js +++ b/js/src/modals/DeleteAccount/deleteAccount.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeleteAccount/index.js b/js/src/modals/DeleteAccount/index.js index 5738c2704..9140c1b37 100644 --- a/js/src/modals/DeleteAccount/index.js +++ b/js/src/modals/DeleteAccount/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/index.js b/js/src/modals/DeployContract/index.js index e982107ee..26ca7dcf0 100644 --- a/js/src/modals/DeployContract/index.js +++ b/js/src/modals/DeployContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/EditMeta/editMeta.js b/js/src/modals/EditMeta/editMeta.js index 8ab9233f1..8a6d98365 100644 --- a/js/src/modals/EditMeta/editMeta.js +++ b/js/src/modals/EditMeta/editMeta.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/EditMeta/index.js b/js/src/modals/EditMeta/index.js index 995b06b0e..98e3de8b5 100644 --- a/js/src/modals/EditMeta/index.js +++ b/js/src/modals/EditMeta/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/ExecuteContract/index.js b/js/src/modals/ExecuteContract/index.js index 58ae3e8de..58868d32c 100644 --- a/js/src/modals/ExecuteContract/index.js +++ b/js/src/modals/ExecuteContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/firstRun.js b/js/src/modals/FirstRun/firstRun.js index ee1a97a6e..a273d6e63 100644 --- a/js/src/modals/FirstRun/firstRun.js +++ b/js/src/modals/FirstRun/firstRun.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/index.js b/js/src/modals/FirstRun/index.js index 4dea9ba51..c732f39da 100644 --- a/js/src/modals/FirstRun/index.js +++ b/js/src/modals/FirstRun/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/LoadContract/index.js b/js/src/modals/LoadContract/index.js index be5e62af5..479eb2b52 100644 --- a/js/src/modals/LoadContract/index.js +++ b/js/src/modals/LoadContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/LoadContract/loadContract.js b/js/src/modals/LoadContract/loadContract.js index a2d1bdba2..4b70e595d 100644 --- a/js/src/modals/LoadContract/loadContract.js +++ b/js/src/modals/LoadContract/loadContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/PasswordManager/index.js b/js/src/modals/PasswordManager/index.js index 9676de163..8f5237ec2 100644 --- a/js/src/modals/PasswordManager/index.js +++ b/js/src/modals/PasswordManager/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SMSVerification.js b/js/src/modals/SMSVerification/SMSVerification.js index 86f027a52..f37c80330 100644 --- a/js/src/modals/SMSVerification/SMSVerification.js +++ b/js/src/modals/SMSVerification/SMSVerification.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/index.js b/js/src/modals/SMSVerification/index.js index d9b0990db..e26958f8c 100644 --- a/js/src/modals/SMSVerification/index.js +++ b/js/src/modals/SMSVerification/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/store.js b/js/src/modals/SMSVerification/store.js index 7a132aaf7..f97e84ade 100644 --- a/js/src/modals/SMSVerification/store.js +++ b/js/src/modals/SMSVerification/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SaveContract/index.js b/js/src/modals/SaveContract/index.js index 079300160..115d21bb3 100644 --- a/js/src/modals/SaveContract/index.js +++ b/js/src/modals/SaveContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SaveContract/saveContract.js b/js/src/modals/SaveContract/saveContract.js index 5d7863632..276a22577 100644 --- a/js/src/modals/SaveContract/saveContract.js +++ b/js/src/modals/SaveContract/saveContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/index.js b/js/src/modals/Shapeshift/index.js index 5ebced4b8..6b251bde2 100644 --- a/js/src/modals/Shapeshift/index.js +++ b/js/src/modals/Shapeshift/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/shapeshift.js b/js/src/modals/Shapeshift/shapeshift.js index 9c5d696b0..fc76a8968 100644 --- a/js/src/modals/Shapeshift/shapeshift.js +++ b/js/src/modals/Shapeshift/shapeshift.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/errors.js b/js/src/modals/Transfer/errors.js index b06e91b5d..12570dac5 100644 --- a/js/src/modals/Transfer/errors.js +++ b/js/src/modals/Transfer/errors.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/index.js b/js/src/modals/Transfer/index.js index 24d36d796..4a82b5b7d 100644 --- a/js/src/modals/Transfer/index.js +++ b/js/src/modals/Transfer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/WalletSettings/index.js b/js/src/modals/WalletSettings/index.js index 9b15a5f3b..9ef8eeafe 100644 --- a/js/src/modals/WalletSettings/index.js +++ b/js/src/modals/WalletSettings/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/WalletSettings/walletSettingsStore.js b/js/src/modals/WalletSettings/walletSettingsStore.js index f4d5d2275..6db4469c3 100644 --- a/js/src/modals/WalletSettings/walletSettingsStore.js +++ b/js/src/modals/WalletSettings/walletSettingsStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/index.js b/js/src/modals/index.js index 0f0844e40..d3574fdc7 100644 --- a/js/src/modals/index.js +++ b/js/src/modals/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/parity.js b/js/src/parity.js index 4e6184c6a..f74bc2a0c 100644 --- a/js/src/parity.js +++ b/js/src/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/actions.js b/js/src/redux/actions.js index 76b363796..0be511bd3 100644 --- a/js/src/redux/actions.js +++ b/js/src/redux/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/index.js b/js/src/redux/index.js index a23f60659..d02a22ace 100644 --- a/js/src/redux/index.js +++ b/js/src/redux/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/middleware.js b/js/src/redux/middleware.js index 14bc9b0a6..91e76c45d 100644 --- a/js/src/redux/middleware.js +++ b/js/src/redux/middleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/apiActions.js b/js/src/redux/providers/apiActions.js index 88e1fa848..9b6e56904 100644 --- a/js/src/redux/providers/apiActions.js +++ b/js/src/redux/providers/apiActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/apiReducer.js b/js/src/redux/providers/apiReducer.js index 2d4c96ecd..294072f58 100644 --- a/js/src/redux/providers/apiReducer.js +++ b/js/src/redux/providers/apiReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/balances.js b/js/src/redux/providers/balances.js index bce1c6077..2f08c7752 100644 --- a/js/src/redux/providers/balances.js +++ b/js/src/redux/providers/balances.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/balancesReducer.js b/js/src/redux/providers/balancesReducer.js index 4b6950498..52b9bcf1d 100644 --- a/js/src/redux/providers/balancesReducer.js +++ b/js/src/redux/providers/balancesReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/blockchainActions.js b/js/src/redux/providers/blockchainActions.js index 1dc1e076d..3b36a019f 100644 --- a/js/src/redux/providers/blockchainActions.js +++ b/js/src/redux/providers/blockchainActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/blockchainReducer.js b/js/src/redux/providers/blockchainReducer.js index 30c7507f1..dbcc00b99 100644 --- a/js/src/redux/providers/blockchainReducer.js +++ b/js/src/redux/providers/blockchainReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/compilerActions.js b/js/src/redux/providers/compilerActions.js index 2b764c58d..c3b3a9bdd 100644 --- a/js/src/redux/providers/compilerActions.js +++ b/js/src/redux/providers/compilerActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/compilerReducer.js b/js/src/redux/providers/compilerReducer.js index ea34f5319..7163ac7a5 100644 --- a/js/src/redux/providers/compilerReducer.js +++ b/js/src/redux/providers/compilerReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/compilerWorker.js b/js/src/redux/providers/compilerWorker.js index f624a4e5f..60a07355f 100644 --- a/js/src/redux/providers/compilerWorker.js +++ b/js/src/redux/providers/compilerWorker.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/imagesActions.js b/js/src/redux/providers/imagesActions.js index 8ef3c3b39..73e7c6908 100644 --- a/js/src/redux/providers/imagesActions.js +++ b/js/src/redux/providers/imagesActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/imagesReducer.js b/js/src/redux/providers/imagesReducer.js index 8738f7b0e..c3f04af44 100644 --- a/js/src/redux/providers/imagesReducer.js +++ b/js/src/redux/providers/imagesReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/index.js b/js/src/redux/providers/index.js index a90d8b62c..6a000bdac 100644 --- a/js/src/redux/providers/index.js +++ b/js/src/redux/providers/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/personal.js b/js/src/redux/providers/personal.js index 7629c4f46..5a19b1c7f 100644 --- a/js/src/redux/providers/personal.js +++ b/js/src/redux/providers/personal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/personalActions.js b/js/src/redux/providers/personalActions.js index 47056af2f..b172aaf8d 100644 --- a/js/src/redux/providers/personalActions.js +++ b/js/src/redux/providers/personalActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/personalReducer.js b/js/src/redux/providers/personalReducer.js index 7473ed8e3..19ee421f0 100644 --- a/js/src/redux/providers/personalReducer.js +++ b/js/src/redux/providers/personalReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/signer.js b/js/src/redux/providers/signer.js index 11b30c6b4..5a5edfb0b 100644 --- a/js/src/redux/providers/signer.js +++ b/js/src/redux/providers/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/signerActions.js b/js/src/redux/providers/signerActions.js index bd3c1022d..5684e8a93 100644 --- a/js/src/redux/providers/signerActions.js +++ b/js/src/redux/providers/signerActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/signerReducer.js b/js/src/redux/providers/signerReducer.js index 42e7b5f46..cc10b3fd1 100644 --- a/js/src/redux/providers/signerReducer.js +++ b/js/src/redux/providers/signerReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/snackbarActions.js b/js/src/redux/providers/snackbarActions.js index 428958c4c..0048854da 100644 --- a/js/src/redux/providers/snackbarActions.js +++ b/js/src/redux/providers/snackbarActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/snackbarReducer.js b/js/src/redux/providers/snackbarReducer.js index 7a913f8ca..2992eb0df 100644 --- a/js/src/redux/providers/snackbarReducer.js +++ b/js/src/redux/providers/snackbarReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/status.js b/js/src/redux/providers/status.js index 138479716..d7b360b14 100644 --- a/js/src/redux/providers/status.js +++ b/js/src/redux/providers/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/statusActions.js b/js/src/redux/providers/statusActions.js index 1c175c29d..ede16f7dd 100644 --- a/js/src/redux/providers/statusActions.js +++ b/js/src/redux/providers/statusActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/statusReducer.js b/js/src/redux/providers/statusReducer.js index 279a9da42..413ff3319 100644 --- a/js/src/redux/providers/statusReducer.js +++ b/js/src/redux/providers/statusReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/walletReducer.js b/js/src/redux/providers/walletReducer.js index af6e190bc..7cbd7adb8 100644 --- a/js/src/redux/providers/walletReducer.js +++ b/js/src/redux/providers/walletReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/reducers.js b/js/src/redux/reducers.js index 642dfe403..aac1ea779 100644 --- a/js/src/redux/reducers.js +++ b/js/src/redux/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/store.js b/js/src/redux/store.js index 1d62f9ea5..dc043e242 100644 --- a/js/src/redux/store.js +++ b/js/src/redux/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/util.js b/js/src/redux/util.js index 37cb4f0a3..0467ca5f1 100644 --- a/js/src/redux/util.js +++ b/js/src/redux/util.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/secureApi.js b/js/src/secureApi.js index 8243420b5..80e76720b 100644 --- a/js/src/secureApi.js +++ b/js/src/secureApi.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/actionbar.js b/js/src/ui/Actionbar/actionbar.js index f744f5c57..0141016ab 100644 --- a/js/src/ui/Actionbar/actionbar.js +++ b/js/src/ui/Actionbar/actionbar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/actionbar.spec.js b/js/src/ui/Actionbar/actionbar.spec.js index 818eb0f80..72df85cb2 100644 --- a/js/src/ui/Actionbar/actionbar.spec.js +++ b/js/src/ui/Actionbar/actionbar.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/index.js b/js/src/ui/Actionbar/index.js index 595544079..37d1dbd0b 100644 --- a/js/src/ui/Actionbar/index.js +++ b/js/src/ui/Actionbar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Badge/badge.js b/js/src/ui/Badge/badge.js index 1ffd4d83c..c4553fb2e 100644 --- a/js/src/ui/Badge/badge.js +++ b/js/src/ui/Badge/badge.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Badge/badge.spec.js b/js/src/ui/Badge/badge.spec.js index 8074a8688..02f3c6983 100644 --- a/js/src/ui/Badge/badge.spec.js +++ b/js/src/ui/Badge/badge.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Badge/index.js b/js/src/ui/Badge/index.js index 8dc0c9ef0..7fb3df213 100644 --- a/js/src/ui/Badge/index.js +++ b/js/src/ui/Badge/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Balance/balance.js b/js/src/ui/Balance/balance.js index bc98968ea..e4dced882 100644 --- a/js/src/ui/Balance/balance.js +++ b/js/src/ui/Balance/balance.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Balance/index.js b/js/src/ui/Balance/index.js index 24ed7c44e..e5064e21d 100644 --- a/js/src/ui/Balance/index.js +++ b/js/src/ui/Balance/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/BlockStatus/blockStatus.js b/js/src/ui/BlockStatus/blockStatus.js index 8abd5d656..df6f44a8c 100644 --- a/js/src/ui/BlockStatus/blockStatus.js +++ b/js/src/ui/BlockStatus/blockStatus.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/BlockStatus/index.js b/js/src/ui/BlockStatus/index.js index af5761fad..f9cb92f95 100644 --- a/js/src/ui/BlockStatus/index.js +++ b/js/src/ui/BlockStatus/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Button/button.js b/js/src/ui/Button/button.js index 6ae113fd4..d0a358bad 100644 --- a/js/src/ui/Button/button.js +++ b/js/src/ui/Button/button.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Button/button.spec.js b/js/src/ui/Button/button.spec.js index 9ae4ecdfc..101bb19ac 100644 --- a/js/src/ui/Button/button.spec.js +++ b/js/src/ui/Button/button.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Button/index.js b/js/src/ui/Button/index.js index f69a65e3d..95f33d38c 100644 --- a/js/src/ui/Button/index.js +++ b/js/src/ui/Button/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Certifications/certifications.js b/js/src/ui/Certifications/certifications.js index 871b14e9c..edf8be10a 100644 --- a/js/src/ui/Certifications/certifications.js +++ b/js/src/ui/Certifications/certifications.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Certifications/index.js b/js/src/ui/Certifications/index.js index 02719ee31..8335104c0 100644 --- a/js/src/ui/Certifications/index.js +++ b/js/src/ui/Certifications/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ConfirmDialog/confirmDialog.js b/js/src/ui/ConfirmDialog/confirmDialog.js index f1b8c6902..103c1562d 100644 --- a/js/src/ui/ConfirmDialog/confirmDialog.js +++ b/js/src/ui/ConfirmDialog/confirmDialog.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ConfirmDialog/index.js b/js/src/ui/ConfirmDialog/index.js index ea4074149..d88a0ac60 100644 --- a/js/src/ui/ConfirmDialog/index.js +++ b/js/src/ui/ConfirmDialog/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/container.js b/js/src/ui/Container/container.js index 8d30a3963..51a6a5daa 100644 --- a/js/src/ui/Container/container.js +++ b/js/src/ui/Container/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/container.spec.js b/js/src/ui/Container/container.spec.js index 9bbc9d20f..5e627999f 100644 --- a/js/src/ui/Container/container.spec.js +++ b/js/src/ui/Container/container.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/index.js b/js/src/ui/Container/index.js index 12d4155aa..063244114 100644 --- a/js/src/ui/Container/index.js +++ b/js/src/ui/Container/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/CopyToClipboard/copyToClipboard.js b/js/src/ui/CopyToClipboard/copyToClipboard.js index b7041658c..2afd59dde 100644 --- a/js/src/ui/CopyToClipboard/copyToClipboard.js +++ b/js/src/ui/CopyToClipboard/copyToClipboard.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/CopyToClipboard/index.js b/js/src/ui/CopyToClipboard/index.js index 6391b478b..523098ec0 100644 --- a/js/src/ui/CopyToClipboard/index.js +++ b/js/src/ui/CopyToClipboard/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Editor/editor.js b/js/src/ui/Editor/editor.js index d611276a3..55747a3db 100644 --- a/js/src/ui/Editor/editor.js +++ b/js/src/ui/Editor/editor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Editor/index.js b/js/src/ui/Editor/index.js index 2f49dbc95..00b62a7a0 100644 --- a/js/src/ui/Editor/index.js +++ b/js/src/ui/Editor/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/actions.js b/js/src/ui/Errors/actions.js index de401ccaa..c482c9ce4 100644 --- a/js/src/ui/Errors/actions.js +++ b/js/src/ui/Errors/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/errors.js b/js/src/ui/Errors/errors.js index 1e94f4f1d..b49dd0f4d 100644 --- a/js/src/ui/Errors/errors.js +++ b/js/src/ui/Errors/errors.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/index.js b/js/src/ui/Errors/index.js index 608f22a1d..1d63ca624 100644 --- a/js/src/ui/Errors/index.js +++ b/js/src/ui/Errors/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/middleware.js b/js/src/ui/Errors/middleware.js index da660b49e..1afe55c91 100644 --- a/js/src/ui/Errors/middleware.js +++ b/js/src/ui/Errors/middleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/reducers.js b/js/src/ui/Errors/reducers.js index ed4fcba34..e076905fc 100644 --- a/js/src/ui/Errors/reducers.js +++ b/js/src/ui/Errors/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/form.js b/js/src/ui/Form/form.js index c3cf2588b..3d3c7438a 100644 --- a/js/src/ui/Form/form.js +++ b/js/src/ui/Form/form.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/index.js b/js/src/ui/Form/index.js index 113f3424a..0f5e8d056 100644 --- a/js/src/ui/Form/index.js +++ b/js/src/ui/Form/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/index.js b/js/src/ui/GasPriceEditor/index.js index 956f6ffd2..eea046b51 100644 --- a/js/src/ui/GasPriceEditor/index.js +++ b/js/src/ui/GasPriceEditor/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityIcon/identityIcon.js b/js/src/ui/IdentityIcon/identityIcon.js index fa8d35e61..466ffa9b5 100644 --- a/js/src/ui/IdentityIcon/identityIcon.js +++ b/js/src/ui/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityIcon/index.js b/js/src/ui/IdentityIcon/index.js index 76c107bfb..90e9c1909 100644 --- a/js/src/ui/IdentityIcon/index.js +++ b/js/src/ui/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityName/identityName.js b/js/src/ui/IdentityName/identityName.js index 9da886ba0..0ad9075d6 100644 --- a/js/src/ui/IdentityName/identityName.js +++ b/js/src/ui/IdentityName/identityName.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityName/identityName.spec.js b/js/src/ui/IdentityName/identityName.spec.js index 554a5be0a..31bf3ee5f 100644 --- a/js/src/ui/IdentityName/identityName.spec.js +++ b/js/src/ui/IdentityName/identityName.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityName/index.js b/js/src/ui/IdentityName/index.js index 3774b0e52..15e1e5463 100644 --- a/js/src/ui/IdentityName/index.js +++ b/js/src/ui/IdentityName/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Loading/index.js b/js/src/ui/Loading/index.js index 0468cab37..55611075b 100644 --- a/js/src/ui/Loading/index.js +++ b/js/src/ui/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Loading/loading.js b/js/src/ui/Loading/loading.js index bdcc98df6..507c84bf9 100644 --- a/js/src/ui/Loading/loading.js +++ b/js/src/ui/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/MethodDecoding/index.js b/js/src/ui/MethodDecoding/index.js index 1606857ed..d4f99314c 100644 --- a/js/src/ui/MethodDecoding/index.js +++ b/js/src/ui/MethodDecoding/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/index.js b/js/src/ui/Modal/index.js index 232d94eb2..55e5cfc05 100644 --- a/js/src/ui/Modal/index.js +++ b/js/src/ui/Modal/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/modal.js b/js/src/ui/Modal/modal.js index 522684140..fd8e67aad 100644 --- a/js/src/ui/Modal/modal.js +++ b/js/src/ui/Modal/modal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Page/index.js b/js/src/ui/Page/index.js index 0ddc533d4..49b37e02e 100644 --- a/js/src/ui/Page/index.js +++ b/js/src/ui/Page/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Page/page.js b/js/src/ui/Page/page.js index 9646358b3..e8bb6fe03 100644 --- a/js/src/ui/Page/page.js +++ b/js/src/ui/Page/page.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ParityBackground/index.js b/js/src/ui/ParityBackground/index.js index 4c766ac3c..f497053de 100644 --- a/js/src/ui/ParityBackground/index.js +++ b/js/src/ui/ParityBackground/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ParityBackground/parityBackground.js b/js/src/ui/ParityBackground/parityBackground.js index 5198195c0..4bbfd4772 100644 --- a/js/src/ui/ParityBackground/parityBackground.js +++ b/js/src/ui/ParityBackground/parityBackground.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ShortenedHash/index.js b/js/src/ui/ShortenedHash/index.js index 4c9314386..495d1928c 100644 --- a/js/src/ui/ShortenedHash/index.js +++ b/js/src/ui/ShortenedHash/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ShortenedHash/shortenedHash.js b/js/src/ui/ShortenedHash/shortenedHash.js index e3d5c3b14..7008304f8 100644 --- a/js/src/ui/ShortenedHash/shortenedHash.js +++ b/js/src/ui/ShortenedHash/shortenedHash.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/SignerIcon/index.js b/js/src/ui/SignerIcon/index.js index 0a871e6b2..e1123e0d7 100644 --- a/js/src/ui/SignerIcon/index.js +++ b/js/src/ui/SignerIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/SignerIcon/signerIcon.js b/js/src/ui/SignerIcon/signerIcon.js index 6d7cd45e8..ca1ca43fa 100644 --- a/js/src/ui/SignerIcon/signerIcon.js +++ b/js/src/ui/SignerIcon/signerIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tags/index.js b/js/src/ui/Tags/index.js index 71cd49624..bbcb28bab 100644 --- a/js/src/ui/Tags/index.js +++ b/js/src/ui/Tags/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tags/tags.js b/js/src/ui/Tags/tags.js index b52050649..a0db6fc6a 100644 --- a/js/src/ui/Tags/tags.js +++ b/js/src/ui/Tags/tags.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Theme/index.js b/js/src/ui/Theme/index.js index ba15b212b..cbf312df5 100644 --- a/js/src/ui/Theme/index.js +++ b/js/src/ui/Theme/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Theme/theme.js b/js/src/ui/Theme/theme.js index 7b891d721..323413d31 100644 --- a/js/src/ui/Theme/theme.js +++ b/js/src/ui/Theme/theme.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Theme/theme.spec.js b/js/src/ui/Theme/theme.spec.js index 9d2aa1bd8..6e0387ae3 100644 --- a/js/src/ui/Theme/theme.spec.js +++ b/js/src/ui/Theme/theme.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/actions.js b/js/src/ui/Tooltips/actions.js index fba250fd7..8f97ae3f8 100644 --- a/js/src/ui/Tooltips/actions.js +++ b/js/src/ui/Tooltips/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/index.js b/js/src/ui/Tooltips/index.js index 6edea3a32..e6590884d 100644 --- a/js/src/ui/Tooltips/index.js +++ b/js/src/ui/Tooltips/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/reducers.js b/js/src/ui/Tooltips/reducers.js index 4a1d2619b..cc0ebf926 100644 --- a/js/src/ui/Tooltips/reducers.js +++ b/js/src/ui/Tooltips/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/tooltips.js b/js/src/ui/Tooltips/tooltips.js index 9a565c26d..1fdc15486 100644 --- a/js/src/ui/Tooltips/tooltips.js +++ b/js/src/ui/Tooltips/tooltips.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxHash/index.js b/js/src/ui/TxHash/index.js index eddcbfcbf..b52429f1f 100644 --- a/js/src/ui/TxHash/index.js +++ b/js/src/ui/TxHash/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxHash/txHash.js b/js/src/ui/TxHash/txHash.js index 715568fd9..fcbe374e1 100644 --- a/js/src/ui/TxHash/txHash.js +++ b/js/src/ui/TxHash/txHash.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/index.js b/js/src/ui/TxList/index.js index 820d4b3aa..a0ded6a43 100644 --- a/js/src/ui/TxList/index.js +++ b/js/src/ui/TxList/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/store.js b/js/src/ui/TxList/store.js index 09cdd2226..a12c810d5 100644 --- a/js/src/ui/TxList/store.js +++ b/js/src/ui/TxList/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/store.spec.js b/js/src/ui/TxList/store.spec.js index 8e4eb848e..89503b4a6 100644 --- a/js/src/ui/TxList/store.spec.js +++ b/js/src/ui/TxList/store.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/txList.js b/js/src/ui/TxList/txList.js index 45face696..b99335a4f 100644 --- a/js/src/ui/TxList/txList.js +++ b/js/src/ui/TxList/txList.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/txList.spec.js b/js/src/ui/TxList/txList.spec.js index 3f773980f..88012888c 100644 --- a/js/src/ui/TxList/txList.spec.js +++ b/js/src/ui/TxList/txList.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/abi.js b/js/src/util/abi.js index e7947233b..b20ed3372 100644 --- a/js/src/util/abi.js +++ b/js/src/util/abi.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/constants.js b/js/src/util/constants.js index d0664d25e..4e2a073f1 100644 --- a/js/src/util/constants.js +++ b/js/src/util/constants.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/notifications.js b/js/src/util/notifications.js index 479448234..488ac2daf 100644 --- a/js/src/util/notifications.js +++ b/js/src/util/notifications.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/proptypes.js b/js/src/util/proptypes.js index f322c629c..1f993768e 100644 --- a/js/src/util/proptypes.js +++ b/js/src/util/proptypes.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/subscribe-to-event.js b/js/src/util/subscribe-to-event.js index 3313404c5..36d1f6d55 100644 --- a/js/src/util/subscribe-to-event.js +++ b/js/src/util/subscribe-to-event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/tx.js b/js/src/util/tx.js index b688d06fe..591931ff3 100644 --- a/js/src/util/tx.js +++ b/js/src/util/tx.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/validation.js b/js/src/util/validation.js index 3d312a2f4..75802ed5f 100644 --- a/js/src/util/validation.js +++ b/js/src/util/validation.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/wallet.js b/js/src/util/wallet.js index 123f9f592..b6240ff01 100644 --- a/js/src/util/wallet.js +++ b/js/src/util/wallet.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/wallets.js b/js/src/util/wallets.js index 1f0bc6735..3732840d8 100644 --- a/js/src/util/wallets.js +++ b/js/src/util/wallets.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/web3.extensions.js b/js/src/util/web3.extensions.js index acae683bd..f48aa6c25 100644 --- a/js/src/util/web3.extensions.js +++ b/js/src/util/web3.extensions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/index.js b/js/src/views/Account/index.js index 55c215f7c..75c7cc401 100644 --- a/js/src/views/Account/index.js +++ b/js/src/views/Account/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/index.js b/js/src/views/Accounts/index.js index e9be1d557..c1e7c91a0 100644 --- a/js/src/views/Accounts/index.js +++ b/js/src/views/Accounts/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Address/index.js b/js/src/views/Address/index.js index f97d5b1ae..3a1c9a5f7 100644 --- a/js/src/views/Address/index.js +++ b/js/src/views/Address/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Addresses/index.js b/js/src/views/Addresses/index.js index 97e107c00..a0a5e1a40 100644 --- a/js/src/views/Addresses/index.js +++ b/js/src/views/Addresses/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/index.js b/js/src/views/Application/index.js index 236578226..a3198ef88 100644 --- a/js/src/views/Application/index.js +++ b/js/src/views/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/store.js b/js/src/views/Application/store.js index 4ea0faf3d..bb42721cd 100644 --- a/js/src/views/Application/store.js +++ b/js/src/views/Application/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Connection/connection.js b/js/src/views/Connection/connection.js index ad0e0c140..8cc2378d9 100644 --- a/js/src/views/Connection/connection.js +++ b/js/src/views/Connection/connection.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Connection/index.js b/js/src/views/Connection/index.js index f33fc42fe..560555d7c 100644 --- a/js/src/views/Connection/index.js +++ b/js/src/views/Connection/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/index.js b/js/src/views/Contract/index.js index 18051a69f..3ab8765b0 100644 --- a/js/src/views/Contract/index.js +++ b/js/src/views/Contract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contracts/index.js b/js/src/views/Contracts/index.js index 075837ce6..ccf6cf5f1 100644 --- a/js/src/views/Contracts/index.js +++ b/js/src/views/Contracts/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapp/dapp.js b/js/src/views/Dapp/dapp.js index 3e9218914..16a842964 100644 --- a/js/src/views/Dapp/dapp.js +++ b/js/src/views/Dapp/dapp.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapp/index.js b/js/src/views/Dapp/index.js index 6fbb5df27..f32a03d0e 100644 --- a/js/src/views/Dapp/index.js +++ b/js/src/views/Dapp/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/dappsStore.js b/js/src/views/Dapps/dappsStore.js index c1790863c..1841f4c7c 100644 --- a/js/src/views/Dapps/dappsStore.js +++ b/js/src/views/Dapps/dappsStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/index.js b/js/src/views/Dapps/index.js index 38a33260f..81cbe79d4 100644 --- a/js/src/views/Dapps/index.js +++ b/js/src/views/Dapps/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/ParityBar/index.js b/js/src/views/ParityBar/index.js index 98cdb6746..48420712f 100644 --- a/js/src/views/ParityBar/index.js +++ b/js/src/views/ParityBar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/ParityBar/parityBar.js b/js/src/views/ParityBar/parityBar.js index 14b71aa10..2f7c52957 100644 --- a/js/src/views/ParityBar/parityBar.js +++ b/js/src/views/ParityBar/parityBar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/actions.js b/js/src/views/Settings/actions.js index d01ddb24f..9add6dec3 100644 --- a/js/src/views/Settings/actions.js +++ b/js/src/views/Settings/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/index.js b/js/src/views/Settings/index.js index 4c5414f71..878a87452 100644 --- a/js/src/views/Settings/index.js +++ b/js/src/views/Settings/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/middleware.js b/js/src/views/Settings/middleware.js index ddadad92b..9ee674d76 100644 --- a/js/src/views/Settings/middleware.js +++ b/js/src/views/Settings/middleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/reducers.js b/js/src/views/Settings/reducers.js index af2612199..1050e9a53 100644 --- a/js/src/views/Settings/reducers.js +++ b/js/src/views/Settings/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/index.js b/js/src/views/Signer/index.js index ff804fe5b..37d3c7489 100644 --- a/js/src/views/Signer/index.js +++ b/js/src/views/Signer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/signer.js b/js/src/views/Signer/signer.js index f0b4baed7..8e131248b 100644 --- a/js/src/views/Signer/signer.js +++ b/js/src/views/Signer/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/store.js b/js/src/views/Signer/store.js index bcc85a431..3e16a6e01 100644 --- a/js/src/views/Signer/store.js +++ b/js/src/views/Signer/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/index.js b/js/src/views/Status/index.js index 44079b224..f966050e9 100644 --- a/js/src/views/Status/index.js +++ b/js/src/views/Status/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/status.js b/js/src/views/Status/status.js index 805c96850..34a42c296 100644 --- a/js/src/views/Status/status.js +++ b/js/src/views/Status/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/index.js b/js/src/views/Wallet/index.js index cebd98d9d..b81bd8d2b 100644 --- a/js/src/views/Wallet/index.js +++ b/js/src/views/Wallet/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/WriteContract/index.js b/js/src/views/WriteContract/index.js index cb4bf811b..c3b7437e9 100644 --- a/js/src/views/WriteContract/index.js +++ b/js/src/views/WriteContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/index.js b/js/src/views/index.js index 18d320c63..2f99ff951 100644 --- a/js/src/views/index.js +++ b/js/src/views/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/web3.js b/js/src/web3.js index 15dc4747c..db5328e18 100644 --- a/js/src/web3.js +++ b/js/src/web3.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/babel.js b/js/test/babel.js index fc37b94bf..e29442832 100644 --- a/js/test/babel.js +++ b/js/test/babel.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/e2e/ethapi.js b/js/test/e2e/ethapi.js index 1fa3da797..b4830abc6 100644 --- a/js/test/e2e/ethapi.js +++ b/js/test/e2e/ethapi.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/mocha.config.js b/js/test/mocha.config.js index 36c91c76e..e90c91ebf 100644 --- a/js/test/mocha.config.js +++ b/js/test/mocha.config.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/mockRpc.js b/js/test/mockRpc.js index 147c64af0..13f752f8e 100644 --- a/js/test/mockRpc.js +++ b/js/test/mockRpc.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/types.js b/js/test/types.js index 73b0aa14e..d926220a1 100644 --- a/js/test/types.js +++ b/js/test/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/build.server.js b/js/webpack/build.server.js index c1e803f56..e52e62656 100644 --- a/js/webpack/build.server.js +++ b/js/webpack/build.server.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/dev.server.js b/js/webpack/dev.server.js index aed7464b4..9e8bd1524 100644 --- a/js/webpack/dev.server.js +++ b/js/webpack/dev.server.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/libraries.js b/js/webpack/libraries.js index d1a2b4915..923d799dc 100644 --- a/js/webpack/libraries.js +++ b/js/webpack/libraries.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/test.js b/js/webpack/test.js index a0340b46b..f118131fd 100644 --- a/js/webpack/test.js +++ b/js/webpack/test.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/vendor.js b/js/webpack/vendor.js index 535edd970..7f1114144 100644 --- a/js/webpack/vendor.js +++ b/js/webpack/vendor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/build.rs b/json/build.rs index 8be54476e..dfb6dfa02 100644 --- a/json/build.rs +++ b/json/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/account.rs b/json/src/blockchain/account.rs index 649cd170f..68a7060a0 100644 --- a/json/src/blockchain/account.rs +++ b/json/src/blockchain/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/block.rs b/json/src/blockchain/block.rs index 03522a2c9..d8b6183db 100644 --- a/json/src/blockchain/block.rs +++ b/json/src/blockchain/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/blockchain.rs b/json/src/blockchain/blockchain.rs index 3899f23e8..8a0de8801 100644 --- a/json/src/blockchain/blockchain.rs +++ b/json/src/blockchain/blockchain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/header.rs b/json/src/blockchain/header.rs index ece6d6359..7fc75266d 100644 --- a/json/src/blockchain/header.rs +++ b/json/src/blockchain/header.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/mod.rs b/json/src/blockchain/mod.rs index 727469ea2..60a215849 100644 --- a/json/src/blockchain/mod.rs +++ b/json/src/blockchain/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/state.rs b/json/src/blockchain/state.rs index 5aa4b09a3..47480fbb1 100644 --- a/json/src/blockchain/state.rs +++ b/json/src/blockchain/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/test.rs b/json/src/blockchain/test.rs index 301d921df..110eb362a 100644 --- a/json/src/blockchain/test.rs +++ b/json/src/blockchain/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/transaction.rs b/json/src/blockchain/transaction.rs index 5d04748f5..d2385978b 100644 --- a/json/src/blockchain/transaction.rs +++ b/json/src/blockchain/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/bytes.rs b/json/src/bytes.rs index c162d08ce..54feb43c1 100644 --- a/json/src/bytes.rs +++ b/json/src/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/hash.rs b/json/src/hash.rs index 14d90ee01..9aad33115 100644 --- a/json/src/hash.rs +++ b/json/src/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/lib.rs b/json/src/lib.rs index b94e1fa55..9c67ab3d1 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/lib.rs.in b/json/src/lib.rs.in index 4754eeee9..eca4b6db2 100644 --- a/json/src/lib.rs.in +++ b/json/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/misc/account_meta.rs b/json/src/misc/account_meta.rs index a347a8cf6..2d1a90ec3 100644 --- a/json/src/misc/account_meta.rs +++ b/json/src/misc/account_meta.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/misc/dapps_settings.rs b/json/src/misc/dapps_settings.rs index 893e7e93e..74a12a331 100644 --- a/json/src/misc/dapps_settings.rs +++ b/json/src/misc/dapps_settings.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/misc/mod.rs b/json/src/misc/mod.rs index baab83d08..b64afcc31 100644 --- a/json/src/misc/mod.rs +++ b/json/src/misc/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/account.rs b/json/src/spec/account.rs index 90ca8a658..b3e0ecbae 100644 --- a/json/src/spec/account.rs +++ b/json/src/spec/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/authority_round.rs b/json/src/spec/authority_round.rs index bae17bb24..d2cedb551 100644 --- a/json/src/spec/authority_round.rs +++ b/json/src/spec/authority_round.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/basic_authority.rs b/json/src/spec/basic_authority.rs index b8b7b4a4d..0e388f1eb 100644 --- a/json/src/spec/basic_authority.rs +++ b/json/src/spec/basic_authority.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/builtin.rs b/json/src/spec/builtin.rs index d56c4a4c7..e311175ff 100644 --- a/json/src/spec/builtin.rs +++ b/json/src/spec/builtin.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/engine.rs b/json/src/spec/engine.rs index 850eb2502..d36327e70 100644 --- a/json/src/spec/engine.rs +++ b/json/src/spec/engine.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/ethash.rs b/json/src/spec/ethash.rs index 752d6853e..229ed77a3 100644 --- a/json/src/spec/ethash.rs +++ b/json/src/spec/ethash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/genesis.rs b/json/src/spec/genesis.rs index 272e7bcc2..c732a1293 100644 --- a/json/src/spec/genesis.rs +++ b/json/src/spec/genesis.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/mod.rs b/json/src/spec/mod.rs index f9de30170..19b9974d9 100644 --- a/json/src/spec/mod.rs +++ b/json/src/spec/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/params.rs b/json/src/spec/params.rs index aa634221d..882686319 100644 --- a/json/src/spec/params.rs +++ b/json/src/spec/params.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/seal.rs b/json/src/spec/seal.rs index 0daea1ba4..eba75840a 100644 --- a/json/src/spec/seal.rs +++ b/json/src/spec/seal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/spec.rs b/json/src/spec/spec.rs index 544407cb8..22d6b36d8 100644 --- a/json/src/spec/spec.rs +++ b/json/src/spec/spec.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/state.rs b/json/src/spec/state.rs index bde3d6dd8..cff03db54 100644 --- a/json/src/spec/state.rs +++ b/json/src/spec/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/log.rs b/json/src/state/log.rs index 5fb3e469b..873de8008 100644 --- a/json/src/state/log.rs +++ b/json/src/state/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/mod.rs b/json/src/state/mod.rs index e0bced6ef..2b06271de 100644 --- a/json/src/state/mod.rs +++ b/json/src/state/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/state.rs b/json/src/state/state.rs index 3ddca43c7..4bdd424cd 100644 --- a/json/src/state/state.rs +++ b/json/src/state/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/test.rs b/json/src/state/test.rs index 0d28232ef..53c3eb113 100644 --- a/json/src/state/test.rs +++ b/json/src/state/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/transaction.rs b/json/src/state/transaction.rs index 62b8577d4..722e9afa3 100644 --- a/json/src/state/transaction.rs +++ b/json/src/state/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/transaction/mod.rs b/json/src/transaction/mod.rs index cec6734b3..b3bf34be3 100644 --- a/json/src/transaction/mod.rs +++ b/json/src/transaction/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/transaction/test.rs b/json/src/transaction/test.rs index 1ea54ff04..bf925a8f0 100644 --- a/json/src/transaction/test.rs +++ b/json/src/transaction/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/transaction/transaction.rs b/json/src/transaction/transaction.rs index 8898f723e..a670eea7d 100644 --- a/json/src/transaction/transaction.rs +++ b/json/src/transaction/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/transaction/txtest.rs b/json/src/transaction/txtest.rs index 059203453..b3d535b8b 100644 --- a/json/src/transaction/txtest.rs +++ b/json/src/transaction/txtest.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/trie/input.rs b/json/src/trie/input.rs index 326f42dba..b8cf3c26e 100644 --- a/json/src/trie/input.rs +++ b/json/src/trie/input.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/trie/mod.rs b/json/src/trie/mod.rs index 1c5d30067..28705d363 100644 --- a/json/src/trie/mod.rs +++ b/json/src/trie/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/trie/test.rs b/json/src/trie/test.rs index 19becd5ee..9d4d6bff9 100644 --- a/json/src/trie/test.rs +++ b/json/src/trie/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/trie/trie.rs b/json/src/trie/trie.rs index c04498591..1eebe0d28 100644 --- a/json/src/trie/trie.rs +++ b/json/src/trie/trie.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/uint.rs b/json/src/uint.rs index 17493203f..f444da326 100644 --- a/json/src/uint.rs +++ b/json/src/uint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/call.rs b/json/src/vm/call.rs index ad226048e..598bb9e92 100644 --- a/json/src/vm/call.rs +++ b/json/src/vm/call.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/env.rs b/json/src/vm/env.rs index 95365c0a8..93a4e70b4 100644 --- a/json/src/vm/env.rs +++ b/json/src/vm/env.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/log.rs b/json/src/vm/log.rs index b29325738..e8d02f5e3 100644 --- a/json/src/vm/log.rs +++ b/json/src/vm/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/mod.rs b/json/src/vm/mod.rs index ecc0d05a4..5e7ff8348 100644 --- a/json/src/vm/mod.rs +++ b/json/src/vm/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/test.rs b/json/src/vm/test.rs index e348826e1..e7e525492 100644 --- a/json/src/vm/test.rs +++ b/json/src/vm/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/transaction.rs b/json/src/vm/transaction.rs index d2ee8b89b..c0c61afaf 100644 --- a/json/src/vm/transaction.rs +++ b/json/src/vm/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/vm.rs b/json/src/vm/vm.rs index b0a7c2a4b..b29430fda 100644 --- a/json/src/vm/vm.rs +++ b/json/src/vm/vm.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/license_header b/license_header index d4ebdc448..50fed6b27 100644 --- a/license_header +++ b/license_header @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/logger/src/lib.rs b/logger/src/lib.rs index 1e1555c7c..0c0689b16 100644 --- a/logger/src/lib.rs +++ b/logger/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/account.rs b/parity/account.rs index ae7e1f62b..e790eb596 100644 --- a/parity/account.rs +++ b/parity/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/blockchain.rs b/parity/blockchain.rs index a9d81e5c3..10fe1d32e 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/boot.rs b/parity/boot.rs index d930085db..30349284d 100644 --- a/parity/boot.rs +++ b/parity/boot.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/cache.rs b/parity/cache.rs index d2fc30d6e..b8b324f67 100644 --- a/parity/cache.rs +++ b/parity/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 707f4159d..39e4d5867 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/cli/usage.rs b/parity/cli/usage.rs index 6dcbd6453..cd94e0299 100644 --- a/parity/cli/usage.rs +++ b/parity/cli/usage.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/configuration.rs b/parity/configuration.rs index 84287719e..59333c883 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/dapps.rs b/parity/dapps.rs index ec6fd8846..4eed929ca 100644 --- a/parity/dapps.rs +++ b/parity/dapps.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/deprecated.rs b/parity/deprecated.rs index b9a800101..d509c174a 100644 --- a/parity/deprecated.rs +++ b/parity/deprecated.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/dir.rs b/parity/dir.rs index b9c02efd6..0a49cd528 100644 --- a/parity/dir.rs +++ b/parity/dir.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/helpers.rs b/parity/helpers.rs index 60a04bc45..d1b1e4027 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/informant.rs b/parity/informant.rs index 1caeb1b7c..1991146ea 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/io_handler.rs b/parity/io_handler.rs index 0f1704049..e7af9da39 100644 --- a/parity/io_handler.rs +++ b/parity/io_handler.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/main.rs b/parity/main.rs index 17f5ed74b..8c1f88e1e 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/migration.rs b/parity/migration.rs index 58e3b5ea9..8a6f4435a 100644 --- a/parity/migration.rs +++ b/parity/migration.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/modules.rs b/parity/modules.rs index 5d1d66cd7..bf2eeb0fb 100644 --- a/parity/modules.rs +++ b/parity/modules.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/params.rs b/parity/params.rs index 25ddc8814..81db4165d 100644 --- a/parity/params.rs +++ b/parity/params.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/presale.rs b/parity/presale.rs index 098832428..7754e7e18 100644 --- a/parity/presale.rs +++ b/parity/presale.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/rpc.rs b/parity/rpc.rs index 52a5bcc0f..2551b0736 100644 --- a/parity/rpc.rs +++ b/parity/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index 2d375fdde..8748c860d 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/run.rs b/parity/run.rs index 8128b3a90..e59df7039 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/signer.rs b/parity/signer.rs index 6905fbb3c..d247453f1 100644 --- a/parity/signer.rs +++ b/parity/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/snapshot.rs b/parity/snapshot.rs index 804047596..2963e9b84 100644 --- a/parity/snapshot.rs +++ b/parity/snapshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/stratum.rs b/parity/stratum.rs index 32c7b8a50..1e510ed44 100644 --- a/parity/stratum.rs +++ b/parity/stratum.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/sync.rs b/parity/sync.rs index 17f183c80..cfc489a45 100644 --- a/parity/sync.rs +++ b/parity/sync.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/upgrade.rs b/parity/upgrade.rs index 7e5b73622..401f6a722 100644 --- a/parity/upgrade.rs +++ b/parity/upgrade.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/url.rs b/parity/url.rs index fca7c6620..285b024c6 100644 --- a/parity/url.rs +++ b/parity/url.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/build.rs b/rpc/build.rs index 1d1a9c19d..0474e8605 100644 --- a/rpc/build.rs +++ b/rpc/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/rpctest/src/main.rs b/rpc/rpctest/src/main.rs index dd4a9a355..2e4bf7d4d 100644 --- a/rpc/rpctest/src/main.rs +++ b/rpc/rpctest/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index e02a18509..bbd4a5164 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/block_import.rs b/rpc/src/v1/helpers/block_import.rs index 4bb2920ed..5e78b2d9d 100644 --- a/rpc/src/v1/helpers/block_import.rs +++ b/rpc/src/v1/helpers/block_import.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/dispatch.rs b/rpc/src/v1/helpers/dispatch.rs index a66bc816d..93e99646b 100644 --- a/rpc/src/v1/helpers/dispatch.rs +++ b/rpc/src/v1/helpers/dispatch.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/mod.rs b/rpc/src/v1/helpers/mod.rs index d5f64dde9..3c6d1a739 100644 --- a/rpc/src/v1/helpers/mod.rs +++ b/rpc/src/v1/helpers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/network_settings.rs b/rpc/src/v1/helpers/network_settings.rs index 9847e9757..934092ec5 100644 --- a/rpc/src/v1/helpers/network_settings.rs +++ b/rpc/src/v1/helpers/network_settings.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/params.rs b/rpc/src/v1/helpers/params.rs index f56c500fc..b533c1b89 100644 --- a/rpc/src/v1/helpers/params.rs +++ b/rpc/src/v1/helpers/params.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/poll_manager.rs b/rpc/src/v1/helpers/poll_manager.rs index bc3518830..c695eae8c 100644 --- a/rpc/src/v1/helpers/poll_manager.rs +++ b/rpc/src/v1/helpers/poll_manager.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/requests.rs b/rpc/src/v1/helpers/requests.rs index 7c5e89b87..7249e4c4a 100644 --- a/rpc/src/v1/helpers/requests.rs +++ b/rpc/src/v1/helpers/requests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/signer.rs b/rpc/src/v1/helpers/signer.rs index 11f8e3376..e208602a5 100644 --- a/rpc/src/v1/helpers/signer.rs +++ b/rpc/src/v1/helpers/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/eth_filter.rs b/rpc/src/v1/impls/eth_filter.rs index 695ff5251..42e82a291 100644 --- a/rpc/src/v1/impls/eth_filter.rs +++ b/rpc/src/v1/impls/eth_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/mod.rs b/rpc/src/v1/impls/mod.rs index e4083ca95..485b2cae5 100644 --- a/rpc/src/v1/impls/mod.rs +++ b/rpc/src/v1/impls/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/net.rs b/rpc/src/v1/impls/net.rs index f0e836fb7..3855bd8d4 100644 --- a/rpc/src/v1/impls/net.rs +++ b/rpc/src/v1/impls/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/parity_accounts.rs b/rpc/src/v1/impls/parity_accounts.rs index 188e2290e..bf53c7273 100644 --- a/rpc/src/v1/impls/parity_accounts.rs +++ b/rpc/src/v1/impls/parity_accounts.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/parity_set.rs b/rpc/src/v1/impls/parity_set.rs index 92de99a1f..b63adaa67 100644 --- a/rpc/src/v1/impls/parity_set.rs +++ b/rpc/src/v1/impls/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/personal.rs b/rpc/src/v1/impls/personal.rs index 1515e3fa1..cc4a40d4a 100644 --- a/rpc/src/v1/impls/personal.rs +++ b/rpc/src/v1/impls/personal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/rpc.rs b/rpc/src/v1/impls/rpc.rs index 7f92c1ed9..6e62bb17c 100644 --- a/rpc/src/v1/impls/rpc.rs +++ b/rpc/src/v1/impls/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/signer.rs b/rpc/src/v1/impls/signer.rs index f13a3d037..6e09a5ec8 100644 --- a/rpc/src/v1/impls/signer.rs +++ b/rpc/src/v1/impls/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/signing.rs b/rpc/src/v1/impls/signing.rs index 262e04dfb..4ee44bb26 100644 --- a/rpc/src/v1/impls/signing.rs +++ b/rpc/src/v1/impls/signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/signing_unsafe.rs b/rpc/src/v1/impls/signing_unsafe.rs index 46ffe6ded..992bb85b0 100644 --- a/rpc/src/v1/impls/signing_unsafe.rs +++ b/rpc/src/v1/impls/signing_unsafe.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/traces.rs b/rpc/src/v1/impls/traces.rs index 0b287ce29..2fd912284 100644 --- a/rpc/src/v1/impls/traces.rs +++ b/rpc/src/v1/impls/traces.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/web3.rs b/rpc/src/v1/impls/web3.rs index 2e8f99006..d81f628b6 100644 --- a/rpc/src/v1/impls/web3.rs +++ b/rpc/src/v1/impls/web3.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/mod.rs b/rpc/src/v1/mod.rs index 966a87f26..2942d81ed 100644 --- a/rpc/src/v1/mod.rs +++ b/rpc/src/v1/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/eth.rs b/rpc/src/v1/traits/eth.rs index 64a87c175..14ee8ca62 100644 --- a/rpc/src/v1/traits/eth.rs +++ b/rpc/src/v1/traits/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/eth_signing.rs b/rpc/src/v1/traits/eth_signing.rs index 09f8c5e03..4f8dc5b1b 100644 --- a/rpc/src/v1/traits/eth_signing.rs +++ b/rpc/src/v1/traits/eth_signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/mod.rs b/rpc/src/v1/traits/mod.rs index 86b55b7c0..ba84d32e4 100644 --- a/rpc/src/v1/traits/mod.rs +++ b/rpc/src/v1/traits/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/net.rs b/rpc/src/v1/traits/net.rs index 36bd8be70..a34270826 100644 --- a/rpc/src/v1/traits/net.rs +++ b/rpc/src/v1/traits/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/parity.rs b/rpc/src/v1/traits/parity.rs index 18440b654..ba6514168 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/parity_accounts.rs b/rpc/src/v1/traits/parity_accounts.rs index 6cfe1bf7b..e4393c149 100644 --- a/rpc/src/v1/traits/parity_accounts.rs +++ b/rpc/src/v1/traits/parity_accounts.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/parity_set.rs b/rpc/src/v1/traits/parity_set.rs index c40abd01f..486f7fb42 100644 --- a/rpc/src/v1/traits/parity_set.rs +++ b/rpc/src/v1/traits/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/parity_signing.rs b/rpc/src/v1/traits/parity_signing.rs index d97b9882b..5eb5ff8b3 100644 --- a/rpc/src/v1/traits/parity_signing.rs +++ b/rpc/src/v1/traits/parity_signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/personal.rs b/rpc/src/v1/traits/personal.rs index 6ba0f28f9..edb1a9d79 100644 --- a/rpc/src/v1/traits/personal.rs +++ b/rpc/src/v1/traits/personal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/rpc.rs b/rpc/src/v1/traits/rpc.rs index 2109442a7..a03d67b55 100644 --- a/rpc/src/v1/traits/rpc.rs +++ b/rpc/src/v1/traits/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/signer.rs b/rpc/src/v1/traits/signer.rs index eafa520d4..5a18fe293 100644 --- a/rpc/src/v1/traits/signer.rs +++ b/rpc/src/v1/traits/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/traces.rs b/rpc/src/v1/traits/traces.rs index 64d16c5b4..0440b4dff 100644 --- a/rpc/src/v1/traits/traces.rs +++ b/rpc/src/v1/traits/traces.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/web3.rs b/rpc/src/v1/traits/web3.rs index fc1f50b9b..efe26e307 100644 --- a/rpc/src/v1/traits/web3.rs +++ b/rpc/src/v1/traits/web3.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/block_number.rs b/rpc/src/v1/types/block_number.rs index 0a2b2f305..00ee1f22b 100644 --- a/rpc/src/v1/types/block_number.rs +++ b/rpc/src/v1/types/block_number.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/bytes.rs b/rpc/src/v1/types/bytes.rs index 57ff9f22e..d9a346836 100644 --- a/rpc/src/v1/types/bytes.rs +++ b/rpc/src/v1/types/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/call_request.rs b/rpc/src/v1/types/call_request.rs index 015811273..f457359c5 100644 --- a/rpc/src/v1/types/call_request.rs +++ b/rpc/src/v1/types/call_request.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/dapp_id.rs b/rpc/src/v1/types/dapp_id.rs index 04aa80e3a..fbd016e8a 100644 --- a/rpc/src/v1/types/dapp_id.rs +++ b/rpc/src/v1/types/dapp_id.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/filter.rs b/rpc/src/v1/types/filter.rs index 5254b1602..6ef57b7a7 100644 --- a/rpc/src/v1/types/filter.rs +++ b/rpc/src/v1/types/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/hash.rs b/rpc/src/v1/types/hash.rs index 3db0cf124..cc4532e7c 100644 --- a/rpc/src/v1/types/hash.rs +++ b/rpc/src/v1/types/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/histogram.rs b/rpc/src/v1/types/histogram.rs index f7bb5525a..9a1043e0e 100644 --- a/rpc/src/v1/types/histogram.rs +++ b/rpc/src/v1/types/histogram.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/index.rs b/rpc/src/v1/types/index.rs index d7b17aea2..65bd681c2 100644 --- a/rpc/src/v1/types/index.rs +++ b/rpc/src/v1/types/index.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/log.rs b/rpc/src/v1/types/log.rs index b945de6ea..f5e7faca5 100644 --- a/rpc/src/v1/types/log.rs +++ b/rpc/src/v1/types/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/build.rs b/signer/build.rs index 41b9a1b3e..28cd9ef69 100644 --- a/signer/build.rs +++ b/signer/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/authcode_store.rs b/signer/src/authcode_store.rs index 55c0fcb15..3752923fa 100644 --- a/signer/src/authcode_store.rs +++ b/signer/src/authcode_store.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/lib.rs b/signer/src/lib.rs index f05d8c625..3d73b0668 100644 --- a/signer/src/lib.rs +++ b/signer/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/tests/mod.rs b/signer/src/tests/mod.rs index e80b5778d..043b0f693 100644 --- a/signer/src/tests/mod.rs +++ b/signer/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/ws_server/mod.rs b/signer/src/ws_server/mod.rs index 697fbd4c7..261715036 100644 --- a/signer/src/ws_server/mod.rs +++ b/signer/src/ws_server/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/ws_server/session.rs b/signer/src/ws_server/session.rs index deb791b54..77699fa93 100644 --- a/signer/src/ws_server/session.rs +++ b/signer/src/ws_server/session.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/stratum/build.rs b/stratum/build.rs index 61fa5098f..692af322e 100644 --- a/stratum/build.rs +++ b/stratum/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/stratum/src/lib.rs b/stratum/src/lib.rs index 45d8a3639..7a5761aae 100644 --- a/stratum/src/lib.rs +++ b/stratum/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/stratum/src/traits.rs b/stratum/src/traits.rs index 5e93a9484..98a6ba763 100644 --- a/stratum/src/traits.rs +++ b/stratum/src/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/build.rs b/sync/build.rs index 1e08ae652..f41135a67 100644 --- a/sync/build.rs +++ b/sync/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/api.rs b/sync/src/api.rs index 7c531bf7c..b4a45c74d 100644 --- a/sync/src/api.rs +++ b/sync/src/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/block_sync.rs b/sync/src/block_sync.rs index 79c7a65a9..c2ff12457 100644 --- a/sync/src/block_sync.rs +++ b/sync/src/block_sync.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/blocks.rs b/sync/src/blocks.rs index bcb9973dc..686b49218 100644 --- a/sync/src/blocks.rs +++ b/sync/src/blocks.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/lib.rs b/sync/src/lib.rs index fa57a3e16..0ff3bfe66 100644 --- a/sync/src/lib.rs +++ b/sync/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/snapshot.rs b/sync/src/snapshot.rs index 9f4262105..7ec87bf01 100644 --- a/sync/src/snapshot.rs +++ b/sync/src/snapshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/sync_io.rs b/sync/src/sync_io.rs index e9e2d3396..34ee6d7f5 100644 --- a/sync/src/sync_io.rs +++ b/sync/src/sync_io.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/chain.rs b/sync/src/tests/chain.rs index 02b9063fa..3d0c17fff 100644 --- a/sync/src/tests/chain.rs +++ b/sync/src/tests/chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/consensus.rs b/sync/src/tests/consensus.rs index 00a036a54..b96997d1e 100644 --- a/sync/src/tests/consensus.rs +++ b/sync/src/tests/consensus.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/helpers.rs b/sync/src/tests/helpers.rs index d2eed9374..af9118431 100644 --- a/sync/src/tests/helpers.rs +++ b/sync/src/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/mod.rs b/sync/src/tests/mod.rs index ef1ca4bab..3b2307518 100644 --- a/sync/src/tests/mod.rs +++ b/sync/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/rpc.rs b/sync/src/tests/rpc.rs index f600130c1..e5b2722b6 100644 --- a/sync/src/tests/rpc.rs +++ b/sync/src/tests/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/snapshot.rs b/sync/src/tests/snapshot.rs index 283d59ee3..96a801669 100644 --- a/sync/src/tests/snapshot.rs +++ b/sync/src/tests/snapshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/transactions_stats.rs b/sync/src/transactions_stats.rs index 8c5eb6dda..d5b78610d 100644 --- a/sync/src/transactions_stats.rs +++ b/sync/src/transactions_stats.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/benches/bigint.rs b/util/benches/bigint.rs index 00a565e20..5f35f52ae 100644 --- a/util/benches/bigint.rs +++ b/util/benches/bigint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/benches/rlp.rs b/util/benches/rlp.rs index 23ae4d829..d446f22cf 100644 --- a/util/benches/rlp.rs +++ b/util/benches/rlp.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/benches/trie.rs b/util/benches/trie.rs index 925139032..0364a39ee 100644 --- a/util/benches/trie.rs +++ b/util/benches/trie.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bigint/build.rs b/util/bigint/build.rs index 248823229..2c945a24c 100644 --- a/util/bigint/build.rs +++ b/util/bigint/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bigint/src/hash.rs b/util/bigint/src/hash.rs index 20cdbae03..29274fc52 100644 --- a/util/bigint/src/hash.rs +++ b/util/bigint/src/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bigint/src/lib.rs b/util/bigint/src/lib.rs index 0df69256c..30b47a24c 100644 --- a/util/bigint/src/lib.rs +++ b/util/bigint/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bloom/src/lib.rs b/util/bloom/src/lib.rs index d5451f721..6388ce037 100644 --- a/util/bloom/src/lib.rs +++ b/util/bloom/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/build.rs b/util/build.rs index 1ec89f704..da28015e2 100644 --- a/util/build.rs +++ b/util/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/fetch/src/client.rs b/util/fetch/src/client.rs index bb8842a5b..7ee544252 100644 --- a/util/fetch/src/client.rs +++ b/util/fetch/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/fetch/src/fetch_file.rs b/util/fetch/src/fetch_file.rs index 4801cc969..84b2270eb 100644 --- a/util/fetch/src/fetch_file.rs +++ b/util/fetch/src/fetch_file.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/fetch/src/lib.rs b/util/fetch/src/lib.rs index 8ec9e0ddd..bd117a6d2 100644 --- a/util/fetch/src/lib.rs +++ b/util/fetch/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/src/client.rs b/util/https-fetch/src/client.rs index 19f2f3e16..e167ce31b 100644 --- a/util/https-fetch/src/client.rs +++ b/util/https-fetch/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/src/http.rs b/util/https-fetch/src/http.rs index f21e2d406..cf743b546 100644 --- a/util/https-fetch/src/http.rs +++ b/util/https-fetch/src/http.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/src/lib.rs b/util/https-fetch/src/lib.rs index edd1186d0..d941129a8 100644 --- a/util/https-fetch/src/lib.rs +++ b/util/https-fetch/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/src/tlsclient.rs b/util/https-fetch/src/tlsclient.rs index dd6f50bba..5ac19ad15 100644 --- a/util/https-fetch/src/tlsclient.rs +++ b/util/https-fetch/src/tlsclient.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/src/url.rs b/util/https-fetch/src/url.rs index 3931d9468..d5df0788f 100644 --- a/util/https-fetch/src/url.rs +++ b/util/https-fetch/src/url.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/io/src/lib.rs b/util/io/src/lib.rs index 99282d9d8..fa01cef43 100644 --- a/util/io/src/lib.rs +++ b/util/io/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/io/src/panics.rs b/util/io/src/panics.rs index f67e925a7..06371c04c 100644 --- a/util/io/src/panics.rs +++ b/util/io/src/panics.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/io/src/service.rs b/util/io/src/service.rs index 6086acadd..d9650a94a 100644 --- a/util/io/src/service.rs +++ b/util/io/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/io/src/worker.rs b/util/io/src/worker.rs index a946fff56..4d55dda41 100644 --- a/util/io/src/worker.rs +++ b/util/io/src/worker.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/error.rs b/util/network/src/error.rs index a1c4d70a1..2500d587c 100644 --- a/util/network/src/error.rs +++ b/util/network/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/ip_utils.rs b/util/network/src/ip_utils.rs index 7ccf75200..ef154a1c1 100644 --- a/util/network/src/ip_utils.rs +++ b/util/network/src/ip_utils.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/lib.rs b/util/network/src/lib.rs index f21cb498d..5a06f5a22 100644 --- a/util/network/src/lib.rs +++ b/util/network/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/node_table.rs b/util/network/src/node_table.rs index ab7d17fa9..3474ce962 100644 --- a/util/network/src/node_table.rs +++ b/util/network/src/node_table.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/service.rs b/util/network/src/service.rs index 3fe6ae04a..766b87750 100644 --- a/util/network/src/service.rs +++ b/util/network/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/stats.rs b/util/network/src/stats.rs index cc3b845da..b7a9cb177 100644 --- a/util/network/src/stats.rs +++ b/util/network/src/stats.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/tests.rs b/util/network/src/tests.rs index 467dbcbd8..67f99d157 100644 --- a/util/network/src/tests.rs +++ b/util/network/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/bytes.rs b/util/rlp/src/bytes.rs index 07ac108d6..a83e7ff94 100644 --- a/util/rlp/src/bytes.rs +++ b/util/rlp/src/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/commonrlps.rs b/util/rlp/src/commonrlps.rs index 239117245..34c358826 100644 --- a/util/rlp/src/commonrlps.rs +++ b/util/rlp/src/commonrlps.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/lib.rs b/util/rlp/src/lib.rs index da5e816b5..6a454460e 100644 --- a/util/rlp/src/lib.rs +++ b/util/rlp/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlpcompression.rs b/util/rlp/src/rlpcompression.rs index 3113d8b83..7f879a1e2 100644 --- a/util/rlp/src/rlpcompression.rs +++ b/util/rlp/src/rlpcompression.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlperrors.rs b/util/rlp/src/rlperrors.rs index dc60afc9a..e636c893c 100644 --- a/util/rlp/src/rlperrors.rs +++ b/util/rlp/src/rlperrors.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlpin.rs b/util/rlp/src/rlpin.rs index a096cdbe8..ca1aaad79 100644 --- a/util/rlp/src/rlpin.rs +++ b/util/rlp/src/rlpin.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlpstream.rs b/util/rlp/src/rlpstream.rs index ec85e8ee5..b0e435ee0 100644 --- a/util/rlp/src/rlpstream.rs +++ b/util/rlp/src/rlpstream.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlptraits.rs b/util/rlp/src/rlptraits.rs index 0f3fb35d7..dc6e62917 100644 --- a/util/rlp/src/rlptraits.rs +++ b/util/rlp/src/rlptraits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/tests.rs b/util/rlp/src/tests.rs index 1d98e4972..83ad38a6e 100644 --- a/util/rlp/src/tests.rs +++ b/util/rlp/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/untrusted_rlp.rs b/util/rlp/src/untrusted_rlp.rs index 8f954e3e6..5bb969046 100644 --- a/util/rlp/src/untrusted_rlp.rs +++ b/util/rlp/src/untrusted_rlp.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/sha3/build.rs b/util/sha3/build.rs index bbe16d720..863be7424 100644 --- a/util/sha3/build.rs +++ b/util/sha3/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/sha3/src/lib.rs b/util/sha3/src/lib.rs index cd1d2125e..79400ac85 100644 --- a/util/sha3/src/lib.rs +++ b/util/sha3/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/bloom.rs b/util/src/bloom.rs index 71c4091b4..5aa50c263 100644 --- a/util/src/bloom.rs +++ b/util/src/bloom.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/bytes.rs b/util/src/bytes.rs index 80b44c0e7..fd0f42c0b 100644 --- a/util/src/bytes.rs +++ b/util/src/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/cache.rs b/util/src/cache.rs index 2b2c50c8b..77227d6ed 100644 --- a/util/src/cache.rs +++ b/util/src/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/common.rs b/util/src/common.rs index 681b0baef..c457948dd 100644 --- a/util/src/common.rs +++ b/util/src/common.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/error.rs b/util/src/error.rs index 1c8180e88..fc9513e98 100644 --- a/util/src/error.rs +++ b/util/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/from_json.rs b/util/src/from_json.rs index a598ed961..ebd1ce693 100644 --- a/util/src/from_json.rs +++ b/util/src/from_json.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/hashdb.rs b/util/src/hashdb.rs index 092d40d8a..2110977d9 100644 --- a/util/src/hashdb.rs +++ b/util/src/hashdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/archivedb.rs b/util/src/journaldb/archivedb.rs index fb087d7b2..accc28ffd 100644 --- a/util/src/journaldb/archivedb.rs +++ b/util/src/journaldb/archivedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/mod.rs b/util/src/journaldb/mod.rs index 5f6b8f5f9..673a77bbc 100644 --- a/util/src/journaldb/mod.rs +++ b/util/src/journaldb/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/refcounteddb.rs b/util/src/journaldb/refcounteddb.rs index 82261965c..e8a4e342d 100644 --- a/util/src/journaldb/refcounteddb.rs +++ b/util/src/journaldb/refcounteddb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/traits.rs b/util/src/journaldb/traits.rs index 7acf20519..90063cd91 100644 --- a/util/src/journaldb/traits.rs +++ b/util/src/journaldb/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/kvdb.rs b/util/src/kvdb.rs index de3b033ec..916ee44ae 100644 --- a/util/src/kvdb.rs +++ b/util/src/kvdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/lib.rs b/util/src/lib.rs index 2b4ac0fed..e37214879 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/log.rs b/util/src/log.rs index 97f3e347f..59114b596 100644 --- a/util/src/log.rs +++ b/util/src/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/memorydb.rs b/util/src/memorydb.rs index 20dd3a41f..67f25922d 100644 --- a/util/src/memorydb.rs +++ b/util/src/memorydb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/migration/mod.rs b/util/src/migration/mod.rs index a2005f456..af1eda192 100644 --- a/util/src/migration/mod.rs +++ b/util/src/migration/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/migration/tests.rs b/util/src/migration/tests.rs index 57a5a9e32..49804976b 100644 --- a/util/src/migration/tests.rs +++ b/util/src/migration/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/misc.rs b/util/src/misc.rs index b0452e85e..b5a357755 100644 --- a/util/src/misc.rs +++ b/util/src/misc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/nibbleslice.rs b/util/src/nibbleslice.rs index 7daec55ca..15096bbd5 100644 --- a/util/src/nibbleslice.rs +++ b/util/src/nibbleslice.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/nibblevec.rs b/util/src/nibblevec.rs index 15bd60cb0..75925f52b 100644 --- a/util/src/nibblevec.rs +++ b/util/src/nibblevec.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/overlaydb.rs b/util/src/overlaydb.rs index 009ef151e..aef68a5eb 100644 --- a/util/src/overlaydb.rs +++ b/util/src/overlaydb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/path.rs b/util/src/path.rs index 8a91a3178..4cb0b413d 100644 --- a/util/src/path.rs +++ b/util/src/path.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/semantic_version.rs b/util/src/semantic_version.rs index b550cd829..e90aa3b17 100644 --- a/util/src/semantic_version.rs +++ b/util/src/semantic_version.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/sha3.rs b/util/src/sha3.rs index f30954526..7bec5e3db 100644 --- a/util/src/sha3.rs +++ b/util/src/sha3.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/snappy.rs b/util/src/snappy.rs index 6919fb1ad..e1318d837 100644 --- a/util/src/snappy.rs +++ b/util/src/snappy.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/standard.rs b/util/src/standard.rs index 3d6c93e1a..cc82db6e8 100644 --- a/util/src/standard.rs +++ b/util/src/standard.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/stats.rs b/util/src/stats.rs index 2a950ff4f..9069be022 100644 --- a/util/src/stats.rs +++ b/util/src/stats.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/timer.rs b/util/src/timer.rs index 5d95ff7de..29ea9f82f 100644 --- a/util/src/timer.rs +++ b/util/src/timer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/fatdb.rs b/util/src/trie/fatdb.rs index ca3f4ca79..7f350828b 100644 --- a/util/src/trie/fatdb.rs +++ b/util/src/trie/fatdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/fatdbmut.rs b/util/src/trie/fatdbmut.rs index c81c62f71..25f0849d0 100644 --- a/util/src/trie/fatdbmut.rs +++ b/util/src/trie/fatdbmut.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/journal.rs b/util/src/trie/journal.rs index 55aed70ac..c863dd8a4 100644 --- a/util/src/trie/journal.rs +++ b/util/src/trie/journal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/mod.rs b/util/src/trie/mod.rs index d857732de..7245e2d5d 100644 --- a/util/src/trie/mod.rs +++ b/util/src/trie/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/node.rs b/util/src/trie/node.rs index e1f71fdc0..e21fc8b3f 100644 --- a/util/src/trie/node.rs +++ b/util/src/trie/node.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/recorder.rs b/util/src/trie/recorder.rs index 3930dd543..7f98c20e5 100644 --- a/util/src/trie/recorder.rs +++ b/util/src/trie/recorder.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/sectriedb.rs b/util/src/trie/sectriedb.rs index 0861f53f3..4df12cde3 100644 --- a/util/src/trie/sectriedb.rs +++ b/util/src/trie/sectriedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/sectriedbmut.rs b/util/src/trie/sectriedbmut.rs index 16cc376fe..6e020b889 100644 --- a/util/src/trie/sectriedbmut.rs +++ b/util/src/trie/sectriedbmut.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/standardmap.rs b/util/src/trie/standardmap.rs index 28e4c76f7..917831865 100644 --- a/util/src/trie/standardmap.rs +++ b/util/src/trie/standardmap.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/triedb.rs b/util/src/trie/triedb.rs index ecd8bdded..ac1503529 100644 --- a/util/src/trie/triedb.rs +++ b/util/src/trie/triedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/triehash.rs b/util/src/triehash.rs index c8ab5bb08..4d9134d3a 100644 --- a/util/src/triehash.rs +++ b/util/src/triehash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/vector.rs b/util/src/vector.rs index 0fccac586..7a59718bf 100644 --- a/util/src/vector.rs +++ b/util/src/vector.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/table/src/lib.rs b/util/table/src/lib.rs index f65c1e171..d0da8a07c 100644 --- a/util/table/src/lib.rs +++ b/util/table/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/using_queue/src/lib.rs b/util/using_queue/src/lib.rs index 24dae94b9..d414d4b14 100644 --- a/util/using_queue/src/lib.rs +++ b/util/using_queue/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/windows/ptray/ptray.cpp b/windows/ptray/ptray.cpp index 8c50df2c1..bd467f92f 100644 --- a/windows/ptray/ptray.cpp +++ b/windows/ptray/ptray.cpp @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify From 58b72c521d1fffec591d7f55fd25f74c3397cf4c Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Sun, 11 Dec 2016 19:31:31 +0100 Subject: [PATCH 119/131] Rename ethcore -> parity in licenses. --- ethcore/light/src/client.rs | 2 +- ethcore/light/src/lib.rs | 2 +- ethcore/light/src/net/buffer_flow.rs | 2 +- ethcore/light/src/net/context.rs | 2 +- ethcore/light/src/net/mod.rs | 2 +- ethcore/light/src/net/status.rs | 2 +- ethcore/light/src/net/tests/mod.rs | 2 +- ethcore/light/src/provider.rs | 2 +- ethcore/light/src/types/les_request.rs | 2 +- ethcore/src/block.rs | 2 +- ethcore/src/blockchain/blockchain.rs | 2 +- ethcore/src/client/client.rs | 2 +- ethcore/src/engines/mod.rs | 2 +- ethcore/src/ethereum/ethash.rs | 2 +- ethcore/src/evm/instructions.rs | 2 +- ethcore/src/evm/interpreter/gasometer.rs | 2 +- ethcore/src/evm/interpreter/mod.rs | 2 +- ethcore/src/evm/tests.rs | 2 +- ethcore/src/executive.rs | 2 +- ethcore/src/json_tests/state.rs | 2 +- ethcore/src/miner/miner.rs | 2 +- ethcore/src/miner/transaction_queue.rs | 2 +- ethcore/src/state/mod.rs | 2 +- ethcore/src/types/trace_types/filter.rs | 2 +- ethcore/src/types/trace_types/trace.rs | 2 +- ethcore/src/verification/queue/mod.rs | 2 +- ipc/codegen/src/codegen.rs | 2 +- ipc/codegen/src/serialization.rs | 2 +- ipc/rpc/src/binary.rs | 2 +- js/npm/parity/test/smoke.spec.js | 2 +- js/npm/test/mocha.config.js | 2 +- js/src/abi/decoder/decoder.spec.js | 2 +- js/src/abi/encoder/encoder.spec.js | 2 +- js/src/abi/spec/event/decodedLog.js | 2 +- js/src/abi/spec/event/decodedLog.spec.js | 2 +- js/src/abi/spec/event/decodedLogParam.js | 2 +- js/src/abi/spec/event/decodedLogParam.spec.js | 2 +- js/src/abi/spec/event/event.js | 2 +- js/src/abi/spec/event/event.spec.js | 2 +- js/src/abi/spec/event/eventParam.js | 2 +- js/src/abi/spec/event/eventParam.spec.js | 2 +- js/src/abi/spec/event/index.js | 2 +- js/src/abi/spec/paramType/format.js | 2 +- js/src/abi/spec/paramType/format.spec.js | 2 +- js/src/abi/spec/paramType/index.js | 2 +- js/src/abi/spec/paramType/paramType.js | 2 +- js/src/abi/spec/paramType/paramType.spec.js | 2 +- js/src/abi/spec/paramType/types.js | 2 +- js/src/api/contract/contract.js | 2 +- js/src/api/contract/contract.spec.js | 2 +- js/src/api/format/output.spec.js | 2 +- js/src/api/rpc/db/db.js | 2 +- js/src/api/rpc/db/db.spec.js | 2 +- js/src/api/rpc/db/index.js | 2 +- js/src/api/rpc/eth/eth.e2e.js | 2 +- js/src/api/rpc/eth/eth.js | 2 +- js/src/api/rpc/eth/eth.spec.js | 2 +- js/src/api/rpc/eth/index.js | 2 +- js/src/api/rpc/net/index.js | 2 +- js/src/api/rpc/net/net.e2e.js | 2 +- js/src/api/rpc/net/net.js | 2 +- js/src/api/rpc/net/net.spec.js | 2 +- js/src/api/rpc/parity/index.js | 2 +- js/src/api/rpc/parity/parity.e2e.js | 2 +- js/src/api/rpc/parity/parity.js | 2 +- js/src/api/rpc/parity/parity.spec.js | 2 +- js/src/api/rpc/personal/index.js | 2 +- js/src/api/rpc/personal/personal.e2e.js | 2 +- js/src/api/rpc/personal/personal.js | 2 +- js/src/api/rpc/personal/personal.spec.js | 2 +- js/src/api/rpc/shh/index.js | 2 +- js/src/api/rpc/shh/shh.js | 2 +- js/src/api/rpc/signer/index.js | 2 +- js/src/api/rpc/signer/signer.js | 2 +- js/src/api/rpc/trace/index.js | 2 +- js/src/api/rpc/trace/trace.e2e.js | 2 +- js/src/api/rpc/trace/trace.js | 2 +- js/src/api/rpc/trace/trace.spec.js | 2 +- js/src/api/rpc/web3/index.js | 2 +- js/src/api/rpc/web3/web3.e2e.js | 2 +- js/src/api/rpc/web3/web3.js | 2 +- js/src/api/rpc/web3/web3.spec.js | 2 +- js/src/api/transport/http/http.e2e.js | 2 +- js/src/api/transport/http/http.js | 2 +- js/src/api/transport/http/http.spec.js | 2 +- js/src/api/transport/http/index.js | 2 +- js/src/api/transport/ws/index.js | 2 +- js/src/api/transport/ws/ws.e2e.js | 2 +- js/src/api/transport/ws/ws.js | 2 +- js/src/api/transport/ws/ws.spec.js | 2 +- js/src/contracts/code/wallet.js | 2 +- js/src/contracts/contracts.js | 2 +- js/src/dapps/basiccoin/AddressSelect/addressSelect.js | 2 +- js/src/dapps/basiccoin/AddressSelect/index.js | 2 +- js/src/dapps/basiccoin/Application/Header/header.js | 2 +- js/src/dapps/basiccoin/Application/Header/index.js | 2 +- js/src/dapps/basiccoin/Application/Loading/index.js | 2 +- js/src/dapps/basiccoin/Application/Loading/loading.js | 2 +- js/src/dapps/basiccoin/Application/application.js | 2 +- js/src/dapps/basiccoin/Application/index.js | 2 +- js/src/dapps/basiccoin/Application/pages.js | 2 +- js/src/dapps/basiccoin/Container/container.js | 2 +- js/src/dapps/basiccoin/Container/index.js | 2 +- js/src/dapps/basiccoin/Deploy/Deployment/deployment.js | 2 +- js/src/dapps/basiccoin/Deploy/Deployment/index.js | 2 +- js/src/dapps/basiccoin/Deploy/Event/event.js | 2 +- js/src/dapps/basiccoin/Deploy/Event/index.js | 2 +- js/src/dapps/basiccoin/Deploy/Events/events.js | 2 +- js/src/dapps/basiccoin/Deploy/Events/index.js | 2 +- js/src/dapps/basiccoin/Deploy/deploy.js | 2 +- js/src/dapps/basiccoin/Deploy/index.js | 2 +- js/src/dapps/basiccoin/IdentityIcon/identityIcon.js | 2 +- js/src/dapps/basiccoin/IdentityIcon/index.js | 2 +- js/src/dapps/basiccoin/Overview/Owner/index.js | 2 +- js/src/dapps/basiccoin/Overview/Owner/owner.js | 2 +- js/src/dapps/basiccoin/Overview/Token/index.js | 2 +- js/src/dapps/basiccoin/Overview/Token/token.js | 2 +- js/src/dapps/basiccoin/Overview/index.js | 2 +- js/src/dapps/basiccoin/Overview/overview.js | 2 +- js/src/dapps/basiccoin/Transfer/Event/event.js | 2 +- js/src/dapps/basiccoin/Transfer/Event/index.js | 2 +- js/src/dapps/basiccoin/Transfer/Events/events.js | 2 +- js/src/dapps/basiccoin/Transfer/Events/index.js | 2 +- js/src/dapps/basiccoin/Transfer/Send/index.js | 2 +- js/src/dapps/basiccoin/Transfer/Send/send.js | 2 +- js/src/dapps/basiccoin/Transfer/index.js | 2 +- js/src/dapps/basiccoin/Transfer/transfer.js | 2 +- js/src/dapps/dappreg/Application/application.js | 2 +- js/src/dapps/dappreg/Application/index.js | 2 +- js/src/dapps/dappreg/Button/button.js | 2 +- js/src/dapps/dappreg/Button/index.js | 2 +- js/src/dapps/dappreg/ButtonBar/buttonBar.js | 2 +- js/src/dapps/dappreg/ButtonBar/index.js | 2 +- js/src/dapps/dappreg/Dapp/dapp.js | 2 +- js/src/dapps/dappreg/Dapp/index.js | 2 +- js/src/dapps/dappreg/Input/index.js | 2 +- js/src/dapps/dappreg/Input/input.js | 2 +- js/src/dapps/dappreg/Modal/index.js | 2 +- js/src/dapps/dappreg/Modal/modal.js | 2 +- js/src/dapps/dappreg/ModalDelete/index.js | 2 +- js/src/dapps/dappreg/ModalDelete/modalDelete.js | 2 +- js/src/dapps/dappreg/ModalRegister/index.js | 2 +- js/src/dapps/dappreg/ModalRegister/modalRegister.js | 2 +- js/src/dapps/dappreg/ModalUpdate/index.js | 2 +- js/src/dapps/dappreg/ModalUpdate/modalUpdate.js | 2 +- js/src/dapps/dappreg/SelectAccount/index.js | 2 +- js/src/dapps/dappreg/SelectAccount/selectAccount.js | 2 +- js/src/dapps/dappreg/SelectDapp/index.js | 2 +- js/src/dapps/dappreg/SelectDapp/selectDapp.js | 2 +- js/src/dapps/dappreg/Warning/index.js | 2 +- js/src/dapps/dappreg/Warning/warning.js | 2 +- js/src/dapps/dappreg/dappsStore.js | 2 +- js/src/dapps/githubhint/Application/application.js | 2 +- js/src/dapps/githubhint/Application/index.js | 2 +- js/src/dapps/githubhint/Button/button.js | 2 +- js/src/dapps/githubhint/Button/index.js | 2 +- js/src/dapps/githubhint/Events/events.js | 2 +- js/src/dapps/githubhint/Events/index.js | 2 +- js/src/dapps/githubhint/IdentityIcon/identityIcon.js | 2 +- js/src/dapps/githubhint/IdentityIcon/index.js | 2 +- js/src/dapps/githubhint/Loading/index.js | 2 +- js/src/dapps/githubhint/Loading/loading.js | 2 +- js/src/dapps/localtx/Application/application.js | 2 +- js/src/dapps/localtx/Application/application.spec.js | 2 +- js/src/dapps/localtx/Application/index.js | 2 +- js/src/dapps/localtx/Transaction/index.js | 2 +- js/src/dapps/localtx/Transaction/transaction.js | 2 +- js/src/dapps/localtx/Transaction/transaction.spec.js | 2 +- js/src/dapps/registry/Accounts/accounts.js | 2 +- js/src/dapps/registry/Accounts/actions.js | 2 +- js/src/dapps/registry/Accounts/index.js | 2 +- js/src/dapps/registry/Application/application.js | 2 +- js/src/dapps/registry/Application/index.js | 2 +- js/src/dapps/registry/Events/actions.js | 2 +- js/src/dapps/registry/Events/events.js | 2 +- js/src/dapps/registry/Events/index.js | 2 +- js/src/dapps/registry/Events/reducers.js | 2 +- js/src/dapps/registry/IdentityIcon/identityIcon.js | 2 +- js/src/dapps/registry/IdentityIcon/index.js | 2 +- js/src/dapps/registry/Lookup/actions.js | 2 +- js/src/dapps/registry/Lookup/index.js | 2 +- js/src/dapps/registry/Lookup/lookup.js | 2 +- js/src/dapps/registry/Lookup/reducers.js | 2 +- js/src/dapps/registry/Names/actions.js | 2 +- js/src/dapps/registry/Names/index.js | 2 +- js/src/dapps/registry/Names/names.js | 2 +- js/src/dapps/registry/Names/reducers.js | 2 +- js/src/dapps/registry/Records/records.js | 2 +- js/src/dapps/registry/addresses/accounts-reducer.js | 2 +- js/src/dapps/registry/addresses/actions.js | 2 +- js/src/dapps/registry/addresses/contacts-reducer.js | 2 +- js/src/dapps/registry/ui/address.js | 2 +- js/src/dapps/registry/ui/hash.js | 2 +- js/src/dapps/registry/ui/image.js | 2 +- js/src/dapps/registry/ui/record-type-select.js | 2 +- js/src/dapps/signaturereg/Application/application.js | 2 +- js/src/dapps/signaturereg/Application/index.js | 2 +- js/src/dapps/signaturereg/Button/button.js | 2 +- js/src/dapps/signaturereg/Button/index.js | 2 +- js/src/dapps/signaturereg/Events/events.js | 2 +- js/src/dapps/signaturereg/Events/index.js | 2 +- js/src/dapps/signaturereg/Header/header.js | 2 +- js/src/dapps/signaturereg/Header/index.js | 2 +- js/src/dapps/signaturereg/IdentityIcon/identityIcon.js | 2 +- js/src/dapps/signaturereg/IdentityIcon/index.js | 2 +- js/src/dapps/signaturereg/Import/import.js | 2 +- js/src/dapps/signaturereg/Import/index.js | 2 +- js/src/dapps/signaturereg/Loading/index.js | 2 +- js/src/dapps/signaturereg/Loading/loading.js | 2 +- .../tokenreg/Accounts/AccountSelector/account-selector.js | 2 +- js/src/dapps/tokenreg/Accounts/AccountSelector/container.js | 2 +- js/src/dapps/tokenreg/Accounts/AccountSelector/index.js | 2 +- js/src/dapps/tokenreg/Accounts/actions.js | 2 +- js/src/dapps/tokenreg/Accounts/reducer.js | 2 +- js/src/dapps/tokenreg/Actions/Query/index.js | 2 +- js/src/dapps/tokenreg/Actions/Query/query.js | 2 +- js/src/dapps/tokenreg/Actions/Register/index.js | 2 +- js/src/dapps/tokenreg/Actions/Register/register.js | 2 +- js/src/dapps/tokenreg/Actions/actions.js | 2 +- js/src/dapps/tokenreg/Actions/component.js | 2 +- js/src/dapps/tokenreg/Actions/container.js | 2 +- js/src/dapps/tokenreg/Actions/index.js | 2 +- js/src/dapps/tokenreg/Actions/reducer.js | 2 +- js/src/dapps/tokenreg/Application/application.js | 2 +- js/src/dapps/tokenreg/Application/index.js | 2 +- js/src/dapps/tokenreg/Chip/chip.js | 2 +- js/src/dapps/tokenreg/Chip/index.js | 2 +- js/src/dapps/tokenreg/IdentityIcon/identityIcon.js | 2 +- js/src/dapps/tokenreg/IdentityIcon/index.js | 2 +- js/src/dapps/tokenreg/Inputs/Text/container.js | 2 +- js/src/dapps/tokenreg/Inputs/Text/index.js | 2 +- js/src/dapps/tokenreg/Inputs/Text/input-text.js | 2 +- js/src/dapps/tokenreg/Inputs/validation.js | 2 +- js/src/dapps/tokenreg/Loading/index.js | 2 +- js/src/dapps/tokenreg/Loading/loading.js | 2 +- js/src/dapps/tokenreg/Status/actions.js | 2 +- js/src/dapps/tokenreg/Status/index.js | 2 +- js/src/dapps/tokenreg/Status/reducer.js | 2 +- js/src/dapps/tokenreg/Status/status.js | 2 +- js/src/dapps/tokenreg/Tokens/Token/add-meta.js | 2 +- js/src/dapps/tokenreg/Tokens/Token/index.js | 2 +- js/src/dapps/tokenreg/Tokens/Token/token.js | 2 +- js/src/dapps/tokenreg/Tokens/Token/tokenContainer.js | 2 +- js/src/dapps/tokenreg/Tokens/actions.js | 2 +- js/src/dapps/tokenreg/Tokens/container.js | 2 +- js/src/dapps/tokenreg/Tokens/index.js | 2 +- js/src/dapps/tokenreg/Tokens/reducer.js | 2 +- js/src/dapps/tokenreg/Tokens/tokens.js | 2 +- js/src/i18n/de/index.js | 2 +- js/src/i18n/de/settings.js | 2 +- js/src/i18n/en/index.js | 2 +- js/src/i18n/en/settings.js | 2 +- js/src/i18n/index.js | 2 +- js/src/i18n/languages.js | 2 +- js/src/i18n/store.js | 2 +- js/src/jsonrpc/interfaces/eth.js | 2 +- js/src/jsonrpc/interfaces/parity.js | 2 +- js/src/library.etherscan.js | 2 +- js/src/library.parity.js | 2 +- js/src/library.shapeshift.js | 2 +- js/src/main.js | 2 +- js/src/modals/AddAddress/addAddress.js | 2 +- js/src/modals/CreateAccount/AccountDetails/accountDetails.js | 2 +- js/src/modals/CreateAccount/AccountDetails/index.js | 2 +- .../CreateAccount/AccountDetailsGeth/accountDetailsGeth.js | 2 +- js/src/modals/CreateAccount/AccountDetailsGeth/index.js | 2 +- js/src/modals/CreateAccount/CreationType/creationType.js | 2 +- js/src/modals/CreateAccount/CreationType/index.js | 2 +- js/src/modals/CreateAccount/NewAccount/index.js | 2 +- js/src/modals/CreateAccount/NewAccount/newAccount.js | 2 +- js/src/modals/CreateAccount/NewGeth/index.js | 2 +- js/src/modals/CreateAccount/NewGeth/newGeth.js | 2 +- js/src/modals/CreateAccount/NewImport/index.js | 2 +- js/src/modals/CreateAccount/NewImport/newImport.js | 2 +- js/src/modals/CreateAccount/RawKey/index.js | 2 +- js/src/modals/CreateAccount/RawKey/rawKey.js | 2 +- js/src/modals/CreateAccount/RecoveryPhrase/index.js | 2 +- js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js | 2 +- js/src/modals/CreateAccount/createAccount.js | 2 +- js/src/modals/CreateWallet/WalletDetails/index.js | 2 +- js/src/modals/CreateWallet/WalletDetails/walletDetails.js | 2 +- js/src/modals/CreateWallet/WalletInfo/index.js | 2 +- js/src/modals/CreateWallet/WalletInfo/walletInfo.js | 2 +- js/src/modals/CreateWallet/WalletType/index.js | 2 +- js/src/modals/CreateWallet/WalletType/walletType.js | 2 +- js/src/modals/DeployContract/DetailsStep/detailsStep.js | 2 +- js/src/modals/DeployContract/DetailsStep/index.js | 2 +- js/src/modals/DeployContract/ErrorStep/errorStep.js | 2 +- js/src/modals/DeployContract/ErrorStep/index.js | 2 +- js/src/modals/DeployContract/ParametersStep/index.js | 2 +- js/src/modals/DeployContract/ParametersStep/parametersStep.js | 4 ++-- js/src/modals/DeployContract/deployContract.js | 2 +- js/src/modals/ExecuteContract/DetailsStep/detailsStep.js | 2 +- js/src/modals/ExecuteContract/DetailsStep/index.js | 2 +- js/src/modals/ExecuteContract/executeContract.js | 2 +- js/src/modals/FirstRun/Completed/completed.js | 2 +- js/src/modals/FirstRun/Completed/index.js | 2 +- js/src/modals/FirstRun/TnC/index.js | 2 +- js/src/modals/FirstRun/TnC/tnc.js | 2 +- js/src/modals/FirstRun/Welcome/index.js | 2 +- js/src/modals/FirstRun/Welcome/welcome.js | 2 +- js/src/modals/PasswordManager/passwordManager.js | 2 +- js/src/modals/SMSVerification/Done/done.js | 2 +- js/src/modals/SMSVerification/Done/index.js | 2 +- js/src/modals/SMSVerification/GatherData/gatherData.js | 2 +- js/src/modals/SMSVerification/GatherData/index.js | 2 +- js/src/modals/SMSVerification/QueryCode/index.js | 2 +- js/src/modals/SMSVerification/QueryCode/queryCode.js | 2 +- js/src/modals/SMSVerification/SendConfirmation/index.js | 2 +- .../SMSVerification/SendConfirmation/sendConfirmation.js | 2 +- js/src/modals/SMSVerification/SendRequest/index.js | 2 +- js/src/modals/SMSVerification/SendRequest/sendRequest.js | 2 +- .../Shapeshift/AwaitingDepositStep/awaitingDepositStep.js | 2 +- js/src/modals/Shapeshift/AwaitingDepositStep/index.js | 2 +- .../Shapeshift/AwaitingExchangeStep/awaitingExchangeStep.js | 2 +- js/src/modals/Shapeshift/AwaitingExchangeStep/index.js | 2 +- js/src/modals/Shapeshift/CompletedStep/completedStep.js | 2 +- js/src/modals/Shapeshift/CompletedStep/index.js | 2 +- js/src/modals/Shapeshift/ErrorStep/errorStep.js | 2 +- js/src/modals/Shapeshift/ErrorStep/index.js | 2 +- js/src/modals/Shapeshift/OptionsStep/index.js | 2 +- js/src/modals/Shapeshift/OptionsStep/optionsStep.js | 2 +- js/src/modals/Shapeshift/Price/index.js | 2 +- js/src/modals/Shapeshift/Price/price.js | 2 +- js/src/modals/Shapeshift/Value/index.js | 2 +- js/src/modals/Shapeshift/Value/value.js | 2 +- js/src/modals/Transfer/Details/details.js | 2 +- js/src/modals/Transfer/Details/index.js | 2 +- js/src/modals/Transfer/Extras/extras.js | 2 +- js/src/modals/Transfer/Extras/index.js | 2 +- js/src/modals/Transfer/store.js | 2 +- js/src/modals/Transfer/transfer.js | 2 +- js/src/modals/WalletSettings/walletSettings.js | 2 +- js/src/redux/providers/balancesActions.js | 2 +- js/src/redux/providers/certifications/actions.js | 2 +- js/src/redux/providers/certifications/middleware.js | 2 +- js/src/redux/providers/certifications/reducer.js | 2 +- js/src/redux/providers/signerMiddleware.js | 2 +- js/src/redux/providers/walletActions.js | 2 +- js/src/ui/Actionbar/Export/export.js | 2 +- js/src/ui/Actionbar/Export/index.js | 2 +- js/src/ui/Actionbar/Import/import.js | 2 +- js/src/ui/Actionbar/Import/index.js | 2 +- js/src/ui/Actionbar/Search/index.js | 2 +- js/src/ui/Actionbar/Search/search.js | 2 +- js/src/ui/Actionbar/Sort/index.js | 2 +- js/src/ui/Actionbar/Sort/sort.js | 2 +- js/src/ui/Actionbar/Sort/sortStore.js | 2 +- js/src/ui/Container/Title/index.js | 2 +- js/src/ui/Container/Title/title.js | 2 +- js/src/ui/Container/Title/title.spec.js | 2 +- js/src/ui/ContextProvider/contextProvider.js | 2 +- js/src/ui/Editor/mode-solidity.js | 2 +- js/src/ui/Form/AddressSelect/addressSelect.js | 2 +- js/src/ui/Form/AddressSelect/index.js | 2 +- js/src/ui/Form/AutoComplete/autocomplete.js | 2 +- js/src/ui/Form/AutoComplete/index.js | 2 +- js/src/ui/Form/FormWrap/formWrap.js | 2 +- js/src/ui/Form/FormWrap/index.js | 2 +- js/src/ui/Form/Input/index.js | 2 +- js/src/ui/Form/Input/input.js | 2 +- js/src/ui/Form/InputAddress/index.js | 2 +- js/src/ui/Form/InputAddress/inputAddress.js | 2 +- js/src/ui/Form/InputAddressSelect/index.js | 2 +- js/src/ui/Form/InputAddressSelect/inputAddressSelect.js | 2 +- js/src/ui/Form/InputChip/index.js | 2 +- js/src/ui/Form/InputChip/inputChip.js | 2 +- js/src/ui/Form/InputInline/index.js | 2 +- js/src/ui/Form/InputInline/inputInline.js | 2 +- js/src/ui/Form/RadioButtons/index.js | 2 +- js/src/ui/Form/RadioButtons/radioButtons.js | 2 +- js/src/ui/Form/Select/index.js | 2 +- js/src/ui/Form/Select/select.js | 2 +- js/src/ui/Form/TypedInput/index.js | 2 +- js/src/ui/Form/TypedInput/typedInput.js | 2 +- js/src/ui/GasPriceEditor/gasPriceEditor.js | 2 +- js/src/ui/GasPriceEditor/gasPriceEditor.spec.js | 2 +- js/src/ui/GasPriceEditor/store.js | 2 +- js/src/ui/GasPriceEditor/store.spec.js | 2 +- js/src/ui/GasPriceSelector/CustomBar/customBar.js | 2 +- js/src/ui/GasPriceSelector/CustomBar/index.js | 2 +- js/src/ui/GasPriceSelector/CustomCursor/customCursor.js | 2 +- js/src/ui/GasPriceSelector/CustomCursor/index.js | 2 +- js/src/ui/GasPriceSelector/CustomShape/customShape.js | 2 +- js/src/ui/GasPriceSelector/CustomShape/index.js | 2 +- js/src/ui/GasPriceSelector/CustomTooltip/customTooltip.js | 2 +- js/src/ui/GasPriceSelector/CustomTooltip/index.js | 2 +- js/src/ui/GasPriceSelector/gasPriceSelector.js | 2 +- js/src/ui/GasPriceSelector/index.js | 2 +- js/src/ui/GasPriceSelector/util.js | 2 +- js/src/ui/LanguageSelector/index.js | 2 +- js/src/ui/LanguageSelector/languageSelector.js | 2 +- js/src/ui/MethodDecoding/methodDecoding.js | 2 +- js/src/ui/Modal/Busy/busy.js | 2 +- js/src/ui/Modal/Busy/index.js | 2 +- js/src/ui/Modal/Completed/completed.js | 2 +- js/src/ui/Modal/Completed/index.js | 2 +- js/src/ui/Modal/Title/index.js | 2 +- js/src/ui/Modal/Title/title.js | 2 +- js/src/ui/Tooltips/Tooltip/index.js | 2 +- js/src/ui/Tooltips/Tooltip/tooltip.js | 2 +- js/src/ui/TxList/TxRow/index.js | 2 +- js/src/ui/TxList/TxRow/txRow.js | 2 +- js/src/ui/TxList/TxRow/txRow.spec.js | 2 +- js/src/ui/index.js | 2 +- js/src/views/Account/Header/header.js | 2 +- js/src/views/Account/Header/index.js | 2 +- js/src/views/Account/Transactions/index.js | 2 +- js/src/views/Account/Transactions/transactions.js | 2 +- js/src/views/Account/account.js | 2 +- js/src/views/Accounts/List/index.js | 2 +- js/src/views/Accounts/List/list.js | 2 +- js/src/views/Accounts/Summary/index.js | 2 +- js/src/views/Accounts/Summary/summary.js | 2 +- js/src/views/Accounts/accounts.js | 2 +- js/src/views/Address/Delete/delete.js | 2 +- js/src/views/Address/Delete/index.js | 2 +- js/src/views/Address/address.js | 2 +- js/src/views/Addresses/addresses.js | 2 +- js/src/views/Application/Container/container.js | 2 +- js/src/views/Application/Container/index.js | 2 +- js/src/views/Application/DappContainer/dappContainer.js | 2 +- js/src/views/Application/DappContainer/index.js | 2 +- js/src/views/Application/FrameError/frameError.js | 2 +- js/src/views/Application/FrameError/index.js | 2 +- js/src/views/Application/Snackbar/index.js | 2 +- js/src/views/Application/Snackbar/snackbar.js | 2 +- js/src/views/Application/Status/index.js | 2 +- js/src/views/Application/Status/status.js | 2 +- js/src/views/Application/TabBar/index.js | 2 +- js/src/views/Application/TabBar/tabBar.js | 2 +- js/src/views/Application/application.js | 2 +- js/src/views/Contract/Events/Event/event.js | 2 +- js/src/views/Contract/Events/Event/index.js | 2 +- js/src/views/Contract/Events/events.js | 2 +- js/src/views/Contract/Events/index.js | 2 +- js/src/views/Contract/Queries/index.js | 2 +- js/src/views/Contract/Queries/inputQuery.js | 2 +- js/src/views/Contract/Queries/queries.js | 2 +- js/src/views/Contract/contract.js | 2 +- js/src/views/Contracts/Summary/index.js | 2 +- js/src/views/Contracts/Summary/summary.js | 2 +- js/src/views/Contracts/contracts.js | 2 +- js/src/views/Dapps/AddDapps/AddDapps.js | 2 +- js/src/views/Dapps/AddDapps/index.js | 2 +- js/src/views/Dapps/Summary/index.js | 2 +- js/src/views/Dapps/Summary/summary.js | 2 +- js/src/views/Dapps/dapps.js | 2 +- js/src/views/Settings/Background/background.js | 2 +- js/src/views/Settings/Background/index.js | 2 +- js/src/views/Settings/Parity/index.js | 2 +- js/src/views/Settings/Parity/parity.js | 2 +- js/src/views/Settings/Proxy/index.js | 2 +- js/src/views/Settings/Proxy/proxy.js | 2 +- js/src/views/Settings/Views/defaults.js | 2 +- js/src/views/Settings/Views/index.js | 2 +- js/src/views/Settings/Views/views.js | 2 +- js/src/views/Settings/settings.js | 2 +- .../Signer/components/Account/AccountLink/accountLink.js | 2 +- js/src/views/Signer/components/Account/AccountLink/index.js | 2 +- js/src/views/Signer/components/Account/account.js | 2 +- js/src/views/Signer/components/Account/index.js | 2 +- js/src/views/Signer/components/RequestPending/index.js | 2 +- .../views/Signer/components/RequestPending/requestPending.js | 2 +- js/src/views/Signer/components/SignRequest/index.js | 2 +- js/src/views/Signer/components/SignRequest/signRequest.js | 2 +- .../views/Signer/components/SignRequest/signRequest.spec.js | 2 +- .../views/Signer/components/TransactionMainDetails/index.js | 2 +- .../TransactionMainDetails/transactionMainDetails.js | 2 +- js/src/views/Signer/components/TransactionPending/index.js | 2 +- .../components/TransactionPending/transactionPending.js | 2 +- .../TransactionPendingFormConfirm/index.js | 2 +- .../transactionPendingFormConfirm.js | 2 +- .../TransactionPendingFormReject/index.js | 2 +- .../transactionPendingFormReject.js | 2 +- .../views/Signer/components/TransactionPendingForm/index.js | 2 +- .../TransactionPendingForm/transactionPendingForm.js | 2 +- js/src/views/Signer/components/TxHashLink/index.js | 2 +- js/src/views/Signer/components/TxHashLink/txHashLink.js | 2 +- js/src/views/Signer/components/util/logger.js | 2 +- js/src/views/Signer/components/util/react.js | 2 +- js/src/views/Signer/components/util/transaction.js | 2 +- js/src/views/Signer/components/util/transaction.spec.js | 2 +- js/src/views/Signer/components/util/util.js | 2 +- js/src/views/Signer/containers/Embedded/embedded.js | 2 +- js/src/views/Signer/containers/Embedded/index.js | 2 +- js/src/views/Signer/containers/RequestsPage/index.js | 2 +- js/src/views/Signer/containers/RequestsPage/requestsPage.js | 2 +- js/src/views/Signer/utils/extension.js | 2 +- js/src/views/Signer/utils/utils.js | 2 +- js/src/views/Status/actions/app.js | 2 +- js/src/views/Status/actions/clipboard.js | 2 +- js/src/views/Status/actions/debug.js | 2 +- js/src/views/Status/actions/localstorage.js | 2 +- js/src/views/Status/actions/logger.js | 2 +- js/src/views/Status/actions/mining.js | 2 +- js/src/views/Status/actions/modify-mining.js | 2 +- js/src/views/Status/actions/rpc.js | 2 +- js/src/views/Status/actions/status.js | 2 +- js/src/views/Status/components/AutoComplete/AutoComplete.js | 2 +- .../views/Status/components/AutoComplete/AutoComplete.spec.js | 2 +- js/src/views/Status/components/AutoComplete/index.js | 2 +- js/src/views/Status/components/Box/Box.js | 2 +- js/src/views/Status/components/Box/Box.spec.js | 2 +- js/src/views/Status/components/Box/index.js | 2 +- js/src/views/Status/components/Call/Call.js | 2 +- js/src/views/Status/components/Call/Call.spec.js | 2 +- js/src/views/Status/components/Call/index.js | 2 +- js/src/views/Status/components/Calls/Calls.js | 2 +- js/src/views/Status/components/Calls/Calls.spec.js | 2 +- js/src/views/Status/components/Calls/index.js | 2 +- js/src/views/Status/components/CallsToolbar/CallsToolbar.js | 2 +- .../views/Status/components/CallsToolbar/CallsToolbar.spec.js | 2 +- js/src/views/Status/components/CallsToolbar/index.js | 2 +- js/src/views/Status/components/Debug/debug.js | 2 +- js/src/views/Status/components/Debug/index.js | 2 +- js/src/views/Status/components/EditableValue/EditableValue.js | 2 +- js/src/views/Status/components/EditableValue/index.js | 2 +- js/src/views/Status/components/JsonEditor/JsonEditor.js | 2 +- js/src/views/Status/components/JsonEditor/index.js | 2 +- js/src/views/Status/components/Markdown/Markdown.js | 2 +- js/src/views/Status/components/Markdown/index.js | 2 +- .../views/Status/components/MiningSettings/decodeExtraData.js | 2 +- .../Status/components/MiningSettings/decodeExtraData.spec.js | 2 +- js/src/views/Status/components/MiningSettings/index.js | 2 +- .../views/Status/components/MiningSettings/miningSettings.js | 2 +- .../Status/components/MiningSettings/numberFromString.js | 2 +- .../Status/components/MiningSettings/numberFromString.spec.js | 2 +- js/src/views/Status/components/Response/Response.js | 2 +- js/src/views/Status/components/Response/Response.spec.js | 2 +- js/src/views/Status/components/Response/index.js | 2 +- js/src/views/Status/components/RpcCalls/RpcCalls.js | 2 +- js/src/views/Status/components/RpcCalls/index.js | 2 +- js/src/views/Status/components/RpcDocs/RpcDocs.js | 2 +- js/src/views/Status/components/RpcDocs/index.js | 2 +- js/src/views/Status/components/RpcNav/RpcNav.js | 2 +- js/src/views/Status/components/RpcNav/index.js | 2 +- .../Status/components/ScrollTopButton/ScrollTopButton.js | 2 +- js/src/views/Status/components/ScrollTopButton/index.js | 2 +- js/src/views/Status/components/ScrollTopButton/util.js | 2 +- js/src/views/Status/components/Status/index.js | 2 +- js/src/views/Status/components/Status/status.js | 2 +- js/src/views/Status/constants/index.js | 2 +- js/src/views/Status/containers/RpcPage/RpcPage.js | 2 +- js/src/views/Status/containers/RpcPage/index.js | 2 +- js/src/views/Status/containers/StatusPage/index.js | 2 +- js/src/views/Status/containers/StatusPage/statusPage.js | 2 +- js/src/views/Status/middleware/index.js | 2 +- js/src/views/Status/middleware/localstorage.js | 2 +- js/src/views/Status/middleware/localstorage.spec.js | 2 +- js/src/views/Status/reducers/debug.js | 2 +- js/src/views/Status/reducers/index.js | 2 +- js/src/views/Status/reducers/logger.js | 2 +- js/src/views/Status/reducers/mining.js | 2 +- js/src/views/Status/reducers/rpc.js | 2 +- js/src/views/Status/reducers/settings.js | 2 +- js/src/views/Status/reducers/status.js | 2 +- js/src/views/Status/util/error.js | 2 +- js/src/views/Status/util/error.spec.js | 2 +- js/src/views/Status/util/index.js | 2 +- js/src/views/Status/util/index.spec.js | 2 +- js/src/views/Status/util/react.js | 2 +- js/src/views/Status/util/rpc-md.js | 2 +- js/src/views/Wallet/Confirmations/confirmations.js | 2 +- js/src/views/Wallet/Confirmations/index.js | 2 +- js/src/views/Wallet/Details/details.js | 2 +- js/src/views/Wallet/Details/index.js | 2 +- js/src/views/Wallet/Transactions/index.js | 2 +- js/src/views/Wallet/Transactions/transactions.js | 2 +- js/src/views/Wallet/wallet.js | 2 +- js/src/views/WriteContract/writeContract.js | 2 +- js/src/views/WriteContract/writeContractStore.js | 2 +- js/test/npmParity.js | 2 +- js/webpack/app.js | 2 +- js/webpack/npm.js | 2 +- js/webpack/shared.js | 2 +- parity/user_defaults.rs | 2 +- rpc/src/v1/helpers/auto_args.rs | 2 +- rpc/src/v1/helpers/errors.rs | 2 +- rpc/src/v1/helpers/signing_queue.rs | 2 +- rpc/src/v1/impls/eth.rs | 2 +- rpc/src/v1/impls/parity.rs | 2 +- rpc/src/v1/tests/helpers/fetch.rs | 2 +- rpc/src/v1/tests/helpers/miner_service.rs | 2 +- rpc/src/v1/tests/helpers/mod.rs | 2 +- rpc/src/v1/tests/helpers/snapshot_service.rs | 2 +- rpc/src/v1/tests/helpers/sync_provider.rs | 2 +- rpc/src/v1/tests/mocked/eth.rs | 2 +- rpc/src/v1/tests/mocked/manage_network.rs | 2 +- rpc/src/v1/tests/mocked/mod.rs | 2 +- rpc/src/v1/tests/mocked/net.rs | 2 +- rpc/src/v1/tests/mocked/parity.rs | 2 +- rpc/src/v1/tests/mocked/parity_accounts.rs | 2 +- rpc/src/v1/tests/mocked/parity_set.rs | 2 +- rpc/src/v1/tests/mocked/personal.rs | 2 +- rpc/src/v1/tests/mocked/rpc.rs | 2 +- rpc/src/v1/tests/mocked/signer.rs | 2 +- rpc/src/v1/tests/mocked/signing.rs | 2 +- rpc/src/v1/tests/mocked/web3.rs | 2 +- rpc/src/v1/types/block.rs | 2 +- rpc/src/v1/types/confirmations.rs | 2 +- rpc/src/v1/types/mod.rs | 2 +- rpc/src/v1/types/mod.rs.in | 2 +- rpc/src/v1/types/receipt.rs | 2 +- rpc/src/v1/types/rpc_settings.rs | 2 +- rpc/src/v1/types/sync.rs | 2 +- rpc/src/v1/types/trace.rs | 2 +- rpc/src/v1/types/trace_filter.rs | 2 +- rpc/src/v1/types/transaction.rs | 2 +- rpc/src/v1/types/transaction_request.rs | 2 +- rpc/src/v1/types/uint.rs | 2 +- rpc/src/v1/types/work.rs | 2 +- sync/src/chain.rs | 2 +- util/bigint/src/uint.rs | 2 +- util/network/src/connection.rs | 2 +- util/network/src/discovery.rs | 2 +- util/network/src/handshake.rs | 2 +- util/network/src/host.rs | 2 +- util/network/src/session.rs | 2 +- util/src/journaldb/earlymergedb.rs | 2 +- util/src/journaldb/overlayrecentdb.rs | 2 +- util/src/trie/triedbmut.rs | 2 +- 622 files changed, 623 insertions(+), 623 deletions(-) diff --git a/ethcore/light/src/client.rs b/ethcore/light/src/client.rs index fcfff81e6..73e85b31c 100644 --- a/ethcore/light/src/client.rs +++ b/ethcore/light/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/lib.rs b/ethcore/light/src/lib.rs index f9008ac7c..d59066b82 100644 --- a/ethcore/light/src/lib.rs +++ b/ethcore/light/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/buffer_flow.rs b/ethcore/light/src/net/buffer_flow.rs index 2371c6ea4..61866f686 100644 --- a/ethcore/light/src/net/buffer_flow.rs +++ b/ethcore/light/src/net/buffer_flow.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/context.rs b/ethcore/light/src/net/context.rs index 96c217895..e58bca7f3 100644 --- a/ethcore/light/src/net/context.rs +++ b/ethcore/light/src/net/context.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index e5bf0cb2b..491e1d0ac 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/status.rs b/ethcore/light/src/net/status.rs index 59981b88d..90b8640cd 100644 --- a/ethcore/light/src/net/status.rs +++ b/ethcore/light/src/net/status.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 7c0928cdd..24ce4250a 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index ed2f49f5d..d820ee6d0 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/types/les_request.rs b/ethcore/light/src/types/les_request.rs index 2c7bfb380..864f2d4f8 100644 --- a/ethcore/light/src/types/les_request.rs +++ b/ethcore/light/src/types/les_request.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index d37920c3e..743167a75 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/blockchain.rs b/ethcore/src/blockchain/blockchain.rs index c69cf3336..47f3a38c4 100644 --- a/ethcore/src/blockchain/blockchain.rs +++ b/ethcore/src/blockchain/blockchain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index f14a47bdc..fb8b5a9f2 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index 1aab5f8f4..5e5c5530f 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/ethereum/ethash.rs b/ethcore/src/ethereum/ethash.rs index ae768e5d3..97508027b 100644 --- a/ethcore/src/ethereum/ethash.rs +++ b/ethcore/src/ethereum/ethash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/instructions.rs b/ethcore/src/evm/instructions.rs index e609bf542..b2a3ae5fb 100644 --- a/ethcore/src/evm/instructions.rs +++ b/ethcore/src/evm/instructions.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/gasometer.rs b/ethcore/src/evm/interpreter/gasometer.rs index 886120880..28a2ee9b4 100644 --- a/ethcore/src/evm/interpreter/gasometer.rs +++ b/ethcore/src/evm/interpreter/gasometer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/mod.rs b/ethcore/src/evm/interpreter/mod.rs index bb9791abe..7b31ec28d 100644 --- a/ethcore/src/evm/interpreter/mod.rs +++ b/ethcore/src/evm/interpreter/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/tests.rs b/ethcore/src/evm/tests.rs index 6cfc9a43e..36a767265 100644 --- a/ethcore/src/evm/tests.rs +++ b/ethcore/src/evm/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index 1dfd987c1..a6c66b067 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/state.rs b/ethcore/src/json_tests/state.rs index bf84d50ee..53cff80b0 100644 --- a/ethcore/src/json_tests/state.rs +++ b/ethcore/src/json_tests/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 83a96837f..a6a63ccaf 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index b4cc93a9c..28b39c7e6 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/state/mod.rs b/ethcore/src/state/mod.rs index 8a52b62ff..76bb71645 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/filter.rs b/ethcore/src/types/trace_types/filter.rs index 1c1be54e7..b12112acd 100644 --- a/ethcore/src/types/trace_types/filter.rs +++ b/ethcore/src/types/trace_types/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/trace.rs b/ethcore/src/types/trace_types/trace.rs index 2571805a6..7f5149905 100644 --- a/ethcore/src/types/trace_types/trace.rs +++ b/ethcore/src/types/trace_types/trace.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/queue/mod.rs b/ethcore/src/verification/queue/mod.rs index adc93484c..d268b1cff 100644 --- a/ethcore/src/verification/queue/mod.rs +++ b/ethcore/src/verification/queue/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/src/codegen.rs b/ipc/codegen/src/codegen.rs index 9caa436bc..27eb8fb0b 100644 --- a/ipc/codegen/src/codegen.rs +++ b/ipc/codegen/src/codegen.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/src/serialization.rs b/ipc/codegen/src/serialization.rs index c7adf1011..c7d288010 100644 --- a/ipc/codegen/src/serialization.rs +++ b/ipc/codegen/src/serialization.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/rpc/src/binary.rs b/ipc/rpc/src/binary.rs index e974626d0..3c7060260 100644 --- a/ipc/rpc/src/binary.rs +++ b/ipc/rpc/src/binary.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/npm/parity/test/smoke.spec.js b/js/npm/parity/test/smoke.spec.js index 9920b10d2..56ae4210b 100644 --- a/js/npm/parity/test/smoke.spec.js +++ b/js/npm/parity/test/smoke.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/npm/test/mocha.config.js b/js/npm/test/mocha.config.js index 2b871f518..9de832978 100644 --- a/js/npm/test/mocha.config.js +++ b/js/npm/test/mocha.config.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/decoder.spec.js b/js/src/abi/decoder/decoder.spec.js index eeaf716c8..cb8f69173 100644 --- a/js/src/abi/decoder/decoder.spec.js +++ b/js/src/abi/decoder/decoder.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/encoder.spec.js b/js/src/abi/encoder/encoder.spec.js index 008861602..27592fb54 100644 --- a/js/src/abi/encoder/encoder.spec.js +++ b/js/src/abi/encoder/encoder.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/decodedLog.js b/js/src/abi/spec/event/decodedLog.js index 3993b527b..735ff0972 100644 --- a/js/src/abi/spec/event/decodedLog.js +++ b/js/src/abi/spec/event/decodedLog.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/decodedLog.spec.js b/js/src/abi/spec/event/decodedLog.spec.js index e6ed1a022..d90560d28 100644 --- a/js/src/abi/spec/event/decodedLog.spec.js +++ b/js/src/abi/spec/event/decodedLog.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/decodedLogParam.js b/js/src/abi/spec/event/decodedLogParam.js index ed456fcce..6740f85f6 100644 --- a/js/src/abi/spec/event/decodedLogParam.js +++ b/js/src/abi/spec/event/decodedLogParam.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/decodedLogParam.spec.js b/js/src/abi/spec/event/decodedLogParam.spec.js index a031282ad..8e824258a 100644 --- a/js/src/abi/spec/event/decodedLogParam.spec.js +++ b/js/src/abi/spec/event/decodedLogParam.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/event.js b/js/src/abi/spec/event/event.js index f64fe0498..a17de1e64 100644 --- a/js/src/abi/spec/event/event.js +++ b/js/src/abi/spec/event/event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/event.spec.js b/js/src/abi/spec/event/event.spec.js index f7252a9d2..4f27e1525 100644 --- a/js/src/abi/spec/event/event.spec.js +++ b/js/src/abi/spec/event/event.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/eventParam.js b/js/src/abi/spec/event/eventParam.js index d8a3b585d..d991dd55a 100644 --- a/js/src/abi/spec/event/eventParam.js +++ b/js/src/abi/spec/event/eventParam.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/eventParam.spec.js b/js/src/abi/spec/event/eventParam.spec.js index 6858e9800..e285707f2 100644 --- a/js/src/abi/spec/event/eventParam.spec.js +++ b/js/src/abi/spec/event/eventParam.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/index.js b/js/src/abi/spec/event/index.js index 0925882d3..a6d44701a 100644 --- a/js/src/abi/spec/event/index.js +++ b/js/src/abi/spec/event/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/format.js b/js/src/abi/spec/paramType/format.js index 459eb15f4..7bac85cf4 100644 --- a/js/src/abi/spec/paramType/format.js +++ b/js/src/abi/spec/paramType/format.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/format.spec.js b/js/src/abi/spec/paramType/format.spec.js index 90e5229d5..c2825a243 100644 --- a/js/src/abi/spec/paramType/format.spec.js +++ b/js/src/abi/spec/paramType/format.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/index.js b/js/src/abi/spec/paramType/index.js index 23bb83f06..eb1756b60 100644 --- a/js/src/abi/spec/paramType/index.js +++ b/js/src/abi/spec/paramType/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/paramType.js b/js/src/abi/spec/paramType/paramType.js index 99a2915d6..d5bd0010f 100644 --- a/js/src/abi/spec/paramType/paramType.js +++ b/js/src/abi/spec/paramType/paramType.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/paramType.spec.js b/js/src/abi/spec/paramType/paramType.spec.js index e8d8c3254..05b41a42b 100644 --- a/js/src/abi/spec/paramType/paramType.spec.js +++ b/js/src/abi/spec/paramType/paramType.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/types.js b/js/src/abi/spec/paramType/types.js index d789a6ed8..768552bef 100644 --- a/js/src/abi/spec/paramType/types.js +++ b/js/src/abi/spec/paramType/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index bfe7cabc4..95dcf2e72 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/contract/contract.spec.js b/js/src/api/contract/contract.spec.js index 970dd606d..87a7cf558 100644 --- a/js/src/api/contract/contract.spec.js +++ b/js/src/api/contract/contract.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/format/output.spec.js b/js/src/api/format/output.spec.js index aac433d70..b44047610 100644 --- a/js/src/api/format/output.spec.js +++ b/js/src/api/format/output.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/db/db.js b/js/src/api/rpc/db/db.js index 9b2031600..ba8f3a049 100644 --- a/js/src/api/rpc/db/db.js +++ b/js/src/api/rpc/db/db.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/db/db.spec.js b/js/src/api/rpc/db/db.spec.js index 4a11fc416..afeab3c49 100644 --- a/js/src/api/rpc/db/db.spec.js +++ b/js/src/api/rpc/db/db.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/db/index.js b/js/src/api/rpc/db/index.js index cd7c2b0b8..4a0be931c 100644 --- a/js/src/api/rpc/db/index.js +++ b/js/src/api/rpc/db/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/eth/eth.e2e.js b/js/src/api/rpc/eth/eth.e2e.js index 973ea1c51..b385b6471 100644 --- a/js/src/api/rpc/eth/eth.e2e.js +++ b/js/src/api/rpc/eth/eth.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/eth/eth.js b/js/src/api/rpc/eth/eth.js index 8148f9385..b435ea1ba 100644 --- a/js/src/api/rpc/eth/eth.js +++ b/js/src/api/rpc/eth/eth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/eth/eth.spec.js b/js/src/api/rpc/eth/eth.spec.js index 85d22f4bd..f01e35c51 100644 --- a/js/src/api/rpc/eth/eth.spec.js +++ b/js/src/api/rpc/eth/eth.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/eth/index.js b/js/src/api/rpc/eth/index.js index 0d0e8c557..4f8450b5f 100644 --- a/js/src/api/rpc/eth/index.js +++ b/js/src/api/rpc/eth/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/net/index.js b/js/src/api/rpc/net/index.js index 0739111e6..ee2ab2d41 100644 --- a/js/src/api/rpc/net/index.js +++ b/js/src/api/rpc/net/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/net/net.e2e.js b/js/src/api/rpc/net/net.e2e.js index 51d84f7a1..9cb6635d9 100644 --- a/js/src/api/rpc/net/net.e2e.js +++ b/js/src/api/rpc/net/net.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/net/net.js b/js/src/api/rpc/net/net.js index 96e99dc51..924e52669 100644 --- a/js/src/api/rpc/net/net.js +++ b/js/src/api/rpc/net/net.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/net/net.spec.js b/js/src/api/rpc/net/net.spec.js index 4903a0cde..154e08f5c 100644 --- a/js/src/api/rpc/net/net.spec.js +++ b/js/src/api/rpc/net/net.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/parity/index.js b/js/src/api/rpc/parity/index.js index 38f08f725..c76208e92 100644 --- a/js/src/api/rpc/parity/index.js +++ b/js/src/api/rpc/parity/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/parity/parity.e2e.js b/js/src/api/rpc/parity/parity.e2e.js index 91e01ab6a..22082cde0 100644 --- a/js/src/api/rpc/parity/parity.e2e.js +++ b/js/src/api/rpc/parity/parity.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/parity/parity.js b/js/src/api/rpc/parity/parity.js index 7dd5b7eb3..2c1d04d93 100644 --- a/js/src/api/rpc/parity/parity.js +++ b/js/src/api/rpc/parity/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/parity/parity.spec.js b/js/src/api/rpc/parity/parity.spec.js index 557314e5c..d0d97cd0b 100644 --- a/js/src/api/rpc/parity/parity.spec.js +++ b/js/src/api/rpc/parity/parity.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/personal/index.js b/js/src/api/rpc/personal/index.js index a9ed260f2..5bd5f7e5b 100644 --- a/js/src/api/rpc/personal/index.js +++ b/js/src/api/rpc/personal/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/personal/personal.e2e.js b/js/src/api/rpc/personal/personal.e2e.js index f7fe42c54..fd1bd08b1 100644 --- a/js/src/api/rpc/personal/personal.e2e.js +++ b/js/src/api/rpc/personal/personal.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/personal/personal.js b/js/src/api/rpc/personal/personal.js index db9a71d23..61022bdb4 100644 --- a/js/src/api/rpc/personal/personal.js +++ b/js/src/api/rpc/personal/personal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/personal/personal.spec.js b/js/src/api/rpc/personal/personal.spec.js index 70c8cf4c2..b7673672d 100644 --- a/js/src/api/rpc/personal/personal.spec.js +++ b/js/src/api/rpc/personal/personal.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/shh/index.js b/js/src/api/rpc/shh/index.js index 7b323aeed..e637987b2 100644 --- a/js/src/api/rpc/shh/index.js +++ b/js/src/api/rpc/shh/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/shh/shh.js b/js/src/api/rpc/shh/shh.js index ad545cac5..106b321b8 100644 --- a/js/src/api/rpc/shh/shh.js +++ b/js/src/api/rpc/shh/shh.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/signer/index.js b/js/src/api/rpc/signer/index.js index 6426bdc06..3653313a7 100644 --- a/js/src/api/rpc/signer/index.js +++ b/js/src/api/rpc/signer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/signer/signer.js b/js/src/api/rpc/signer/signer.js index a24d8b919..403da6c0a 100644 --- a/js/src/api/rpc/signer/signer.js +++ b/js/src/api/rpc/signer/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/trace/index.js b/js/src/api/rpc/trace/index.js index a14087709..2518eebd1 100644 --- a/js/src/api/rpc/trace/index.js +++ b/js/src/api/rpc/trace/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/trace/trace.e2e.js b/js/src/api/rpc/trace/trace.e2e.js index 88c0988f6..262d708f8 100644 --- a/js/src/api/rpc/trace/trace.e2e.js +++ b/js/src/api/rpc/trace/trace.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/trace/trace.js b/js/src/api/rpc/trace/trace.js index 5c693c0b5..4926153ad 100644 --- a/js/src/api/rpc/trace/trace.js +++ b/js/src/api/rpc/trace/trace.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/trace/trace.spec.js b/js/src/api/rpc/trace/trace.spec.js index f36e5537c..6d0610c84 100644 --- a/js/src/api/rpc/trace/trace.spec.js +++ b/js/src/api/rpc/trace/trace.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/web3/index.js b/js/src/api/rpc/web3/index.js index d0bb22941..23ed549d5 100644 --- a/js/src/api/rpc/web3/index.js +++ b/js/src/api/rpc/web3/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/web3/web3.e2e.js b/js/src/api/rpc/web3/web3.e2e.js index 15cc1934f..7040d5307 100644 --- a/js/src/api/rpc/web3/web3.e2e.js +++ b/js/src/api/rpc/web3/web3.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/web3/web3.js b/js/src/api/rpc/web3/web3.js index eb52a8bb7..838ec6c4c 100644 --- a/js/src/api/rpc/web3/web3.js +++ b/js/src/api/rpc/web3/web3.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/web3/web3.spec.js b/js/src/api/rpc/web3/web3.spec.js index b933e805b..071feb851 100644 --- a/js/src/api/rpc/web3/web3.spec.js +++ b/js/src/api/rpc/web3/web3.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/http/http.e2e.js b/js/src/api/transport/http/http.e2e.js index 8f0aa48ad..3a8a41727 100644 --- a/js/src/api/transport/http/http.e2e.js +++ b/js/src/api/transport/http/http.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/http/http.js b/js/src/api/transport/http/http.js index 591b9a627..17d428e75 100644 --- a/js/src/api/transport/http/http.js +++ b/js/src/api/transport/http/http.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/http/http.spec.js b/js/src/api/transport/http/http.spec.js index 718a7e66b..d67f11307 100644 --- a/js/src/api/transport/http/http.spec.js +++ b/js/src/api/transport/http/http.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/http/index.js b/js/src/api/transport/http/index.js index 5ce7a652e..b73500a61 100644 --- a/js/src/api/transport/http/index.js +++ b/js/src/api/transport/http/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/ws/index.js b/js/src/api/transport/ws/index.js index 7b6e35934..ea1bd191b 100644 --- a/js/src/api/transport/ws/index.js +++ b/js/src/api/transport/ws/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/ws/ws.e2e.js b/js/src/api/transport/ws/ws.e2e.js index 19e4ab8eb..3ad7eb708 100644 --- a/js/src/api/transport/ws/ws.e2e.js +++ b/js/src/api/transport/ws/ws.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/ws/ws.js b/js/src/api/transport/ws/ws.js index 53600b6d3..2de500309 100644 --- a/js/src/api/transport/ws/ws.js +++ b/js/src/api/transport/ws/ws.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/ws/ws.spec.js b/js/src/api/transport/ws/ws.spec.js index c417e8911..9303803bf 100644 --- a/js/src/api/transport/ws/ws.spec.js +++ b/js/src/api/transport/ws/ws.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/code/wallet.js b/js/src/contracts/code/wallet.js index 92bcf8795..8e7c5f19a 100644 --- a/js/src/contracts/code/wallet.js +++ b/js/src/contracts/code/wallet.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/contracts.js b/js/src/contracts/contracts.js index a8020b825..8cab3252d 100644 --- a/js/src/contracts/contracts.js +++ b/js/src/contracts/contracts.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/AddressSelect/addressSelect.js b/js/src/dapps/basiccoin/AddressSelect/addressSelect.js index 529e7753d..d29d078fe 100644 --- a/js/src/dapps/basiccoin/AddressSelect/addressSelect.js +++ b/js/src/dapps/basiccoin/AddressSelect/addressSelect.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/AddressSelect/index.js b/js/src/dapps/basiccoin/AddressSelect/index.js index 58059cd2e..3caaa526d 100644 --- a/js/src/dapps/basiccoin/AddressSelect/index.js +++ b/js/src/dapps/basiccoin/AddressSelect/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/Header/header.js b/js/src/dapps/basiccoin/Application/Header/header.js index 90fa909ef..31674bd0f 100644 --- a/js/src/dapps/basiccoin/Application/Header/header.js +++ b/js/src/dapps/basiccoin/Application/Header/header.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/Header/index.js b/js/src/dapps/basiccoin/Application/Header/index.js index 4a5121906..ba1f0b63c 100644 --- a/js/src/dapps/basiccoin/Application/Header/index.js +++ b/js/src/dapps/basiccoin/Application/Header/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/Loading/index.js b/js/src/dapps/basiccoin/Application/Loading/index.js index 0468cab37..55611075b 100644 --- a/js/src/dapps/basiccoin/Application/Loading/index.js +++ b/js/src/dapps/basiccoin/Application/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/Loading/loading.js b/js/src/dapps/basiccoin/Application/Loading/loading.js index e698a0e80..b0202b633 100644 --- a/js/src/dapps/basiccoin/Application/Loading/loading.js +++ b/js/src/dapps/basiccoin/Application/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/application.js b/js/src/dapps/basiccoin/Application/application.js index a05ab6436..2863258da 100644 --- a/js/src/dapps/basiccoin/Application/application.js +++ b/js/src/dapps/basiccoin/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/index.js b/js/src/dapps/basiccoin/Application/index.js index 236578226..a3198ef88 100644 --- a/js/src/dapps/basiccoin/Application/index.js +++ b/js/src/dapps/basiccoin/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/pages.js b/js/src/dapps/basiccoin/Application/pages.js index 5ab422ee4..49210fc5f 100644 --- a/js/src/dapps/basiccoin/Application/pages.js +++ b/js/src/dapps/basiccoin/Application/pages.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Container/container.js b/js/src/dapps/basiccoin/Container/container.js index 82805e71b..afab04f7d 100644 --- a/js/src/dapps/basiccoin/Container/container.js +++ b/js/src/dapps/basiccoin/Container/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Container/index.js b/js/src/dapps/basiccoin/Container/index.js index 87fbc567e..5ad841661 100644 --- a/js/src/dapps/basiccoin/Container/index.js +++ b/js/src/dapps/basiccoin/Container/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Deployment/deployment.js b/js/src/dapps/basiccoin/Deploy/Deployment/deployment.js index be08d616d..33beb4a94 100644 --- a/js/src/dapps/basiccoin/Deploy/Deployment/deployment.js +++ b/js/src/dapps/basiccoin/Deploy/Deployment/deployment.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Deployment/index.js b/js/src/dapps/basiccoin/Deploy/Deployment/index.js index 927cff569..89ca9681b 100644 --- a/js/src/dapps/basiccoin/Deploy/Deployment/index.js +++ b/js/src/dapps/basiccoin/Deploy/Deployment/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Event/event.js b/js/src/dapps/basiccoin/Deploy/Event/event.js index b32795f7e..56b14bf23 100644 --- a/js/src/dapps/basiccoin/Deploy/Event/event.js +++ b/js/src/dapps/basiccoin/Deploy/Event/event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Event/index.js b/js/src/dapps/basiccoin/Deploy/Event/index.js index 0925882d3..a6d44701a 100644 --- a/js/src/dapps/basiccoin/Deploy/Event/index.js +++ b/js/src/dapps/basiccoin/Deploy/Event/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Events/events.js b/js/src/dapps/basiccoin/Deploy/Events/events.js index 4b51afb59..915f110cc 100644 --- a/js/src/dapps/basiccoin/Deploy/Events/events.js +++ b/js/src/dapps/basiccoin/Deploy/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Events/index.js b/js/src/dapps/basiccoin/Deploy/Events/index.js index 88ad6d407..d2c722d81 100644 --- a/js/src/dapps/basiccoin/Deploy/Events/index.js +++ b/js/src/dapps/basiccoin/Deploy/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/deploy.js b/js/src/dapps/basiccoin/Deploy/deploy.js index 34c7eed8a..539a8e8ca 100644 --- a/js/src/dapps/basiccoin/Deploy/deploy.js +++ b/js/src/dapps/basiccoin/Deploy/deploy.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/index.js b/js/src/dapps/basiccoin/Deploy/index.js index 53b4dbcfe..6935d1266 100644 --- a/js/src/dapps/basiccoin/Deploy/index.js +++ b/js/src/dapps/basiccoin/Deploy/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/IdentityIcon/identityIcon.js b/js/src/dapps/basiccoin/IdentityIcon/identityIcon.js index ee1374f7e..b22f62923 100644 --- a/js/src/dapps/basiccoin/IdentityIcon/identityIcon.js +++ b/js/src/dapps/basiccoin/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/IdentityIcon/index.js b/js/src/dapps/basiccoin/IdentityIcon/index.js index 76c107bfb..90e9c1909 100644 --- a/js/src/dapps/basiccoin/IdentityIcon/index.js +++ b/js/src/dapps/basiccoin/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/Owner/index.js b/js/src/dapps/basiccoin/Overview/Owner/index.js index 4f38b38b9..b497b6638 100644 --- a/js/src/dapps/basiccoin/Overview/Owner/index.js +++ b/js/src/dapps/basiccoin/Overview/Owner/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/Owner/owner.js b/js/src/dapps/basiccoin/Overview/Owner/owner.js index a86a27544..35bac6160 100644 --- a/js/src/dapps/basiccoin/Overview/Owner/owner.js +++ b/js/src/dapps/basiccoin/Overview/Owner/owner.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/Token/index.js b/js/src/dapps/basiccoin/Overview/Token/index.js index 4b822b4bd..50ef7b227 100644 --- a/js/src/dapps/basiccoin/Overview/Token/index.js +++ b/js/src/dapps/basiccoin/Overview/Token/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/Token/token.js b/js/src/dapps/basiccoin/Overview/Token/token.js index b0d4a965a..8d2921ae5 100644 --- a/js/src/dapps/basiccoin/Overview/Token/token.js +++ b/js/src/dapps/basiccoin/Overview/Token/token.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/index.js b/js/src/dapps/basiccoin/Overview/index.js index d61fb3fb4..2e8746601 100644 --- a/js/src/dapps/basiccoin/Overview/index.js +++ b/js/src/dapps/basiccoin/Overview/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/overview.js b/js/src/dapps/basiccoin/Overview/overview.js index 46831d782..ecbf4e412 100644 --- a/js/src/dapps/basiccoin/Overview/overview.js +++ b/js/src/dapps/basiccoin/Overview/overview.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Event/event.js b/js/src/dapps/basiccoin/Transfer/Event/event.js index 190035b1d..54fe69c34 100644 --- a/js/src/dapps/basiccoin/Transfer/Event/event.js +++ b/js/src/dapps/basiccoin/Transfer/Event/event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Event/index.js b/js/src/dapps/basiccoin/Transfer/Event/index.js index 0925882d3..a6d44701a 100644 --- a/js/src/dapps/basiccoin/Transfer/Event/index.js +++ b/js/src/dapps/basiccoin/Transfer/Event/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Events/events.js b/js/src/dapps/basiccoin/Transfer/Events/events.js index 101c77f73..0bdca084f 100644 --- a/js/src/dapps/basiccoin/Transfer/Events/events.js +++ b/js/src/dapps/basiccoin/Transfer/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Events/index.js b/js/src/dapps/basiccoin/Transfer/Events/index.js index 88ad6d407..d2c722d81 100644 --- a/js/src/dapps/basiccoin/Transfer/Events/index.js +++ b/js/src/dapps/basiccoin/Transfer/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Send/index.js b/js/src/dapps/basiccoin/Transfer/Send/index.js index ad3107789..5e373a846 100644 --- a/js/src/dapps/basiccoin/Transfer/Send/index.js +++ b/js/src/dapps/basiccoin/Transfer/Send/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Send/send.js b/js/src/dapps/basiccoin/Transfer/Send/send.js index f10807b2e..daec42ac7 100644 --- a/js/src/dapps/basiccoin/Transfer/Send/send.js +++ b/js/src/dapps/basiccoin/Transfer/Send/send.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/index.js b/js/src/dapps/basiccoin/Transfer/index.js index 24d36d796..4a82b5b7d 100644 --- a/js/src/dapps/basiccoin/Transfer/index.js +++ b/js/src/dapps/basiccoin/Transfer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/transfer.js b/js/src/dapps/basiccoin/Transfer/transfer.js index 842d4b7bc..58a317a84 100644 --- a/js/src/dapps/basiccoin/Transfer/transfer.js +++ b/js/src/dapps/basiccoin/Transfer/transfer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Application/application.js b/js/src/dapps/dappreg/Application/application.js index b5e4d5a97..1722f3988 100644 --- a/js/src/dapps/dappreg/Application/application.js +++ b/js/src/dapps/dappreg/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Application/index.js b/js/src/dapps/dappreg/Application/index.js index 236578226..a3198ef88 100644 --- a/js/src/dapps/dappreg/Application/index.js +++ b/js/src/dapps/dappreg/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Button/button.js b/js/src/dapps/dappreg/Button/button.js index 1f3b67b4c..f37a9fa47 100644 --- a/js/src/dapps/dappreg/Button/button.js +++ b/js/src/dapps/dappreg/Button/button.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Button/index.js b/js/src/dapps/dappreg/Button/index.js index f69a65e3d..95f33d38c 100644 --- a/js/src/dapps/dappreg/Button/index.js +++ b/js/src/dapps/dappreg/Button/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ButtonBar/buttonBar.js b/js/src/dapps/dappreg/ButtonBar/buttonBar.js index 074c527d0..f885acb0f 100644 --- a/js/src/dapps/dappreg/ButtonBar/buttonBar.js +++ b/js/src/dapps/dappreg/ButtonBar/buttonBar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ButtonBar/index.js b/js/src/dapps/dappreg/ButtonBar/index.js index d48f63208..aef56ea6e 100644 --- a/js/src/dapps/dappreg/ButtonBar/index.js +++ b/js/src/dapps/dappreg/ButtonBar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Dapp/dapp.js b/js/src/dapps/dappreg/Dapp/dapp.js index 2e07f6ba0..0b2d4551d 100644 --- a/js/src/dapps/dappreg/Dapp/dapp.js +++ b/js/src/dapps/dappreg/Dapp/dapp.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Dapp/index.js b/js/src/dapps/dappreg/Dapp/index.js index 6fbb5df27..f32a03d0e 100644 --- a/js/src/dapps/dappreg/Dapp/index.js +++ b/js/src/dapps/dappreg/Dapp/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Input/index.js b/js/src/dapps/dappreg/Input/index.js index 3d9d9293e..4a4d16674 100644 --- a/js/src/dapps/dappreg/Input/index.js +++ b/js/src/dapps/dappreg/Input/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Input/input.js b/js/src/dapps/dappreg/Input/input.js index 72e046afb..ed52835d5 100644 --- a/js/src/dapps/dappreg/Input/input.js +++ b/js/src/dapps/dappreg/Input/input.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Modal/index.js b/js/src/dapps/dappreg/Modal/index.js index 1e75d9fd8..f1fcd6848 100644 --- a/js/src/dapps/dappreg/Modal/index.js +++ b/js/src/dapps/dappreg/Modal/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Modal/modal.js b/js/src/dapps/dappreg/Modal/modal.js index 7701695d7..1456e23c6 100644 --- a/js/src/dapps/dappreg/Modal/modal.js +++ b/js/src/dapps/dappreg/Modal/modal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalDelete/index.js b/js/src/dapps/dappreg/ModalDelete/index.js index bb321ce2c..99cf1bd97 100644 --- a/js/src/dapps/dappreg/ModalDelete/index.js +++ b/js/src/dapps/dappreg/ModalDelete/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalDelete/modalDelete.js b/js/src/dapps/dappreg/ModalDelete/modalDelete.js index 3a3a8ee52..5513b7fe3 100644 --- a/js/src/dapps/dappreg/ModalDelete/modalDelete.js +++ b/js/src/dapps/dappreg/ModalDelete/modalDelete.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalRegister/index.js b/js/src/dapps/dappreg/ModalRegister/index.js index aae13fd7d..7b6eaf852 100644 --- a/js/src/dapps/dappreg/ModalRegister/index.js +++ b/js/src/dapps/dappreg/ModalRegister/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalRegister/modalRegister.js b/js/src/dapps/dappreg/ModalRegister/modalRegister.js index 53d1806e1..a16514ed8 100644 --- a/js/src/dapps/dappreg/ModalRegister/modalRegister.js +++ b/js/src/dapps/dappreg/ModalRegister/modalRegister.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalUpdate/index.js b/js/src/dapps/dappreg/ModalUpdate/index.js index 8533843ff..624ed4adc 100644 --- a/js/src/dapps/dappreg/ModalUpdate/index.js +++ b/js/src/dapps/dappreg/ModalUpdate/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js b/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js index 591fb59fd..ba5773802 100644 --- a/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js +++ b/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/SelectAccount/index.js b/js/src/dapps/dappreg/SelectAccount/index.js index f8c684ee2..5d7e05bd9 100644 --- a/js/src/dapps/dappreg/SelectAccount/index.js +++ b/js/src/dapps/dappreg/SelectAccount/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/SelectAccount/selectAccount.js b/js/src/dapps/dappreg/SelectAccount/selectAccount.js index 0269a4370..f06064ffe 100644 --- a/js/src/dapps/dappreg/SelectAccount/selectAccount.js +++ b/js/src/dapps/dappreg/SelectAccount/selectAccount.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/SelectDapp/index.js b/js/src/dapps/dappreg/SelectDapp/index.js index 0ab133b57..b41a4abcc 100644 --- a/js/src/dapps/dappreg/SelectDapp/index.js +++ b/js/src/dapps/dappreg/SelectDapp/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/SelectDapp/selectDapp.js b/js/src/dapps/dappreg/SelectDapp/selectDapp.js index 8c0e846f3..61e1d16be 100644 --- a/js/src/dapps/dappreg/SelectDapp/selectDapp.js +++ b/js/src/dapps/dappreg/SelectDapp/selectDapp.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Warning/index.js b/js/src/dapps/dappreg/Warning/index.js index 6097861be..9b67b7d8a 100644 --- a/js/src/dapps/dappreg/Warning/index.js +++ b/js/src/dapps/dappreg/Warning/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Warning/warning.js b/js/src/dapps/dappreg/Warning/warning.js index 966c5d3e6..cdf6a129c 100644 --- a/js/src/dapps/dappreg/Warning/warning.js +++ b/js/src/dapps/dappreg/Warning/warning.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/dappsStore.js b/js/src/dapps/dappreg/dappsStore.js index 382f5cdc4..94913a2eb 100644 --- a/js/src/dapps/dappreg/dappsStore.js +++ b/js/src/dapps/dappreg/dappsStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Application/application.js b/js/src/dapps/githubhint/Application/application.js index 1690bf1c4..630a36a68 100644 --- a/js/src/dapps/githubhint/Application/application.js +++ b/js/src/dapps/githubhint/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Application/index.js b/js/src/dapps/githubhint/Application/index.js index 236578226..a3198ef88 100644 --- a/js/src/dapps/githubhint/Application/index.js +++ b/js/src/dapps/githubhint/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Button/button.js b/js/src/dapps/githubhint/Button/button.js index 42fca1af7..e98963cb8 100644 --- a/js/src/dapps/githubhint/Button/button.js +++ b/js/src/dapps/githubhint/Button/button.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Button/index.js b/js/src/dapps/githubhint/Button/index.js index f69a65e3d..95f33d38c 100644 --- a/js/src/dapps/githubhint/Button/index.js +++ b/js/src/dapps/githubhint/Button/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Events/events.js b/js/src/dapps/githubhint/Events/events.js index ba74ceaea..c9991acd5 100644 --- a/js/src/dapps/githubhint/Events/events.js +++ b/js/src/dapps/githubhint/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Events/index.js b/js/src/dapps/githubhint/Events/index.js index 88ad6d407..d2c722d81 100644 --- a/js/src/dapps/githubhint/Events/index.js +++ b/js/src/dapps/githubhint/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/IdentityIcon/identityIcon.js b/js/src/dapps/githubhint/IdentityIcon/identityIcon.js index 0bc86731d..60012bc5d 100644 --- a/js/src/dapps/githubhint/IdentityIcon/identityIcon.js +++ b/js/src/dapps/githubhint/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/IdentityIcon/index.js b/js/src/dapps/githubhint/IdentityIcon/index.js index 76c107bfb..90e9c1909 100644 --- a/js/src/dapps/githubhint/IdentityIcon/index.js +++ b/js/src/dapps/githubhint/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Loading/index.js b/js/src/dapps/githubhint/Loading/index.js index 0468cab37..55611075b 100644 --- a/js/src/dapps/githubhint/Loading/index.js +++ b/js/src/dapps/githubhint/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Loading/loading.js b/js/src/dapps/githubhint/Loading/loading.js index b884597d7..c058b583e 100644 --- a/js/src/dapps/githubhint/Loading/loading.js +++ b/js/src/dapps/githubhint/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Application/application.js b/js/src/dapps/localtx/Application/application.js index da435b57d..33c5d0558 100644 --- a/js/src/dapps/localtx/Application/application.js +++ b/js/src/dapps/localtx/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Application/application.spec.js b/js/src/dapps/localtx/Application/application.spec.js index 3ffee343d..f8b19e690 100644 --- a/js/src/dapps/localtx/Application/application.spec.js +++ b/js/src/dapps/localtx/Application/application.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Application/index.js b/js/src/dapps/localtx/Application/index.js index 236578226..a3198ef88 100644 --- a/js/src/dapps/localtx/Application/index.js +++ b/js/src/dapps/localtx/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Transaction/index.js b/js/src/dapps/localtx/Transaction/index.js index 56854f412..7259964b7 100644 --- a/js/src/dapps/localtx/Transaction/index.js +++ b/js/src/dapps/localtx/Transaction/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Transaction/transaction.js b/js/src/dapps/localtx/Transaction/transaction.js index 17a45ecd6..fab5bf152 100644 --- a/js/src/dapps/localtx/Transaction/transaction.js +++ b/js/src/dapps/localtx/Transaction/transaction.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Transaction/transaction.spec.js b/js/src/dapps/localtx/Transaction/transaction.spec.js index 04f2f8de8..70fb4a08b 100644 --- a/js/src/dapps/localtx/Transaction/transaction.spec.js +++ b/js/src/dapps/localtx/Transaction/transaction.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Accounts/accounts.js b/js/src/dapps/registry/Accounts/accounts.js index e8d8c2bd2..076a8bfa4 100644 --- a/js/src/dapps/registry/Accounts/accounts.js +++ b/js/src/dapps/registry/Accounts/accounts.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Accounts/actions.js b/js/src/dapps/registry/Accounts/actions.js index 4f2bd3c70..2abaddd48 100644 --- a/js/src/dapps/registry/Accounts/actions.js +++ b/js/src/dapps/registry/Accounts/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Accounts/index.js b/js/src/dapps/registry/Accounts/index.js index e9be1d557..c1e7c91a0 100644 --- a/js/src/dapps/registry/Accounts/index.js +++ b/js/src/dapps/registry/Accounts/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Application/application.js b/js/src/dapps/registry/Application/application.js index 45290937e..0d1f7e50a 100644 --- a/js/src/dapps/registry/Application/application.js +++ b/js/src/dapps/registry/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Application/index.js b/js/src/dapps/registry/Application/index.js index 236578226..a3198ef88 100644 --- a/js/src/dapps/registry/Application/index.js +++ b/js/src/dapps/registry/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Events/actions.js b/js/src/dapps/registry/Events/actions.js index e12c98c4f..aa48947e8 100644 --- a/js/src/dapps/registry/Events/actions.js +++ b/js/src/dapps/registry/Events/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Events/events.js b/js/src/dapps/registry/Events/events.js index cb433068f..77a985def 100644 --- a/js/src/dapps/registry/Events/events.js +++ b/js/src/dapps/registry/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Events/index.js b/js/src/dapps/registry/Events/index.js index 15d43c375..d058c814d 100644 --- a/js/src/dapps/registry/Events/index.js +++ b/js/src/dapps/registry/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Events/reducers.js b/js/src/dapps/registry/Events/reducers.js index 6ff0011d3..8bca205ac 100644 --- a/js/src/dapps/registry/Events/reducers.js +++ b/js/src/dapps/registry/Events/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/IdentityIcon/identityIcon.js b/js/src/dapps/registry/IdentityIcon/identityIcon.js index e4baf2705..873c2eb88 100644 --- a/js/src/dapps/registry/IdentityIcon/identityIcon.js +++ b/js/src/dapps/registry/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/IdentityIcon/index.js b/js/src/dapps/registry/IdentityIcon/index.js index 76c107bfb..90e9c1909 100644 --- a/js/src/dapps/registry/IdentityIcon/index.js +++ b/js/src/dapps/registry/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Lookup/actions.js b/js/src/dapps/registry/Lookup/actions.js index a7df87585..7cd1ee57a 100644 --- a/js/src/dapps/registry/Lookup/actions.js +++ b/js/src/dapps/registry/Lookup/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Lookup/index.js b/js/src/dapps/registry/Lookup/index.js index f4ade7c00..5e278c07e 100644 --- a/js/src/dapps/registry/Lookup/index.js +++ b/js/src/dapps/registry/Lookup/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Lookup/lookup.js b/js/src/dapps/registry/Lookup/lookup.js index b8b6207cc..a743219f2 100644 --- a/js/src/dapps/registry/Lookup/lookup.js +++ b/js/src/dapps/registry/Lookup/lookup.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Lookup/reducers.js b/js/src/dapps/registry/Lookup/reducers.js index f96e784bd..d6807c713 100644 --- a/js/src/dapps/registry/Lookup/reducers.js +++ b/js/src/dapps/registry/Lookup/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Names/actions.js b/js/src/dapps/registry/Names/actions.js index 488145331..f6ffec729 100644 --- a/js/src/dapps/registry/Names/actions.js +++ b/js/src/dapps/registry/Names/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Names/index.js b/js/src/dapps/registry/Names/index.js index 26195de88..9bfa8232a 100644 --- a/js/src/dapps/registry/Names/index.js +++ b/js/src/dapps/registry/Names/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Names/names.js b/js/src/dapps/registry/Names/names.js index 369d9690c..c0c4badf0 100644 --- a/js/src/dapps/registry/Names/names.js +++ b/js/src/dapps/registry/Names/names.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Names/reducers.js b/js/src/dapps/registry/Names/reducers.js index fcd2ce48e..2b43c8b3e 100644 --- a/js/src/dapps/registry/Names/reducers.js +++ b/js/src/dapps/registry/Names/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Records/records.js b/js/src/dapps/registry/Records/records.js index 4837290a3..085a70152 100644 --- a/js/src/dapps/registry/Records/records.js +++ b/js/src/dapps/registry/Records/records.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/addresses/accounts-reducer.js b/js/src/dapps/registry/addresses/accounts-reducer.js index 20981877d..926536be0 100644 --- a/js/src/dapps/registry/addresses/accounts-reducer.js +++ b/js/src/dapps/registry/addresses/accounts-reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/addresses/actions.js b/js/src/dapps/registry/addresses/actions.js index 059366173..d53df1c7f 100644 --- a/js/src/dapps/registry/addresses/actions.js +++ b/js/src/dapps/registry/addresses/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/addresses/contacts-reducer.js b/js/src/dapps/registry/addresses/contacts-reducer.js index 6b0572e54..401302520 100644 --- a/js/src/dapps/registry/addresses/contacts-reducer.js +++ b/js/src/dapps/registry/addresses/contacts-reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/ui/address.js b/js/src/dapps/registry/ui/address.js index f0b9d65da..f19894b48 100644 --- a/js/src/dapps/registry/ui/address.js +++ b/js/src/dapps/registry/ui/address.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/ui/hash.js b/js/src/dapps/registry/ui/hash.js index 4035a9bbe..7a586b256 100644 --- a/js/src/dapps/registry/ui/hash.js +++ b/js/src/dapps/registry/ui/hash.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/ui/image.js b/js/src/dapps/registry/ui/image.js index e0101e1f2..c66e34128 100644 --- a/js/src/dapps/registry/ui/image.js +++ b/js/src/dapps/registry/ui/image.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/ui/record-type-select.js b/js/src/dapps/registry/ui/record-type-select.js index 2cfbdf540..e146dbf7d 100644 --- a/js/src/dapps/registry/ui/record-type-select.js +++ b/js/src/dapps/registry/ui/record-type-select.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Application/application.js b/js/src/dapps/signaturereg/Application/application.js index 3878af4cf..afddbfcaf 100644 --- a/js/src/dapps/signaturereg/Application/application.js +++ b/js/src/dapps/signaturereg/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Application/index.js b/js/src/dapps/signaturereg/Application/index.js index 236578226..a3198ef88 100644 --- a/js/src/dapps/signaturereg/Application/index.js +++ b/js/src/dapps/signaturereg/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Button/button.js b/js/src/dapps/signaturereg/Button/button.js index 9cbbcf478..238ef4f88 100644 --- a/js/src/dapps/signaturereg/Button/button.js +++ b/js/src/dapps/signaturereg/Button/button.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Button/index.js b/js/src/dapps/signaturereg/Button/index.js index f69a65e3d..95f33d38c 100644 --- a/js/src/dapps/signaturereg/Button/index.js +++ b/js/src/dapps/signaturereg/Button/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Events/events.js b/js/src/dapps/signaturereg/Events/events.js index 302b51250..067b3ead6 100644 --- a/js/src/dapps/signaturereg/Events/events.js +++ b/js/src/dapps/signaturereg/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Events/index.js b/js/src/dapps/signaturereg/Events/index.js index 88ad6d407..d2c722d81 100644 --- a/js/src/dapps/signaturereg/Events/index.js +++ b/js/src/dapps/signaturereg/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Header/header.js b/js/src/dapps/signaturereg/Header/header.js index 8dd7cd578..870447338 100644 --- a/js/src/dapps/signaturereg/Header/header.js +++ b/js/src/dapps/signaturereg/Header/header.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Header/index.js b/js/src/dapps/signaturereg/Header/index.js index 37b5835f0..c73d890cc 100644 --- a/js/src/dapps/signaturereg/Header/index.js +++ b/js/src/dapps/signaturereg/Header/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/IdentityIcon/identityIcon.js b/js/src/dapps/signaturereg/IdentityIcon/identityIcon.js index 0bc86731d..60012bc5d 100644 --- a/js/src/dapps/signaturereg/IdentityIcon/identityIcon.js +++ b/js/src/dapps/signaturereg/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/IdentityIcon/index.js b/js/src/dapps/signaturereg/IdentityIcon/index.js index 76c107bfb..90e9c1909 100644 --- a/js/src/dapps/signaturereg/IdentityIcon/index.js +++ b/js/src/dapps/signaturereg/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Import/import.js b/js/src/dapps/signaturereg/Import/import.js index 55f7d9334..1281bfc93 100644 --- a/js/src/dapps/signaturereg/Import/import.js +++ b/js/src/dapps/signaturereg/Import/import.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Import/index.js b/js/src/dapps/signaturereg/Import/index.js index d2f352cf3..f6a1b16e1 100644 --- a/js/src/dapps/signaturereg/Import/index.js +++ b/js/src/dapps/signaturereg/Import/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Loading/index.js b/js/src/dapps/signaturereg/Loading/index.js index 0468cab37..55611075b 100644 --- a/js/src/dapps/signaturereg/Loading/index.js +++ b/js/src/dapps/signaturereg/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Loading/loading.js b/js/src/dapps/signaturereg/Loading/loading.js index b884597d7..c058b583e 100644 --- a/js/src/dapps/signaturereg/Loading/loading.js +++ b/js/src/dapps/signaturereg/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/AccountSelector/account-selector.js b/js/src/dapps/tokenreg/Accounts/AccountSelector/account-selector.js index 4d29a6692..5cb84f5a9 100644 --- a/js/src/dapps/tokenreg/Accounts/AccountSelector/account-selector.js +++ b/js/src/dapps/tokenreg/Accounts/AccountSelector/account-selector.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/AccountSelector/container.js b/js/src/dapps/tokenreg/Accounts/AccountSelector/container.js index 6438d1dff..6cd0dcc3a 100644 --- a/js/src/dapps/tokenreg/Accounts/AccountSelector/container.js +++ b/js/src/dapps/tokenreg/Accounts/AccountSelector/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/AccountSelector/index.js b/js/src/dapps/tokenreg/Accounts/AccountSelector/index.js index 87fbc567e..5ad841661 100644 --- a/js/src/dapps/tokenreg/Accounts/AccountSelector/index.js +++ b/js/src/dapps/tokenreg/Accounts/AccountSelector/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/actions.js b/js/src/dapps/tokenreg/Accounts/actions.js index 5f92280be..85e4aaceb 100644 --- a/js/src/dapps/tokenreg/Accounts/actions.js +++ b/js/src/dapps/tokenreg/Accounts/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/reducer.js b/js/src/dapps/tokenreg/Accounts/reducer.js index 091df4c8a..899a03b53 100644 --- a/js/src/dapps/tokenreg/Accounts/reducer.js +++ b/js/src/dapps/tokenreg/Accounts/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/Query/index.js b/js/src/dapps/tokenreg/Actions/Query/index.js index 83bc6a337..0273a5f8e 100644 --- a/js/src/dapps/tokenreg/Actions/Query/index.js +++ b/js/src/dapps/tokenreg/Actions/Query/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/Query/query.js b/js/src/dapps/tokenreg/Actions/Query/query.js index 5a3c7d5f6..fd680769c 100644 --- a/js/src/dapps/tokenreg/Actions/Query/query.js +++ b/js/src/dapps/tokenreg/Actions/Query/query.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/Register/index.js b/js/src/dapps/tokenreg/Actions/Register/index.js index 3099d1f42..ff135192e 100644 --- a/js/src/dapps/tokenreg/Actions/Register/index.js +++ b/js/src/dapps/tokenreg/Actions/Register/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/Register/register.js b/js/src/dapps/tokenreg/Actions/Register/register.js index a008ce84f..54df411c7 100644 --- a/js/src/dapps/tokenreg/Actions/Register/register.js +++ b/js/src/dapps/tokenreg/Actions/Register/register.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/actions.js b/js/src/dapps/tokenreg/Actions/actions.js index df5b41e6b..5c1faf985 100644 --- a/js/src/dapps/tokenreg/Actions/actions.js +++ b/js/src/dapps/tokenreg/Actions/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/component.js b/js/src/dapps/tokenreg/Actions/component.js index 43acc27ab..c79f2563a 100644 --- a/js/src/dapps/tokenreg/Actions/component.js +++ b/js/src/dapps/tokenreg/Actions/component.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/container.js b/js/src/dapps/tokenreg/Actions/container.js index 1d3d8fe31..2a4800a67 100644 --- a/js/src/dapps/tokenreg/Actions/container.js +++ b/js/src/dapps/tokenreg/Actions/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/index.js b/js/src/dapps/tokenreg/Actions/index.js index 9007217b7..a442bf3c5 100644 --- a/js/src/dapps/tokenreg/Actions/index.js +++ b/js/src/dapps/tokenreg/Actions/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/reducer.js b/js/src/dapps/tokenreg/Actions/reducer.js index 7b7f8341a..1768cbe6f 100644 --- a/js/src/dapps/tokenreg/Actions/reducer.js +++ b/js/src/dapps/tokenreg/Actions/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Application/application.js b/js/src/dapps/tokenreg/Application/application.js index 6a94f5c9c..0ac784023 100644 --- a/js/src/dapps/tokenreg/Application/application.js +++ b/js/src/dapps/tokenreg/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Application/index.js b/js/src/dapps/tokenreg/Application/index.js index 236578226..a3198ef88 100644 --- a/js/src/dapps/tokenreg/Application/index.js +++ b/js/src/dapps/tokenreg/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Chip/chip.js b/js/src/dapps/tokenreg/Chip/chip.js index ad9886025..f26f9a0c6 100644 --- a/js/src/dapps/tokenreg/Chip/chip.js +++ b/js/src/dapps/tokenreg/Chip/chip.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Chip/index.js b/js/src/dapps/tokenreg/Chip/index.js index 6e1ea80fb..98f3fc5ae 100644 --- a/js/src/dapps/tokenreg/Chip/index.js +++ b/js/src/dapps/tokenreg/Chip/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/IdentityIcon/identityIcon.js b/js/src/dapps/tokenreg/IdentityIcon/identityIcon.js index 51f48d46a..76dfb0079 100644 --- a/js/src/dapps/tokenreg/IdentityIcon/identityIcon.js +++ b/js/src/dapps/tokenreg/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/IdentityIcon/index.js b/js/src/dapps/tokenreg/IdentityIcon/index.js index 76c107bfb..90e9c1909 100644 --- a/js/src/dapps/tokenreg/IdentityIcon/index.js +++ b/js/src/dapps/tokenreg/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Inputs/Text/container.js b/js/src/dapps/tokenreg/Inputs/Text/container.js index 450a2b56e..fe8ae4c26 100644 --- a/js/src/dapps/tokenreg/Inputs/Text/container.js +++ b/js/src/dapps/tokenreg/Inputs/Text/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Inputs/Text/index.js b/js/src/dapps/tokenreg/Inputs/Text/index.js index 87fbc567e..5ad841661 100644 --- a/js/src/dapps/tokenreg/Inputs/Text/index.js +++ b/js/src/dapps/tokenreg/Inputs/Text/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Inputs/Text/input-text.js b/js/src/dapps/tokenreg/Inputs/Text/input-text.js index 289c8c37f..9a8ceca3d 100644 --- a/js/src/dapps/tokenreg/Inputs/Text/input-text.js +++ b/js/src/dapps/tokenreg/Inputs/Text/input-text.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Inputs/validation.js b/js/src/dapps/tokenreg/Inputs/validation.js index fd394b4ec..3b14bd0a4 100644 --- a/js/src/dapps/tokenreg/Inputs/validation.js +++ b/js/src/dapps/tokenreg/Inputs/validation.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Loading/index.js b/js/src/dapps/tokenreg/Loading/index.js index 0468cab37..55611075b 100644 --- a/js/src/dapps/tokenreg/Loading/index.js +++ b/js/src/dapps/tokenreg/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Loading/loading.js b/js/src/dapps/tokenreg/Loading/loading.js index bdcc98df6..507c84bf9 100644 --- a/js/src/dapps/tokenreg/Loading/loading.js +++ b/js/src/dapps/tokenreg/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Status/actions.js b/js/src/dapps/tokenreg/Status/actions.js index 76fae17e5..057a44e65 100644 --- a/js/src/dapps/tokenreg/Status/actions.js +++ b/js/src/dapps/tokenreg/Status/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Status/index.js b/js/src/dapps/tokenreg/Status/index.js index 44079b224..f966050e9 100644 --- a/js/src/dapps/tokenreg/Status/index.js +++ b/js/src/dapps/tokenreg/Status/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Status/reducer.js b/js/src/dapps/tokenreg/Status/reducer.js index aee16fbe7..ae41e6a0b 100644 --- a/js/src/dapps/tokenreg/Status/reducer.js +++ b/js/src/dapps/tokenreg/Status/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Status/status.js b/js/src/dapps/tokenreg/Status/status.js index 4ca47a6ea..64ebba3b6 100644 --- a/js/src/dapps/tokenreg/Status/status.js +++ b/js/src/dapps/tokenreg/Status/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/Token/add-meta.js b/js/src/dapps/tokenreg/Tokens/Token/add-meta.js index 09e65954d..60be410e9 100644 --- a/js/src/dapps/tokenreg/Tokens/Token/add-meta.js +++ b/js/src/dapps/tokenreg/Tokens/Token/add-meta.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/Token/index.js b/js/src/dapps/tokenreg/Tokens/Token/index.js index 30ad8896f..40e8626af 100644 --- a/js/src/dapps/tokenreg/Tokens/Token/index.js +++ b/js/src/dapps/tokenreg/Tokens/Token/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/Token/token.js b/js/src/dapps/tokenreg/Tokens/Token/token.js index be14cec84..831be4a0d 100644 --- a/js/src/dapps/tokenreg/Tokens/Token/token.js +++ b/js/src/dapps/tokenreg/Tokens/Token/token.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/Token/tokenContainer.js b/js/src/dapps/tokenreg/Tokens/Token/tokenContainer.js index 7351da524..84eb14270 100644 --- a/js/src/dapps/tokenreg/Tokens/Token/tokenContainer.js +++ b/js/src/dapps/tokenreg/Tokens/Token/tokenContainer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/actions.js b/js/src/dapps/tokenreg/Tokens/actions.js index 65ed24cd4..8ec37fd17 100644 --- a/js/src/dapps/tokenreg/Tokens/actions.js +++ b/js/src/dapps/tokenreg/Tokens/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/container.js b/js/src/dapps/tokenreg/Tokens/container.js index 33b2de659..84f9c18d3 100644 --- a/js/src/dapps/tokenreg/Tokens/container.js +++ b/js/src/dapps/tokenreg/Tokens/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/index.js b/js/src/dapps/tokenreg/Tokens/index.js index 87fbc567e..5ad841661 100644 --- a/js/src/dapps/tokenreg/Tokens/index.js +++ b/js/src/dapps/tokenreg/Tokens/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/reducer.js b/js/src/dapps/tokenreg/Tokens/reducer.js index 21952105c..10ca67b95 100644 --- a/js/src/dapps/tokenreg/Tokens/reducer.js +++ b/js/src/dapps/tokenreg/Tokens/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/tokens.js b/js/src/dapps/tokenreg/Tokens/tokens.js index 48bc88a74..e31c1675c 100644 --- a/js/src/dapps/tokenreg/Tokens/tokens.js +++ b/js/src/dapps/tokenreg/Tokens/tokens.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/i18n/de/index.js b/js/src/i18n/de/index.js index d8c0f9b4b..d95ebd48d 100644 --- a/js/src/i18n/de/index.js +++ b/js/src/i18n/de/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/i18n/de/settings.js b/js/src/i18n/de/settings.js index 9142ff9c7..76e106fc7 100644 --- a/js/src/i18n/de/settings.js +++ b/js/src/i18n/de/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/i18n/en/index.js b/js/src/i18n/en/index.js index d8c0f9b4b..d95ebd48d 100644 --- a/js/src/i18n/en/index.js +++ b/js/src/i18n/en/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/i18n/en/settings.js b/js/src/i18n/en/settings.js index a0e7c7f1f..ddd4aa84b 100644 --- a/js/src/i18n/en/settings.js +++ b/js/src/i18n/en/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/i18n/index.js b/js/src/i18n/index.js index 4ed119c90..8fe1c9d37 100644 --- a/js/src/i18n/index.js +++ b/js/src/i18n/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/i18n/languages.js b/js/src/i18n/languages.js index f4950e401..55e9e8e0f 100644 --- a/js/src/i18n/languages.js +++ b/js/src/i18n/languages.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/i18n/store.js b/js/src/i18n/store.js index f171497e4..773c596ef 100644 --- a/js/src/i18n/store.js +++ b/js/src/i18n/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/eth.js b/js/src/jsonrpc/interfaces/eth.js index d5ff471fb..3a136ab7e 100644 --- a/js/src/jsonrpc/interfaces/eth.js +++ b/js/src/jsonrpc/interfaces/eth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/parity.js b/js/src/jsonrpc/interfaces/parity.js index 76886af35..bab9ad6e3 100644 --- a/js/src/jsonrpc/interfaces/parity.js +++ b/js/src/jsonrpc/interfaces/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/library.etherscan.js b/js/src/library.etherscan.js index 59cb861d3..e37ab6358 100644 --- a/js/src/library.etherscan.js +++ b/js/src/library.etherscan.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/library.parity.js b/js/src/library.parity.js index 2b526c28e..d95a64b89 100644 --- a/js/src/library.parity.js +++ b/js/src/library.parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/library.shapeshift.js b/js/src/library.shapeshift.js index 3f24f216b..e5b1b407b 100644 --- a/js/src/library.shapeshift.js +++ b/js/src/library.shapeshift.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/main.js b/js/src/main.js index f61e3d563..52d8b0976 100644 --- a/js/src/main.js +++ b/js/src/main.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/AddAddress/addAddress.js b/js/src/modals/AddAddress/addAddress.js index a72158cc7..177223290 100644 --- a/js/src/modals/AddAddress/addAddress.js +++ b/js/src/modals/AddAddress/addAddress.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/AccountDetails/accountDetails.js b/js/src/modals/CreateAccount/AccountDetails/accountDetails.js index f869e3ec5..2ff143b64 100644 --- a/js/src/modals/CreateAccount/AccountDetails/accountDetails.js +++ b/js/src/modals/CreateAccount/AccountDetails/accountDetails.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/AccountDetails/index.js b/js/src/modals/CreateAccount/AccountDetails/index.js index c1911d8d8..bebc17eee 100644 --- a/js/src/modals/CreateAccount/AccountDetails/index.js +++ b/js/src/modals/CreateAccount/AccountDetails/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/AccountDetailsGeth/accountDetailsGeth.js b/js/src/modals/CreateAccount/AccountDetailsGeth/accountDetailsGeth.js index d0f4ac2ff..4d9cde568 100644 --- a/js/src/modals/CreateAccount/AccountDetailsGeth/accountDetailsGeth.js +++ b/js/src/modals/CreateAccount/AccountDetailsGeth/accountDetailsGeth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/AccountDetailsGeth/index.js b/js/src/modals/CreateAccount/AccountDetailsGeth/index.js index 97d2ce159..6e5a20b03 100644 --- a/js/src/modals/CreateAccount/AccountDetailsGeth/index.js +++ b/js/src/modals/CreateAccount/AccountDetailsGeth/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/CreationType/creationType.js b/js/src/modals/CreateAccount/CreationType/creationType.js index fe982a297..3c91c9701 100644 --- a/js/src/modals/CreateAccount/CreationType/creationType.js +++ b/js/src/modals/CreateAccount/CreationType/creationType.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/CreationType/index.js b/js/src/modals/CreateAccount/CreationType/index.js index cd00277c4..86133172b 100644 --- a/js/src/modals/CreateAccount/CreationType/index.js +++ b/js/src/modals/CreateAccount/CreationType/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewAccount/index.js b/js/src/modals/CreateAccount/NewAccount/index.js index f030a32d9..5d2a3e686 100644 --- a/js/src/modals/CreateAccount/NewAccount/index.js +++ b/js/src/modals/CreateAccount/NewAccount/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewAccount/newAccount.js b/js/src/modals/CreateAccount/NewAccount/newAccount.js index bbbf6fed3..267ed56bc 100644 --- a/js/src/modals/CreateAccount/NewAccount/newAccount.js +++ b/js/src/modals/CreateAccount/NewAccount/newAccount.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewGeth/index.js b/js/src/modals/CreateAccount/NewGeth/index.js index 5801eb970..55764c956 100644 --- a/js/src/modals/CreateAccount/NewGeth/index.js +++ b/js/src/modals/CreateAccount/NewGeth/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewGeth/newGeth.js b/js/src/modals/CreateAccount/NewGeth/newGeth.js index 2159277c5..269075983 100644 --- a/js/src/modals/CreateAccount/NewGeth/newGeth.js +++ b/js/src/modals/CreateAccount/NewGeth/newGeth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewImport/index.js b/js/src/modals/CreateAccount/NewImport/index.js index 0b260f426..ff0eefc62 100644 --- a/js/src/modals/CreateAccount/NewImport/index.js +++ b/js/src/modals/CreateAccount/NewImport/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewImport/newImport.js b/js/src/modals/CreateAccount/NewImport/newImport.js index e8d0bb8d6..84ec5b425 100644 --- a/js/src/modals/CreateAccount/NewImport/newImport.js +++ b/js/src/modals/CreateAccount/NewImport/newImport.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/RawKey/index.js b/js/src/modals/CreateAccount/RawKey/index.js index 6e372f475..d52b44801 100644 --- a/js/src/modals/CreateAccount/RawKey/index.js +++ b/js/src/modals/CreateAccount/RawKey/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/RawKey/rawKey.js b/js/src/modals/CreateAccount/RawKey/rawKey.js index fed028bf9..c0cb84617 100644 --- a/js/src/modals/CreateAccount/RawKey/rawKey.js +++ b/js/src/modals/CreateAccount/RawKey/rawKey.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/RecoveryPhrase/index.js b/js/src/modals/CreateAccount/RecoveryPhrase/index.js index b88a8580e..d56f99dd6 100644 --- a/js/src/modals/CreateAccount/RecoveryPhrase/index.js +++ b/js/src/modals/CreateAccount/RecoveryPhrase/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js b/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js index 4088fac53..2736256f1 100644 --- a/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js +++ b/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/createAccount.js b/js/src/modals/CreateAccount/createAccount.js index d8413cee7..d7ec8487b 100644 --- a/js/src/modals/CreateAccount/createAccount.js +++ b/js/src/modals/CreateAccount/createAccount.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletDetails/index.js b/js/src/modals/CreateWallet/WalletDetails/index.js index 266385511..1170852f2 100644 --- a/js/src/modals/CreateWallet/WalletDetails/index.js +++ b/js/src/modals/CreateWallet/WalletDetails/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletDetails/walletDetails.js b/js/src/modals/CreateWallet/WalletDetails/walletDetails.js index 314425dcf..867f130cf 100644 --- a/js/src/modals/CreateWallet/WalletDetails/walletDetails.js +++ b/js/src/modals/CreateWallet/WalletDetails/walletDetails.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletInfo/index.js b/js/src/modals/CreateWallet/WalletInfo/index.js index 975e7bd59..cc921634f 100644 --- a/js/src/modals/CreateWallet/WalletInfo/index.js +++ b/js/src/modals/CreateWallet/WalletInfo/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletInfo/walletInfo.js b/js/src/modals/CreateWallet/WalletInfo/walletInfo.js index cc5c96964..4f5ef93d5 100644 --- a/js/src/modals/CreateWallet/WalletInfo/walletInfo.js +++ b/js/src/modals/CreateWallet/WalletInfo/walletInfo.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletType/index.js b/js/src/modals/CreateWallet/WalletType/index.js index 525e35495..f9321ab89 100644 --- a/js/src/modals/CreateWallet/WalletType/index.js +++ b/js/src/modals/CreateWallet/WalletType/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletType/walletType.js b/js/src/modals/CreateWallet/WalletType/walletType.js index 93dd818f1..4b03f9eb7 100644 --- a/js/src/modals/CreateWallet/WalletType/walletType.js +++ b/js/src/modals/CreateWallet/WalletType/walletType.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/DetailsStep/detailsStep.js b/js/src/modals/DeployContract/DetailsStep/detailsStep.js index 51c5d3cfb..d2fa869a7 100644 --- a/js/src/modals/DeployContract/DetailsStep/detailsStep.js +++ b/js/src/modals/DeployContract/DetailsStep/detailsStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/DetailsStep/index.js b/js/src/modals/DeployContract/DetailsStep/index.js index 5519ee8ea..d1993c906 100644 --- a/js/src/modals/DeployContract/DetailsStep/index.js +++ b/js/src/modals/DeployContract/DetailsStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/ErrorStep/errorStep.js b/js/src/modals/DeployContract/ErrorStep/errorStep.js index 3d97ab598..468d5672a 100644 --- a/js/src/modals/DeployContract/ErrorStep/errorStep.js +++ b/js/src/modals/DeployContract/ErrorStep/errorStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/ErrorStep/index.js b/js/src/modals/DeployContract/ErrorStep/index.js index 93379cab9..5de8b27b1 100644 --- a/js/src/modals/DeployContract/ErrorStep/index.js +++ b/js/src/modals/DeployContract/ErrorStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/ParametersStep/index.js b/js/src/modals/DeployContract/ParametersStep/index.js index 77545b406..77989948e 100644 --- a/js/src/modals/DeployContract/ParametersStep/index.js +++ b/js/src/modals/DeployContract/ParametersStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/ParametersStep/parametersStep.js b/js/src/modals/DeployContract/ParametersStep/parametersStep.js index 4ab5df693..c4004cdf0 100644 --- a/js/src/modals/DeployContract/ParametersStep/parametersStep.js +++ b/js/src/modals/DeployContract/ParametersStep/parametersStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/deployContract.js b/js/src/modals/DeployContract/deployContract.js index 21325f786..aaf5d36aa 100644 --- a/js/src/modals/DeployContract/deployContract.js +++ b/js/src/modals/DeployContract/deployContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js index fde7fa1b2..ae3c92e48 100644 --- a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js +++ b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/ExecuteContract/DetailsStep/index.js b/js/src/modals/ExecuteContract/DetailsStep/index.js index 5519ee8ea..d1993c906 100644 --- a/js/src/modals/ExecuteContract/DetailsStep/index.js +++ b/js/src/modals/ExecuteContract/DetailsStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/ExecuteContract/executeContract.js b/js/src/modals/ExecuteContract/executeContract.js index cdd816ee3..afcc826b7 100644 --- a/js/src/modals/ExecuteContract/executeContract.js +++ b/js/src/modals/ExecuteContract/executeContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/Completed/completed.js b/js/src/modals/FirstRun/Completed/completed.js index 43724f034..3e0ca10d5 100644 --- a/js/src/modals/FirstRun/Completed/completed.js +++ b/js/src/modals/FirstRun/Completed/completed.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/Completed/index.js b/js/src/modals/FirstRun/Completed/index.js index 3e79033d8..229229ced 100644 --- a/js/src/modals/FirstRun/Completed/index.js +++ b/js/src/modals/FirstRun/Completed/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/TnC/index.js b/js/src/modals/FirstRun/TnC/index.js index 251bfa6f9..a26ffecf9 100644 --- a/js/src/modals/FirstRun/TnC/index.js +++ b/js/src/modals/FirstRun/TnC/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/TnC/tnc.js b/js/src/modals/FirstRun/TnC/tnc.js index 648ae765a..96892828b 100644 --- a/js/src/modals/FirstRun/TnC/tnc.js +++ b/js/src/modals/FirstRun/TnC/tnc.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/Welcome/index.js b/js/src/modals/FirstRun/Welcome/index.js index 241e26fc2..f5277ceb0 100644 --- a/js/src/modals/FirstRun/Welcome/index.js +++ b/js/src/modals/FirstRun/Welcome/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/Welcome/welcome.js b/js/src/modals/FirstRun/Welcome/welcome.js index c3d9215c2..853ad99fe 100644 --- a/js/src/modals/FirstRun/Welcome/welcome.js +++ b/js/src/modals/FirstRun/Welcome/welcome.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/PasswordManager/passwordManager.js b/js/src/modals/PasswordManager/passwordManager.js index 96ff38c60..8121e14d2 100644 --- a/js/src/modals/PasswordManager/passwordManager.js +++ b/js/src/modals/PasswordManager/passwordManager.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/Done/done.js b/js/src/modals/SMSVerification/Done/done.js index f3f6fa515..b9d277ec2 100644 --- a/js/src/modals/SMSVerification/Done/done.js +++ b/js/src/modals/SMSVerification/Done/done.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/Done/index.js b/js/src/modals/SMSVerification/Done/index.js index 549306dbd..c1d69e26e 100644 --- a/js/src/modals/SMSVerification/Done/index.js +++ b/js/src/modals/SMSVerification/Done/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/GatherData/gatherData.js b/js/src/modals/SMSVerification/GatherData/gatherData.js index f5f09578e..289374846 100644 --- a/js/src/modals/SMSVerification/GatherData/gatherData.js +++ b/js/src/modals/SMSVerification/GatherData/gatherData.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/GatherData/index.js b/js/src/modals/SMSVerification/GatherData/index.js index 1c03d3400..9687a672d 100644 --- a/js/src/modals/SMSVerification/GatherData/index.js +++ b/js/src/modals/SMSVerification/GatherData/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/QueryCode/index.js b/js/src/modals/SMSVerification/QueryCode/index.js index 539c340f0..9645d3db1 100644 --- a/js/src/modals/SMSVerification/QueryCode/index.js +++ b/js/src/modals/SMSVerification/QueryCode/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/QueryCode/queryCode.js b/js/src/modals/SMSVerification/QueryCode/queryCode.js index 03b228367..bd0cd9d61 100644 --- a/js/src/modals/SMSVerification/QueryCode/queryCode.js +++ b/js/src/modals/SMSVerification/QueryCode/queryCode.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SendConfirmation/index.js b/js/src/modals/SMSVerification/SendConfirmation/index.js index 498a8572e..92aa40c61 100644 --- a/js/src/modals/SMSVerification/SendConfirmation/index.js +++ b/js/src/modals/SMSVerification/SendConfirmation/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js b/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js index a0cc13689..72ffe5828 100644 --- a/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js +++ b/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SendRequest/index.js b/js/src/modals/SMSVerification/SendRequest/index.js index 1a8bfaf73..ab7d00d59 100644 --- a/js/src/modals/SMSVerification/SendRequest/index.js +++ b/js/src/modals/SMSVerification/SendRequest/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SendRequest/sendRequest.js b/js/src/modals/SMSVerification/SendRequest/sendRequest.js index 933de9265..369c4bded 100644 --- a/js/src/modals/SMSVerification/SendRequest/sendRequest.js +++ b/js/src/modals/SMSVerification/SendRequest/sendRequest.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/AwaitingDepositStep/awaitingDepositStep.js b/js/src/modals/Shapeshift/AwaitingDepositStep/awaitingDepositStep.js index 73d1de300..8dfd29f33 100644 --- a/js/src/modals/Shapeshift/AwaitingDepositStep/awaitingDepositStep.js +++ b/js/src/modals/Shapeshift/AwaitingDepositStep/awaitingDepositStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/AwaitingDepositStep/index.js b/js/src/modals/Shapeshift/AwaitingDepositStep/index.js index e888b6b81..0c9eb1b73 100644 --- a/js/src/modals/Shapeshift/AwaitingDepositStep/index.js +++ b/js/src/modals/Shapeshift/AwaitingDepositStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/AwaitingExchangeStep/awaitingExchangeStep.js b/js/src/modals/Shapeshift/AwaitingExchangeStep/awaitingExchangeStep.js index 17845526a..d3e0ce93c 100644 --- a/js/src/modals/Shapeshift/AwaitingExchangeStep/awaitingExchangeStep.js +++ b/js/src/modals/Shapeshift/AwaitingExchangeStep/awaitingExchangeStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/AwaitingExchangeStep/index.js b/js/src/modals/Shapeshift/AwaitingExchangeStep/index.js index 215fea893..a6daefbc5 100644 --- a/js/src/modals/Shapeshift/AwaitingExchangeStep/index.js +++ b/js/src/modals/Shapeshift/AwaitingExchangeStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/CompletedStep/completedStep.js b/js/src/modals/Shapeshift/CompletedStep/completedStep.js index d20a2e7b8..2b5a6b162 100644 --- a/js/src/modals/Shapeshift/CompletedStep/completedStep.js +++ b/js/src/modals/Shapeshift/CompletedStep/completedStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/CompletedStep/index.js b/js/src/modals/Shapeshift/CompletedStep/index.js index 64e1d6199..ce90188a9 100644 --- a/js/src/modals/Shapeshift/CompletedStep/index.js +++ b/js/src/modals/Shapeshift/CompletedStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/ErrorStep/errorStep.js b/js/src/modals/Shapeshift/ErrorStep/errorStep.js index 52be49bbc..092494399 100644 --- a/js/src/modals/Shapeshift/ErrorStep/errorStep.js +++ b/js/src/modals/Shapeshift/ErrorStep/errorStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/ErrorStep/index.js b/js/src/modals/Shapeshift/ErrorStep/index.js index 93379cab9..5de8b27b1 100644 --- a/js/src/modals/Shapeshift/ErrorStep/index.js +++ b/js/src/modals/Shapeshift/ErrorStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/OptionsStep/index.js b/js/src/modals/Shapeshift/OptionsStep/index.js index 18b819c67..694b55c66 100644 --- a/js/src/modals/Shapeshift/OptionsStep/index.js +++ b/js/src/modals/Shapeshift/OptionsStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/OptionsStep/optionsStep.js b/js/src/modals/Shapeshift/OptionsStep/optionsStep.js index fc4dabfc0..4314d2b5c 100644 --- a/js/src/modals/Shapeshift/OptionsStep/optionsStep.js +++ b/js/src/modals/Shapeshift/OptionsStep/optionsStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/Price/index.js b/js/src/modals/Shapeshift/Price/index.js index 920094acf..2869dbbc7 100644 --- a/js/src/modals/Shapeshift/Price/index.js +++ b/js/src/modals/Shapeshift/Price/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/Price/price.js b/js/src/modals/Shapeshift/Price/price.js index 557d4fa68..206587448 100644 --- a/js/src/modals/Shapeshift/Price/price.js +++ b/js/src/modals/Shapeshift/Price/price.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/Value/index.js b/js/src/modals/Shapeshift/Value/index.js index 588b4c421..76a2eaacb 100644 --- a/js/src/modals/Shapeshift/Value/index.js +++ b/js/src/modals/Shapeshift/Value/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/Value/value.js b/js/src/modals/Shapeshift/Value/value.js index e3c3050fb..1d2f63daf 100644 --- a/js/src/modals/Shapeshift/Value/value.js +++ b/js/src/modals/Shapeshift/Value/value.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/Details/details.js b/js/src/modals/Transfer/Details/details.js index 20ac06f85..d8ddb0b25 100644 --- a/js/src/modals/Transfer/Details/details.js +++ b/js/src/modals/Transfer/Details/details.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/Details/index.js b/js/src/modals/Transfer/Details/index.js index d0bf396b6..175c98966 100644 --- a/js/src/modals/Transfer/Details/index.js +++ b/js/src/modals/Transfer/Details/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/Extras/extras.js b/js/src/modals/Transfer/Extras/extras.js index def5a22c6..e60fd122e 100644 --- a/js/src/modals/Transfer/Extras/extras.js +++ b/js/src/modals/Transfer/Extras/extras.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/Extras/index.js b/js/src/modals/Transfer/Extras/index.js index 0b4d22a2e..751466c85 100644 --- a/js/src/modals/Transfer/Extras/index.js +++ b/js/src/modals/Transfer/Extras/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/store.js b/js/src/modals/Transfer/store.js index 412cac60c..679e03609 100644 --- a/js/src/modals/Transfer/store.js +++ b/js/src/modals/Transfer/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/transfer.js b/js/src/modals/Transfer/transfer.js index 1ecc60edf..19c337e5a 100644 --- a/js/src/modals/Transfer/transfer.js +++ b/js/src/modals/Transfer/transfer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/WalletSettings/walletSettings.js b/js/src/modals/WalletSettings/walletSettings.js index 1b2b2cc1a..00b5d3d12 100644 --- a/js/src/modals/WalletSettings/walletSettings.js +++ b/js/src/modals/WalletSettings/walletSettings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/balancesActions.js b/js/src/redux/providers/balancesActions.js index f8cfb2c1e..36e3fbb7c 100644 --- a/js/src/redux/providers/balancesActions.js +++ b/js/src/redux/providers/balancesActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/certifications/actions.js b/js/src/redux/providers/certifications/actions.js index c84f7db55..03bb93fe9 100644 --- a/js/src/redux/providers/certifications/actions.js +++ b/js/src/redux/providers/certifications/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/certifications/middleware.js b/js/src/redux/providers/certifications/middleware.js index a5406051f..500fe39b3 100644 --- a/js/src/redux/providers/certifications/middleware.js +++ b/js/src/redux/providers/certifications/middleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/certifications/reducer.js b/js/src/redux/providers/certifications/reducer.js index 87b0dfd33..f9195b1df 100644 --- a/js/src/redux/providers/certifications/reducer.js +++ b/js/src/redux/providers/certifications/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/signerMiddleware.js b/js/src/redux/providers/signerMiddleware.js index c0c5d7613..018e01e59 100644 --- a/js/src/redux/providers/signerMiddleware.js +++ b/js/src/redux/providers/signerMiddleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/walletActions.js b/js/src/redux/providers/walletActions.js index 4a8a3f82a..6bae2b3b5 100644 --- a/js/src/redux/providers/walletActions.js +++ b/js/src/redux/providers/walletActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Export/export.js b/js/src/ui/Actionbar/Export/export.js index a8cf826ae..d3cb4bd17 100644 --- a/js/src/ui/Actionbar/Export/export.js +++ b/js/src/ui/Actionbar/Export/export.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Export/index.js b/js/src/ui/Actionbar/Export/index.js index f4ac7092e..89cc3d066 100644 --- a/js/src/ui/Actionbar/Export/index.js +++ b/js/src/ui/Actionbar/Export/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Import/import.js b/js/src/ui/Actionbar/Import/import.js index 091153c95..fcf51a53e 100644 --- a/js/src/ui/Actionbar/Import/import.js +++ b/js/src/ui/Actionbar/Import/import.js @@ -1,4 +1,4 @@ - // Copyright 2015, 2016 Ethcore (UK) Ltd. + // Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Import/index.js b/js/src/ui/Actionbar/Import/index.js index d2f352cf3..f6a1b16e1 100644 --- a/js/src/ui/Actionbar/Import/index.js +++ b/js/src/ui/Actionbar/Import/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Search/index.js b/js/src/ui/Actionbar/Search/index.js index f51d38a6f..f06425e4f 100644 --- a/js/src/ui/Actionbar/Search/index.js +++ b/js/src/ui/Actionbar/Search/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Search/search.js b/js/src/ui/Actionbar/Search/search.js index 9385cb593..30d8117bd 100644 --- a/js/src/ui/Actionbar/Search/search.js +++ b/js/src/ui/Actionbar/Search/search.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Sort/index.js b/js/src/ui/Actionbar/Sort/index.js index 82855931c..a4a02e01d 100644 --- a/js/src/ui/Actionbar/Sort/index.js +++ b/js/src/ui/Actionbar/Sort/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Sort/sort.js b/js/src/ui/Actionbar/Sort/sort.js index 545775ead..eb0c672fb 100644 --- a/js/src/ui/Actionbar/Sort/sort.js +++ b/js/src/ui/Actionbar/Sort/sort.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Sort/sortStore.js b/js/src/ui/Actionbar/Sort/sortStore.js index 2bcbd3753..84084c4b7 100644 --- a/js/src/ui/Actionbar/Sort/sortStore.js +++ b/js/src/ui/Actionbar/Sort/sortStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/Title/index.js b/js/src/ui/Container/Title/index.js index 8ddd68683..35486c1cb 100644 --- a/js/src/ui/Container/Title/index.js +++ b/js/src/ui/Container/Title/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/Title/title.js b/js/src/ui/Container/Title/title.js index 1506ecaf6..de25b818c 100644 --- a/js/src/ui/Container/Title/title.js +++ b/js/src/ui/Container/Title/title.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/Title/title.spec.js b/js/src/ui/Container/Title/title.spec.js index a65e221a6..2d5335c14 100644 --- a/js/src/ui/Container/Title/title.spec.js +++ b/js/src/ui/Container/Title/title.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ContextProvider/contextProvider.js b/js/src/ui/ContextProvider/contextProvider.js index 543730c40..c38bda143 100644 --- a/js/src/ui/ContextProvider/contextProvider.js +++ b/js/src/ui/ContextProvider/contextProvider.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Editor/mode-solidity.js b/js/src/ui/Editor/mode-solidity.js index 0d1b95c67..5a74ecb11 100644 --- a/js/src/ui/Editor/mode-solidity.js +++ b/js/src/ui/Editor/mode-solidity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/AddressSelect/addressSelect.js b/js/src/ui/Form/AddressSelect/addressSelect.js index 0cd92c5c8..3fb15cd86 100644 --- a/js/src/ui/Form/AddressSelect/addressSelect.js +++ b/js/src/ui/Form/AddressSelect/addressSelect.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/AddressSelect/index.js b/js/src/ui/Form/AddressSelect/index.js index 58059cd2e..3caaa526d 100644 --- a/js/src/ui/Form/AddressSelect/index.js +++ b/js/src/ui/Form/AddressSelect/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/AutoComplete/autocomplete.js b/js/src/ui/Form/AutoComplete/autocomplete.js index d11ae7cc5..c98019009 100644 --- a/js/src/ui/Form/AutoComplete/autocomplete.js +++ b/js/src/ui/Form/AutoComplete/autocomplete.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/AutoComplete/index.js b/js/src/ui/Form/AutoComplete/index.js index 509a99444..3e3e0afb2 100644 --- a/js/src/ui/Form/AutoComplete/index.js +++ b/js/src/ui/Form/AutoComplete/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/FormWrap/formWrap.js b/js/src/ui/Form/FormWrap/formWrap.js index ba3f0a957..9982a8ed7 100644 --- a/js/src/ui/Form/FormWrap/formWrap.js +++ b/js/src/ui/Form/FormWrap/formWrap.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/FormWrap/index.js b/js/src/ui/Form/FormWrap/index.js index 97c1b0181..a73e22f3d 100644 --- a/js/src/ui/Form/FormWrap/index.js +++ b/js/src/ui/Form/FormWrap/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/Input/index.js b/js/src/ui/Form/Input/index.js index 3d9d9293e..4a4d16674 100644 --- a/js/src/ui/Form/Input/index.js +++ b/js/src/ui/Form/Input/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/Input/input.js b/js/src/ui/Form/Input/input.js index f25ce207c..b11400d04 100644 --- a/js/src/ui/Form/Input/input.js +++ b/js/src/ui/Form/Input/input.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputAddress/index.js b/js/src/ui/Form/InputAddress/index.js index b0bb94c94..64d6cd722 100644 --- a/js/src/ui/Form/InputAddress/index.js +++ b/js/src/ui/Form/InputAddress/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputAddress/inputAddress.js b/js/src/ui/Form/InputAddress/inputAddress.js index f403cf311..1f062382a 100644 --- a/js/src/ui/Form/InputAddress/inputAddress.js +++ b/js/src/ui/Form/InputAddress/inputAddress.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputAddressSelect/index.js b/js/src/ui/Form/InputAddressSelect/index.js index 19493b1ce..4eda78ce5 100644 --- a/js/src/ui/Form/InputAddressSelect/index.js +++ b/js/src/ui/Form/InputAddressSelect/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputAddressSelect/inputAddressSelect.js b/js/src/ui/Form/InputAddressSelect/inputAddressSelect.js index b7bfbf375..59fb81458 100644 --- a/js/src/ui/Form/InputAddressSelect/inputAddressSelect.js +++ b/js/src/ui/Form/InputAddressSelect/inputAddressSelect.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputChip/index.js b/js/src/ui/Form/InputChip/index.js index 74bf603fe..fe9177039 100644 --- a/js/src/ui/Form/InputChip/index.js +++ b/js/src/ui/Form/InputChip/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputChip/inputChip.js b/js/src/ui/Form/InputChip/inputChip.js index 1b06c01d7..09a00778a 100644 --- a/js/src/ui/Form/InputChip/inputChip.js +++ b/js/src/ui/Form/InputChip/inputChip.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputInline/index.js b/js/src/ui/Form/InputInline/index.js index e2a1886be..44e2c7563 100644 --- a/js/src/ui/Form/InputInline/index.js +++ b/js/src/ui/Form/InputInline/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputInline/inputInline.js b/js/src/ui/Form/InputInline/inputInline.js index 92a54e2a3..02b93a90f 100644 --- a/js/src/ui/Form/InputInline/inputInline.js +++ b/js/src/ui/Form/InputInline/inputInline.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/RadioButtons/index.js b/js/src/ui/Form/RadioButtons/index.js index c708eb728..44097481b 100644 --- a/js/src/ui/Form/RadioButtons/index.js +++ b/js/src/ui/Form/RadioButtons/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/RadioButtons/radioButtons.js b/js/src/ui/Form/RadioButtons/radioButtons.js index b417857e0..d9489c6aa 100644 --- a/js/src/ui/Form/RadioButtons/radioButtons.js +++ b/js/src/ui/Form/RadioButtons/radioButtons.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/Select/index.js b/js/src/ui/Form/Select/index.js index 471dad14a..fb1c1e4c0 100644 --- a/js/src/ui/Form/Select/index.js +++ b/js/src/ui/Form/Select/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/Select/select.js b/js/src/ui/Form/Select/select.js index b966f483c..c6dae8b61 100644 --- a/js/src/ui/Form/Select/select.js +++ b/js/src/ui/Form/Select/select.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/TypedInput/index.js b/js/src/ui/Form/TypedInput/index.js index 9c12bf7eb..8b73aa1b6 100644 --- a/js/src/ui/Form/TypedInput/index.js +++ b/js/src/ui/Form/TypedInput/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/TypedInput/typedInput.js b/js/src/ui/Form/TypedInput/typedInput.js index a54032999..6383e62bc 100644 --- a/js/src/ui/Form/TypedInput/typedInput.js +++ b/js/src/ui/Form/TypedInput/typedInput.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/gasPriceEditor.js b/js/src/ui/GasPriceEditor/gasPriceEditor.js index 423afc45b..e98707410 100644 --- a/js/src/ui/GasPriceEditor/gasPriceEditor.js +++ b/js/src/ui/GasPriceEditor/gasPriceEditor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/gasPriceEditor.spec.js b/js/src/ui/GasPriceEditor/gasPriceEditor.spec.js index 4197bc876..336ec5c7e 100644 --- a/js/src/ui/GasPriceEditor/gasPriceEditor.spec.js +++ b/js/src/ui/GasPriceEditor/gasPriceEditor.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/store.js b/js/src/ui/GasPriceEditor/store.js index 4fc16b83c..22867fdd0 100644 --- a/js/src/ui/GasPriceEditor/store.js +++ b/js/src/ui/GasPriceEditor/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/store.spec.js b/js/src/ui/GasPriceEditor/store.spec.js index bbee1b8c4..889eee4db 100644 --- a/js/src/ui/GasPriceEditor/store.spec.js +++ b/js/src/ui/GasPriceEditor/store.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/CustomBar/customBar.js b/js/src/ui/GasPriceSelector/CustomBar/customBar.js index 60f066f97..2d53ee874 100644 --- a/js/src/ui/GasPriceSelector/CustomBar/customBar.js +++ b/js/src/ui/GasPriceSelector/CustomBar/customBar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/CustomBar/index.js b/js/src/ui/GasPriceSelector/CustomBar/index.js index fa4008e42..ccf57e5c6 100644 --- a/js/src/ui/GasPriceSelector/CustomBar/index.js +++ b/js/src/ui/GasPriceSelector/CustomBar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/CustomCursor/customCursor.js b/js/src/ui/GasPriceSelector/CustomCursor/customCursor.js index 8ce9a0e42..48f22f38a 100644 --- a/js/src/ui/GasPriceSelector/CustomCursor/customCursor.js +++ b/js/src/ui/GasPriceSelector/CustomCursor/customCursor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/CustomCursor/index.js b/js/src/ui/GasPriceSelector/CustomCursor/index.js index 8129d97f0..3c435fe37 100644 --- a/js/src/ui/GasPriceSelector/CustomCursor/index.js +++ b/js/src/ui/GasPriceSelector/CustomCursor/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/CustomShape/customShape.js b/js/src/ui/GasPriceSelector/CustomShape/customShape.js index 1c721ab35..2d62e6cd9 100644 --- a/js/src/ui/GasPriceSelector/CustomShape/customShape.js +++ b/js/src/ui/GasPriceSelector/CustomShape/customShape.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/CustomShape/index.js b/js/src/ui/GasPriceSelector/CustomShape/index.js index 663c6b91b..fc1ed7a32 100644 --- a/js/src/ui/GasPriceSelector/CustomShape/index.js +++ b/js/src/ui/GasPriceSelector/CustomShape/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/CustomTooltip/customTooltip.js b/js/src/ui/GasPriceSelector/CustomTooltip/customTooltip.js index 4fd165cb0..db0e216d3 100644 --- a/js/src/ui/GasPriceSelector/CustomTooltip/customTooltip.js +++ b/js/src/ui/GasPriceSelector/CustomTooltip/customTooltip.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/CustomTooltip/index.js b/js/src/ui/GasPriceSelector/CustomTooltip/index.js index a16f9d2f9..567f6765f 100644 --- a/js/src/ui/GasPriceSelector/CustomTooltip/index.js +++ b/js/src/ui/GasPriceSelector/CustomTooltip/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/gasPriceSelector.js b/js/src/ui/GasPriceSelector/gasPriceSelector.js index e37dc8b39..c7173ed33 100644 --- a/js/src/ui/GasPriceSelector/gasPriceSelector.js +++ b/js/src/ui/GasPriceSelector/gasPriceSelector.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/index.js b/js/src/ui/GasPriceSelector/index.js index 958075867..ab7773447 100644 --- a/js/src/ui/GasPriceSelector/index.js +++ b/js/src/ui/GasPriceSelector/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceSelector/util.js b/js/src/ui/GasPriceSelector/util.js index 63c3e89b0..a3d2233c1 100644 --- a/js/src/ui/GasPriceSelector/util.js +++ b/js/src/ui/GasPriceSelector/util.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/LanguageSelector/index.js b/js/src/ui/LanguageSelector/index.js index 772167d14..4f541eb26 100644 --- a/js/src/ui/LanguageSelector/index.js +++ b/js/src/ui/LanguageSelector/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/LanguageSelector/languageSelector.js b/js/src/ui/LanguageSelector/languageSelector.js index db8949510..f1c018f8e 100644 --- a/js/src/ui/LanguageSelector/languageSelector.js +++ b/js/src/ui/LanguageSelector/languageSelector.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/MethodDecoding/methodDecoding.js b/js/src/ui/MethodDecoding/methodDecoding.js index efb22b67b..e02355ffb 100644 --- a/js/src/ui/MethodDecoding/methodDecoding.js +++ b/js/src/ui/MethodDecoding/methodDecoding.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Busy/busy.js b/js/src/ui/Modal/Busy/busy.js index 6898d3e1f..5bbf8b010 100644 --- a/js/src/ui/Modal/Busy/busy.js +++ b/js/src/ui/Modal/Busy/busy.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Busy/index.js b/js/src/ui/Modal/Busy/index.js index 27c097eea..40a618b3b 100644 --- a/js/src/ui/Modal/Busy/index.js +++ b/js/src/ui/Modal/Busy/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Completed/completed.js b/js/src/ui/Modal/Completed/completed.js index de6195621..09352d435 100644 --- a/js/src/ui/Modal/Completed/completed.js +++ b/js/src/ui/Modal/Completed/completed.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Completed/index.js b/js/src/ui/Modal/Completed/index.js index 3e79033d8..229229ced 100644 --- a/js/src/ui/Modal/Completed/index.js +++ b/js/src/ui/Modal/Completed/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Title/index.js b/js/src/ui/Modal/Title/index.js index 8ddd68683..35486c1cb 100644 --- a/js/src/ui/Modal/Title/index.js +++ b/js/src/ui/Modal/Title/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Title/title.js b/js/src/ui/Modal/Title/title.js index b483af061..14308ee0b 100644 --- a/js/src/ui/Modal/Title/title.js +++ b/js/src/ui/Modal/Title/title.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/Tooltip/index.js b/js/src/ui/Tooltips/Tooltip/index.js index f24757da2..e0a7d3000 100644 --- a/js/src/ui/Tooltips/Tooltip/index.js +++ b/js/src/ui/Tooltips/Tooltip/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/Tooltip/tooltip.js b/js/src/ui/Tooltips/Tooltip/tooltip.js index a36d124f3..b7431050a 100644 --- a/js/src/ui/Tooltips/Tooltip/tooltip.js +++ b/js/src/ui/Tooltips/Tooltip/tooltip.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/TxRow/index.js b/js/src/ui/TxList/TxRow/index.js index 90243cd5f..f3c75ac7e 100644 --- a/js/src/ui/TxList/TxRow/index.js +++ b/js/src/ui/TxList/TxRow/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/TxRow/txRow.js b/js/src/ui/TxList/TxRow/txRow.js index 98e948a38..35a386df0 100644 --- a/js/src/ui/TxList/TxRow/txRow.js +++ b/js/src/ui/TxList/TxRow/txRow.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/TxRow/txRow.spec.js b/js/src/ui/TxList/TxRow/txRow.spec.js index 64baa2fe7..ddee9024c 100644 --- a/js/src/ui/TxList/TxRow/txRow.spec.js +++ b/js/src/ui/TxList/TxRow/txRow.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/index.js b/js/src/ui/index.js index 636685410..e1ebb16a6 100644 --- a/js/src/ui/index.js +++ b/js/src/ui/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/Header/header.js b/js/src/views/Account/Header/header.js index 7df87bd9c..b2e0a9c28 100644 --- a/js/src/views/Account/Header/header.js +++ b/js/src/views/Account/Header/header.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/Header/index.js b/js/src/views/Account/Header/index.js index 4a5121906..ba1f0b63c 100644 --- a/js/src/views/Account/Header/index.js +++ b/js/src/views/Account/Header/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/Transactions/index.js b/js/src/views/Account/Transactions/index.js index f74dcd5e8..61c6a8aad 100644 --- a/js/src/views/Account/Transactions/index.js +++ b/js/src/views/Account/Transactions/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/Transactions/transactions.js b/js/src/views/Account/Transactions/transactions.js index 2e98208b6..b8b28208f 100644 --- a/js/src/views/Account/Transactions/transactions.js +++ b/js/src/views/Account/Transactions/transactions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/account.js b/js/src/views/Account/account.js index 840de05b9..9e4c56166 100644 --- a/js/src/views/Account/account.js +++ b/js/src/views/Account/account.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/List/index.js b/js/src/views/Accounts/List/index.js index 11950acfa..5ec2cb322 100644 --- a/js/src/views/Accounts/List/index.js +++ b/js/src/views/Accounts/List/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/List/list.js b/js/src/views/Accounts/List/list.js index 4d54b640f..f08c9fdb0 100644 --- a/js/src/views/Accounts/List/list.js +++ b/js/src/views/Accounts/List/list.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/Summary/index.js b/js/src/views/Accounts/Summary/index.js index 7cc23b215..980ecff9a 100644 --- a/js/src/views/Accounts/Summary/index.js +++ b/js/src/views/Accounts/Summary/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/Summary/summary.js b/js/src/views/Accounts/Summary/summary.js index a19b9a9de..98d4642fd 100644 --- a/js/src/views/Accounts/Summary/summary.js +++ b/js/src/views/Accounts/Summary/summary.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/accounts.js b/js/src/views/Accounts/accounts.js index a844ae989..70b6f770a 100644 --- a/js/src/views/Accounts/accounts.js +++ b/js/src/views/Accounts/accounts.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Address/Delete/delete.js b/js/src/views/Address/Delete/delete.js index 2d19f2141..beaf42867 100644 --- a/js/src/views/Address/Delete/delete.js +++ b/js/src/views/Address/Delete/delete.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Address/Delete/index.js b/js/src/views/Address/Delete/index.js index 8d2a51500..9ce1b6a1d 100644 --- a/js/src/views/Address/Delete/index.js +++ b/js/src/views/Address/Delete/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Address/address.js b/js/src/views/Address/address.js index 9c39203ba..8798e8262 100644 --- a/js/src/views/Address/address.js +++ b/js/src/views/Address/address.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Addresses/addresses.js b/js/src/views/Addresses/addresses.js index 609f029c7..faa6a1a32 100644 --- a/js/src/views/Addresses/addresses.js +++ b/js/src/views/Addresses/addresses.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Container/container.js b/js/src/views/Application/Container/container.js index 592e5a340..c5cd529a5 100644 --- a/js/src/views/Application/Container/container.js +++ b/js/src/views/Application/Container/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Container/index.js b/js/src/views/Application/Container/index.js index 87fbc567e..5ad841661 100644 --- a/js/src/views/Application/Container/index.js +++ b/js/src/views/Application/Container/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/DappContainer/dappContainer.js b/js/src/views/Application/DappContainer/dappContainer.js index 13ecde190..8c5baa684 100644 --- a/js/src/views/Application/DappContainer/dappContainer.js +++ b/js/src/views/Application/DappContainer/dappContainer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/DappContainer/index.js b/js/src/views/Application/DappContainer/index.js index 21837d4b1..ec666b815 100644 --- a/js/src/views/Application/DappContainer/index.js +++ b/js/src/views/Application/DappContainer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/FrameError/frameError.js b/js/src/views/Application/FrameError/frameError.js index 35d2493b0..fed9b4df0 100644 --- a/js/src/views/Application/FrameError/frameError.js +++ b/js/src/views/Application/FrameError/frameError.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/FrameError/index.js b/js/src/views/Application/FrameError/index.js index e4358d46d..9ee2947e0 100644 --- a/js/src/views/Application/FrameError/index.js +++ b/js/src/views/Application/FrameError/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Snackbar/index.js b/js/src/views/Application/Snackbar/index.js index 0da39f236..35c7df997 100644 --- a/js/src/views/Application/Snackbar/index.js +++ b/js/src/views/Application/Snackbar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Snackbar/snackbar.js b/js/src/views/Application/Snackbar/snackbar.js index f7232069a..5f105db14 100644 --- a/js/src/views/Application/Snackbar/snackbar.js +++ b/js/src/views/Application/Snackbar/snackbar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Status/index.js b/js/src/views/Application/Status/index.js index 44079b224..f966050e9 100644 --- a/js/src/views/Application/Status/index.js +++ b/js/src/views/Application/Status/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Status/status.js b/js/src/views/Application/Status/status.js index bb48ce6f8..8d7724838 100644 --- a/js/src/views/Application/Status/status.js +++ b/js/src/views/Application/Status/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/TabBar/index.js b/js/src/views/Application/TabBar/index.js index d1a5eacbe..5af9fe77c 100644 --- a/js/src/views/Application/TabBar/index.js +++ b/js/src/views/Application/TabBar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/TabBar/tabBar.js b/js/src/views/Application/TabBar/tabBar.js index ad2bfb779..81be1d294 100644 --- a/js/src/views/Application/TabBar/tabBar.js +++ b/js/src/views/Application/TabBar/tabBar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/application.js b/js/src/views/Application/application.js index d95484970..c536f10df 100644 --- a/js/src/views/Application/application.js +++ b/js/src/views/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Events/Event/event.js b/js/src/views/Contract/Events/Event/event.js index 1ed114d07..f5ca34910 100644 --- a/js/src/views/Contract/Events/Event/event.js +++ b/js/src/views/Contract/Events/Event/event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Events/Event/index.js b/js/src/views/Contract/Events/Event/index.js index 0925882d3..a6d44701a 100644 --- a/js/src/views/Contract/Events/Event/index.js +++ b/js/src/views/Contract/Events/Event/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Events/events.js b/js/src/views/Contract/Events/events.js index c29e624bf..dba05dfd9 100644 --- a/js/src/views/Contract/Events/events.js +++ b/js/src/views/Contract/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Events/index.js b/js/src/views/Contract/Events/index.js index 88ad6d407..d2c722d81 100644 --- a/js/src/views/Contract/Events/index.js +++ b/js/src/views/Contract/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Queries/index.js b/js/src/views/Contract/Queries/index.js index 7a0dd9290..65e731587 100644 --- a/js/src/views/Contract/Queries/index.js +++ b/js/src/views/Contract/Queries/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Queries/inputQuery.js b/js/src/views/Contract/Queries/inputQuery.js index 4ebdc62db..9d3cf279d 100644 --- a/js/src/views/Contract/Queries/inputQuery.js +++ b/js/src/views/Contract/Queries/inputQuery.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Queries/queries.js b/js/src/views/Contract/Queries/queries.js index 1bfd2fa5f..fff7adb6b 100644 --- a/js/src/views/Contract/Queries/queries.js +++ b/js/src/views/Contract/Queries/queries.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/contract.js b/js/src/views/Contract/contract.js index e501e4fe5..38447911f 100644 --- a/js/src/views/Contract/contract.js +++ b/js/src/views/Contract/contract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contracts/Summary/index.js b/js/src/views/Contracts/Summary/index.js index 7cc23b215..980ecff9a 100644 --- a/js/src/views/Contracts/Summary/index.js +++ b/js/src/views/Contracts/Summary/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contracts/Summary/summary.js b/js/src/views/Contracts/Summary/summary.js index 5b34a6b51..36e88f039 100644 --- a/js/src/views/Contracts/Summary/summary.js +++ b/js/src/views/Contracts/Summary/summary.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contracts/contracts.js b/js/src/views/Contracts/contracts.js index 1e15c3947..cc292275a 100644 --- a/js/src/views/Contracts/contracts.js +++ b/js/src/views/Contracts/contracts.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/AddDapps/AddDapps.js b/js/src/views/Dapps/AddDapps/AddDapps.js index d3876998a..cc2b60552 100644 --- a/js/src/views/Dapps/AddDapps/AddDapps.js +++ b/js/src/views/Dapps/AddDapps/AddDapps.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/AddDapps/index.js b/js/src/views/Dapps/AddDapps/index.js index 6014c7315..209e1e54c 100644 --- a/js/src/views/Dapps/AddDapps/index.js +++ b/js/src/views/Dapps/AddDapps/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/Summary/index.js b/js/src/views/Dapps/Summary/index.js index 7cc23b215..980ecff9a 100644 --- a/js/src/views/Dapps/Summary/index.js +++ b/js/src/views/Dapps/Summary/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/Summary/summary.js b/js/src/views/Dapps/Summary/summary.js index 76045ff70..154ce15b1 100644 --- a/js/src/views/Dapps/Summary/summary.js +++ b/js/src/views/Dapps/Summary/summary.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/dapps.js b/js/src/views/Dapps/dapps.js index 160bb44b0..07bdcd758 100644 --- a/js/src/views/Dapps/dapps.js +++ b/js/src/views/Dapps/dapps.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Background/background.js b/js/src/views/Settings/Background/background.js index add58d820..ada8f4e60 100644 --- a/js/src/views/Settings/Background/background.js +++ b/js/src/views/Settings/Background/background.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Background/index.js b/js/src/views/Settings/Background/index.js index ffd3111f7..5211138b7 100644 --- a/js/src/views/Settings/Background/index.js +++ b/js/src/views/Settings/Background/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Parity/index.js b/js/src/views/Settings/Parity/index.js index 38f08f725..c76208e92 100644 --- a/js/src/views/Settings/Parity/index.js +++ b/js/src/views/Settings/Parity/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Parity/parity.js b/js/src/views/Settings/Parity/parity.js index 29fab8bfb..978ef296f 100644 --- a/js/src/views/Settings/Parity/parity.js +++ b/js/src/views/Settings/Parity/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Proxy/index.js b/js/src/views/Settings/Proxy/index.js index 5d65ef153..94aae9c57 100644 --- a/js/src/views/Settings/Proxy/index.js +++ b/js/src/views/Settings/Proxy/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Proxy/proxy.js b/js/src/views/Settings/Proxy/proxy.js index 45aece13b..dba95d458 100644 --- a/js/src/views/Settings/Proxy/proxy.js +++ b/js/src/views/Settings/Proxy/proxy.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Views/defaults.js b/js/src/views/Settings/Views/defaults.js index 9c7971ce5..bdd6ae29c 100644 --- a/js/src/views/Settings/Views/defaults.js +++ b/js/src/views/Settings/Views/defaults.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Views/index.js b/js/src/views/Settings/Views/index.js index cc189d4ca..e4ba26c56 100644 --- a/js/src/views/Settings/Views/index.js +++ b/js/src/views/Settings/Views/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Views/views.js b/js/src/views/Settings/Views/views.js index 125239687..85b811876 100644 --- a/js/src/views/Settings/Views/views.js +++ b/js/src/views/Settings/Views/views.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/settings.js b/js/src/views/Settings/settings.js index 90bec3c62..dbf0043e4 100644 --- a/js/src/views/Settings/settings.js +++ b/js/src/views/Settings/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/Account/AccountLink/accountLink.js b/js/src/views/Signer/components/Account/AccountLink/accountLink.js index 4a5578acf..c4bc362c1 100644 --- a/js/src/views/Signer/components/Account/AccountLink/accountLink.js +++ b/js/src/views/Signer/components/Account/AccountLink/accountLink.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/Account/AccountLink/index.js b/js/src/views/Signer/components/Account/AccountLink/index.js index 6c50400f5..7828ec929 100644 --- a/js/src/views/Signer/components/Account/AccountLink/index.js +++ b/js/src/views/Signer/components/Account/AccountLink/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/Account/account.js b/js/src/views/Signer/components/Account/account.js index 79fe04d55..dbe950b75 100644 --- a/js/src/views/Signer/components/Account/account.js +++ b/js/src/views/Signer/components/Account/account.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/Account/index.js b/js/src/views/Signer/components/Account/index.js index 55c215f7c..75c7cc401 100644 --- a/js/src/views/Signer/components/Account/index.js +++ b/js/src/views/Signer/components/Account/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/RequestPending/index.js b/js/src/views/Signer/components/RequestPending/index.js index d4b048781..a7830885b 100644 --- a/js/src/views/Signer/components/RequestPending/index.js +++ b/js/src/views/Signer/components/RequestPending/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/RequestPending/requestPending.js b/js/src/views/Signer/components/RequestPending/requestPending.js index 67195888a..84783a614 100644 --- a/js/src/views/Signer/components/RequestPending/requestPending.js +++ b/js/src/views/Signer/components/RequestPending/requestPending.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/SignRequest/index.js b/js/src/views/Signer/components/SignRequest/index.js index 0fe59540e..8485f6109 100644 --- a/js/src/views/Signer/components/SignRequest/index.js +++ b/js/src/views/Signer/components/SignRequest/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/SignRequest/signRequest.js b/js/src/views/Signer/components/SignRequest/signRequest.js index 91acddc34..783e5b9f6 100644 --- a/js/src/views/Signer/components/SignRequest/signRequest.js +++ b/js/src/views/Signer/components/SignRequest/signRequest.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/SignRequest/signRequest.spec.js b/js/src/views/Signer/components/SignRequest/signRequest.spec.js index 53099bb9c..f7d761e58 100644 --- a/js/src/views/Signer/components/SignRequest/signRequest.spec.js +++ b/js/src/views/Signer/components/SignRequest/signRequest.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionMainDetails/index.js b/js/src/views/Signer/components/TransactionMainDetails/index.js index 73420d333..2c4ec0e77 100644 --- a/js/src/views/Signer/components/TransactionMainDetails/index.js +++ b/js/src/views/Signer/components/TransactionMainDetails/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.js b/js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.js index 1999cfe7f..319c5ae98 100644 --- a/js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.js +++ b/js/src/views/Signer/components/TransactionMainDetails/transactionMainDetails.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPending/index.js b/js/src/views/Signer/components/TransactionPending/index.js index 3581c448c..3524dffb4 100644 --- a/js/src/views/Signer/components/TransactionPending/index.js +++ b/js/src/views/Signer/components/TransactionPending/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPending/transactionPending.js b/js/src/views/Signer/components/TransactionPending/transactionPending.js index eea9491ee..dc07de99a 100644 --- a/js/src/views/Signer/components/TransactionPending/transactionPending.js +++ b/js/src/views/Signer/components/TransactionPending/transactionPending.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js index 254fb5971..733e1ebc0 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js index f343c1f31..360125d9f 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/transactionPendingFormConfirm.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js index f8c37266f..82c9aa359 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/transactionPendingFormReject.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/transactionPendingFormReject.js index 890dd3750..def8aae08 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/transactionPendingFormReject.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/transactionPendingFormReject.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/index.js b/js/src/views/Signer/components/TransactionPendingForm/index.js index dfdcb41ce..2b58e2148 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/index.js +++ b/js/src/views/Signer/components/TransactionPendingForm/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/transactionPendingForm.js b/js/src/views/Signer/components/TransactionPendingForm/transactionPendingForm.js index 41d50f68e..f6e92761f 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/transactionPendingForm.js +++ b/js/src/views/Signer/components/TransactionPendingForm/transactionPendingForm.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TxHashLink/index.js b/js/src/views/Signer/components/TxHashLink/index.js index f831c9a61..43a7a7c55 100644 --- a/js/src/views/Signer/components/TxHashLink/index.js +++ b/js/src/views/Signer/components/TxHashLink/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TxHashLink/txHashLink.js b/js/src/views/Signer/components/TxHashLink/txHashLink.js index cea3fe602..be92828c1 100644 --- a/js/src/views/Signer/components/TxHashLink/txHashLink.js +++ b/js/src/views/Signer/components/TxHashLink/txHashLink.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/logger.js b/js/src/views/Signer/components/util/logger.js index 671d4de84..4f721fd6c 100644 --- a/js/src/views/Signer/components/util/logger.js +++ b/js/src/views/Signer/components/util/logger.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/react.js b/js/src/views/Signer/components/util/react.js index 095f6e6b0..6cf7298ea 100644 --- a/js/src/views/Signer/components/util/react.js +++ b/js/src/views/Signer/components/util/react.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/transaction.js b/js/src/views/Signer/components/util/transaction.js index 25800e806..49e0c3654 100644 --- a/js/src/views/Signer/components/util/transaction.js +++ b/js/src/views/Signer/components/util/transaction.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/transaction.spec.js b/js/src/views/Signer/components/util/transaction.spec.js index a2022fe2e..294c3140c 100644 --- a/js/src/views/Signer/components/util/transaction.spec.js +++ b/js/src/views/Signer/components/util/transaction.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/util.js b/js/src/views/Signer/components/util/util.js index 095a78d60..865a678ae 100644 --- a/js/src/views/Signer/components/util/util.js +++ b/js/src/views/Signer/components/util/util.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/containers/Embedded/embedded.js b/js/src/views/Signer/containers/Embedded/embedded.js index 51452520b..3fa450473 100644 --- a/js/src/views/Signer/containers/Embedded/embedded.js +++ b/js/src/views/Signer/containers/Embedded/embedded.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/containers/Embedded/index.js b/js/src/views/Signer/containers/Embedded/index.js index ef4265938..21dd49778 100644 --- a/js/src/views/Signer/containers/Embedded/index.js +++ b/js/src/views/Signer/containers/Embedded/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/containers/RequestsPage/index.js b/js/src/views/Signer/containers/RequestsPage/index.js index ee3b54f54..212fef231 100644 --- a/js/src/views/Signer/containers/RequestsPage/index.js +++ b/js/src/views/Signer/containers/RequestsPage/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/containers/RequestsPage/requestsPage.js b/js/src/views/Signer/containers/RequestsPage/requestsPage.js index db52b008e..8f2da6208 100644 --- a/js/src/views/Signer/containers/RequestsPage/requestsPage.js +++ b/js/src/views/Signer/containers/RequestsPage/requestsPage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/utils/extension.js b/js/src/views/Signer/utils/extension.js index a99a72d63..b00e9c4a4 100644 --- a/js/src/views/Signer/utils/extension.js +++ b/js/src/views/Signer/utils/extension.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/utils/utils.js b/js/src/views/Signer/utils/utils.js index 8c231275c..c315eff27 100644 --- a/js/src/views/Signer/utils/utils.js +++ b/js/src/views/Signer/utils/utils.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/app.js b/js/src/views/Status/actions/app.js index d236dd846..84441be96 100644 --- a/js/src/views/Status/actions/app.js +++ b/js/src/views/Status/actions/app.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/clipboard.js b/js/src/views/Status/actions/clipboard.js index 68dc8b8f8..7275bd170 100644 --- a/js/src/views/Status/actions/clipboard.js +++ b/js/src/views/Status/actions/clipboard.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/debug.js b/js/src/views/Status/actions/debug.js index 3cd0c0a43..26a3b6215 100644 --- a/js/src/views/Status/actions/debug.js +++ b/js/src/views/Status/actions/debug.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/localstorage.js b/js/src/views/Status/actions/localstorage.js index 2bf2d2841..0ed6fd3bc 100644 --- a/js/src/views/Status/actions/localstorage.js +++ b/js/src/views/Status/actions/localstorage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/logger.js b/js/src/views/Status/actions/logger.js index 5fc327c03..6758a0743 100644 --- a/js/src/views/Status/actions/logger.js +++ b/js/src/views/Status/actions/logger.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/mining.js b/js/src/views/Status/actions/mining.js index e48544202..8d27dfb68 100644 --- a/js/src/views/Status/actions/mining.js +++ b/js/src/views/Status/actions/mining.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/modify-mining.js b/js/src/views/Status/actions/modify-mining.js index ff959c9f5..13c0fffd2 100644 --- a/js/src/views/Status/actions/modify-mining.js +++ b/js/src/views/Status/actions/modify-mining.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/rpc.js b/js/src/views/Status/actions/rpc.js index 761a77f3d..a296b731f 100644 --- a/js/src/views/Status/actions/rpc.js +++ b/js/src/views/Status/actions/rpc.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/status.js b/js/src/views/Status/actions/status.js index 8980e34c4..e765d9f98 100644 --- a/js/src/views/Status/actions/status.js +++ b/js/src/views/Status/actions/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/AutoComplete/AutoComplete.js b/js/src/views/Status/components/AutoComplete/AutoComplete.js index c16dbd276..6cf9f6d02 100644 --- a/js/src/views/Status/components/AutoComplete/AutoComplete.js +++ b/js/src/views/Status/components/AutoComplete/AutoComplete.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js b/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js index 6bc04574e..386f1da49 100644 --- a/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js +++ b/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/AutoComplete/index.js b/js/src/views/Status/components/AutoComplete/index.js index 201b6646e..5566a319d 100644 --- a/js/src/views/Status/components/AutoComplete/index.js +++ b/js/src/views/Status/components/AutoComplete/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Box/Box.js b/js/src/views/Status/components/Box/Box.js index c950c0d65..e6e5bf1cb 100644 --- a/js/src/views/Status/components/Box/Box.js +++ b/js/src/views/Status/components/Box/Box.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Box/Box.spec.js b/js/src/views/Status/components/Box/Box.spec.js index 5b6301dc9..93dd8fdec 100644 --- a/js/src/views/Status/components/Box/Box.spec.js +++ b/js/src/views/Status/components/Box/Box.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Box/index.js b/js/src/views/Status/components/Box/index.js index e27e29724..aac0639e1 100644 --- a/js/src/views/Status/components/Box/index.js +++ b/js/src/views/Status/components/Box/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Call/Call.js b/js/src/views/Status/components/Call/Call.js index 31d20aa42..13f9cee55 100644 --- a/js/src/views/Status/components/Call/Call.js +++ b/js/src/views/Status/components/Call/Call.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Call/Call.spec.js b/js/src/views/Status/components/Call/Call.spec.js index 70caca49f..ec0d1cc1a 100644 --- a/js/src/views/Status/components/Call/Call.spec.js +++ b/js/src/views/Status/components/Call/Call.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Call/index.js b/js/src/views/Status/components/Call/index.js index 3556a6194..822f6a162 100644 --- a/js/src/views/Status/components/Call/index.js +++ b/js/src/views/Status/components/Call/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Calls/Calls.js b/js/src/views/Status/components/Calls/Calls.js index 1115ec632..f1956dcf1 100644 --- a/js/src/views/Status/components/Calls/Calls.js +++ b/js/src/views/Status/components/Calls/Calls.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Calls/Calls.spec.js b/js/src/views/Status/components/Calls/Calls.spec.js index e1e4ac8c9..452653960 100644 --- a/js/src/views/Status/components/Calls/Calls.spec.js +++ b/js/src/views/Status/components/Calls/Calls.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Calls/index.js b/js/src/views/Status/components/Calls/index.js index 850847912..9605271f6 100644 --- a/js/src/views/Status/components/Calls/index.js +++ b/js/src/views/Status/components/Calls/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/CallsToolbar/CallsToolbar.js b/js/src/views/Status/components/CallsToolbar/CallsToolbar.js index a91518ba2..77e7ab4ba 100644 --- a/js/src/views/Status/components/CallsToolbar/CallsToolbar.js +++ b/js/src/views/Status/components/CallsToolbar/CallsToolbar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js b/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js index 6f7a40dfe..354b1e999 100644 --- a/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js +++ b/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/CallsToolbar/index.js b/js/src/views/Status/components/CallsToolbar/index.js index f8162611e..48a9a92e7 100644 --- a/js/src/views/Status/components/CallsToolbar/index.js +++ b/js/src/views/Status/components/CallsToolbar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Debug/debug.js b/js/src/views/Status/components/Debug/debug.js index 438d208f9..2ea268c7c 100644 --- a/js/src/views/Status/components/Debug/debug.js +++ b/js/src/views/Status/components/Debug/debug.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Debug/index.js b/js/src/views/Status/components/Debug/index.js index c6b522c46..b9d48617b 100644 --- a/js/src/views/Status/components/Debug/index.js +++ b/js/src/views/Status/components/Debug/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/EditableValue/EditableValue.js b/js/src/views/Status/components/EditableValue/EditableValue.js index d78ec7d3b..85591c509 100644 --- a/js/src/views/Status/components/EditableValue/EditableValue.js +++ b/js/src/views/Status/components/EditableValue/EditableValue.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/EditableValue/index.js b/js/src/views/Status/components/EditableValue/index.js index bf91564d7..bd4c4e0c1 100644 --- a/js/src/views/Status/components/EditableValue/index.js +++ b/js/src/views/Status/components/EditableValue/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/JsonEditor/JsonEditor.js b/js/src/views/Status/components/JsonEditor/JsonEditor.js index e9086f1b5..50e62c698 100644 --- a/js/src/views/Status/components/JsonEditor/JsonEditor.js +++ b/js/src/views/Status/components/JsonEditor/JsonEditor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/JsonEditor/index.js b/js/src/views/Status/components/JsonEditor/index.js index db5b75fca..e7e36200c 100644 --- a/js/src/views/Status/components/JsonEditor/index.js +++ b/js/src/views/Status/components/JsonEditor/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Markdown/Markdown.js b/js/src/views/Status/components/Markdown/Markdown.js index 155d3d7e3..3f4aae23c 100644 --- a/js/src/views/Status/components/Markdown/Markdown.js +++ b/js/src/views/Status/components/Markdown/Markdown.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Markdown/index.js b/js/src/views/Status/components/Markdown/index.js index 569558ede..6a3026b9e 100644 --- a/js/src/views/Status/components/Markdown/index.js +++ b/js/src/views/Status/components/Markdown/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/decodeExtraData.js b/js/src/views/Status/components/MiningSettings/decodeExtraData.js index 7fd07921e..20c36f2b7 100644 --- a/js/src/views/Status/components/MiningSettings/decodeExtraData.js +++ b/js/src/views/Status/components/MiningSettings/decodeExtraData.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js b/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js index b2f93240c..b204ba2cd 100644 --- a/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js +++ b/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/index.js b/js/src/views/Status/components/MiningSettings/index.js index 7853e0d33..7cab96ed0 100644 --- a/js/src/views/Status/components/MiningSettings/index.js +++ b/js/src/views/Status/components/MiningSettings/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/miningSettings.js b/js/src/views/Status/components/MiningSettings/miningSettings.js index 52cab63b9..b65eed929 100644 --- a/js/src/views/Status/components/MiningSettings/miningSettings.js +++ b/js/src/views/Status/components/MiningSettings/miningSettings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/numberFromString.js b/js/src/views/Status/components/MiningSettings/numberFromString.js index 6867345ab..22ea46a91 100644 --- a/js/src/views/Status/components/MiningSettings/numberFromString.js +++ b/js/src/views/Status/components/MiningSettings/numberFromString.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/numberFromString.spec.js b/js/src/views/Status/components/MiningSettings/numberFromString.spec.js index 7efa514c3..3a99677c4 100644 --- a/js/src/views/Status/components/MiningSettings/numberFromString.spec.js +++ b/js/src/views/Status/components/MiningSettings/numberFromString.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Response/Response.js b/js/src/views/Status/components/Response/Response.js index 4ee664ad2..0d5784407 100644 --- a/js/src/views/Status/components/Response/Response.js +++ b/js/src/views/Status/components/Response/Response.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Response/Response.spec.js b/js/src/views/Status/components/Response/Response.spec.js index 0617721c2..31def4436 100644 --- a/js/src/views/Status/components/Response/Response.spec.js +++ b/js/src/views/Status/components/Response/Response.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Response/index.js b/js/src/views/Status/components/Response/index.js index f1d89d75a..39513e0c2 100644 --- a/js/src/views/Status/components/Response/index.js +++ b/js/src/views/Status/components/Response/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcCalls/RpcCalls.js b/js/src/views/Status/components/RpcCalls/RpcCalls.js index 1b3f8b87b..ab57370eb 100644 --- a/js/src/views/Status/components/RpcCalls/RpcCalls.js +++ b/js/src/views/Status/components/RpcCalls/RpcCalls.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcCalls/index.js b/js/src/views/Status/components/RpcCalls/index.js index 1c55eea71..a174e28d9 100644 --- a/js/src/views/Status/components/RpcCalls/index.js +++ b/js/src/views/Status/components/RpcCalls/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcDocs/RpcDocs.js b/js/src/views/Status/components/RpcDocs/RpcDocs.js index 3ecd93362..4eec91290 100644 --- a/js/src/views/Status/components/RpcDocs/RpcDocs.js +++ b/js/src/views/Status/components/RpcDocs/RpcDocs.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcDocs/index.js b/js/src/views/Status/components/RpcDocs/index.js index f1a9be5c0..af5fb64dd 100644 --- a/js/src/views/Status/components/RpcDocs/index.js +++ b/js/src/views/Status/components/RpcDocs/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcNav/RpcNav.js b/js/src/views/Status/components/RpcNav/RpcNav.js index b4cf2a6ef..33ef0ebc4 100644 --- a/js/src/views/Status/components/RpcNav/RpcNav.js +++ b/js/src/views/Status/components/RpcNav/RpcNav.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcNav/index.js b/js/src/views/Status/components/RpcNav/index.js index 8e2b2aa40..49a4db9c1 100644 --- a/js/src/views/Status/components/RpcNav/index.js +++ b/js/src/views/Status/components/RpcNav/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/ScrollTopButton/ScrollTopButton.js b/js/src/views/Status/components/ScrollTopButton/ScrollTopButton.js index e7097d66d..3857a65b1 100644 --- a/js/src/views/Status/components/ScrollTopButton/ScrollTopButton.js +++ b/js/src/views/Status/components/ScrollTopButton/ScrollTopButton.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/ScrollTopButton/index.js b/js/src/views/Status/components/ScrollTopButton/index.js index 835969920..12cf9de56 100644 --- a/js/src/views/Status/components/ScrollTopButton/index.js +++ b/js/src/views/Status/components/ScrollTopButton/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/ScrollTopButton/util.js b/js/src/views/Status/components/ScrollTopButton/util.js index 647bcfc43..78100c74c 100644 --- a/js/src/views/Status/components/ScrollTopButton/util.js +++ b/js/src/views/Status/components/ScrollTopButton/util.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Status/index.js b/js/src/views/Status/components/Status/index.js index 44079b224..f966050e9 100644 --- a/js/src/views/Status/components/Status/index.js +++ b/js/src/views/Status/components/Status/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Status/status.js b/js/src/views/Status/components/Status/status.js index 891ec6632..a8b54f7e8 100644 --- a/js/src/views/Status/components/Status/status.js +++ b/js/src/views/Status/components/Status/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/constants/index.js b/js/src/views/Status/constants/index.js index 26850209a..42c1c0d14 100644 --- a/js/src/views/Status/constants/index.js +++ b/js/src/views/Status/constants/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/containers/RpcPage/RpcPage.js b/js/src/views/Status/containers/RpcPage/RpcPage.js index 93ff99692..1dda2fcb0 100644 --- a/js/src/views/Status/containers/RpcPage/RpcPage.js +++ b/js/src/views/Status/containers/RpcPage/RpcPage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/containers/RpcPage/index.js b/js/src/views/Status/containers/RpcPage/index.js index f94cbe2b3..c0c3a9f8e 100644 --- a/js/src/views/Status/containers/RpcPage/index.js +++ b/js/src/views/Status/containers/RpcPage/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/containers/StatusPage/index.js b/js/src/views/Status/containers/StatusPage/index.js index 0e141a16d..6b0392fc2 100644 --- a/js/src/views/Status/containers/StatusPage/index.js +++ b/js/src/views/Status/containers/StatusPage/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/containers/StatusPage/statusPage.js b/js/src/views/Status/containers/StatusPage/statusPage.js index 286e2c20e..8389afa66 100644 --- a/js/src/views/Status/containers/StatusPage/statusPage.js +++ b/js/src/views/Status/containers/StatusPage/statusPage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/middleware/index.js b/js/src/views/Status/middleware/index.js index 169004a08..fe95537f9 100644 --- a/js/src/views/Status/middleware/index.js +++ b/js/src/views/Status/middleware/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/middleware/localstorage.js b/js/src/views/Status/middleware/localstorage.js index a431fdd0a..e0b103a33 100644 --- a/js/src/views/Status/middleware/localstorage.js +++ b/js/src/views/Status/middleware/localstorage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/middleware/localstorage.spec.js b/js/src/views/Status/middleware/localstorage.spec.js index e1d6ed7ee..82010063d 100644 --- a/js/src/views/Status/middleware/localstorage.spec.js +++ b/js/src/views/Status/middleware/localstorage.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/debug.js b/js/src/views/Status/reducers/debug.js index 314470d3d..07af4943e 100644 --- a/js/src/views/Status/reducers/debug.js +++ b/js/src/views/Status/reducers/debug.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/index.js b/js/src/views/Status/reducers/index.js index 3f6225ee0..adc5d6f8c 100644 --- a/js/src/views/Status/reducers/index.js +++ b/js/src/views/Status/reducers/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/logger.js b/js/src/views/Status/reducers/logger.js index 62085feac..97166449c 100644 --- a/js/src/views/Status/reducers/logger.js +++ b/js/src/views/Status/reducers/logger.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/mining.js b/js/src/views/Status/reducers/mining.js index 3fe780bbd..8761c3c3b 100644 --- a/js/src/views/Status/reducers/mining.js +++ b/js/src/views/Status/reducers/mining.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/rpc.js b/js/src/views/Status/reducers/rpc.js index e2676260b..a581a3860 100644 --- a/js/src/views/Status/reducers/rpc.js +++ b/js/src/views/Status/reducers/rpc.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/settings.js b/js/src/views/Status/reducers/settings.js index ae6582b02..545bd2612 100644 --- a/js/src/views/Status/reducers/settings.js +++ b/js/src/views/Status/reducers/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/status.js b/js/src/views/Status/reducers/status.js index f6fec9ce2..065f41596 100644 --- a/js/src/views/Status/reducers/status.js +++ b/js/src/views/Status/reducers/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/error.js b/js/src/views/Status/util/error.js index 8b680204e..82d4c0836 100644 --- a/js/src/views/Status/util/error.js +++ b/js/src/views/Status/util/error.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/error.spec.js b/js/src/views/Status/util/error.spec.js index 7512a47bc..50f1d532d 100644 --- a/js/src/views/Status/util/error.spec.js +++ b/js/src/views/Status/util/error.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/index.js b/js/src/views/Status/util/index.js index 9194cfd94..98923fee8 100644 --- a/js/src/views/Status/util/index.js +++ b/js/src/views/Status/util/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/index.spec.js b/js/src/views/Status/util/index.spec.js index 39d17322a..89c8fe952 100644 --- a/js/src/views/Status/util/index.spec.js +++ b/js/src/views/Status/util/index.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/react.js b/js/src/views/Status/util/react.js index 095f6e6b0..6cf7298ea 100644 --- a/js/src/views/Status/util/react.js +++ b/js/src/views/Status/util/react.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/rpc-md.js b/js/src/views/Status/util/rpc-md.js index 5c0a3f793..ad40c576b 100644 --- a/js/src/views/Status/util/rpc-md.js +++ b/js/src/views/Status/util/rpc-md.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Confirmations/confirmations.js b/js/src/views/Wallet/Confirmations/confirmations.js index 8ac340cbb..1c70a94e2 100644 --- a/js/src/views/Wallet/Confirmations/confirmations.js +++ b/js/src/views/Wallet/Confirmations/confirmations.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Confirmations/index.js b/js/src/views/Wallet/Confirmations/index.js index 00cea94a6..199d1256b 100644 --- a/js/src/views/Wallet/Confirmations/index.js +++ b/js/src/views/Wallet/Confirmations/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Details/details.js b/js/src/views/Wallet/Details/details.js index fb08bbde2..25141915a 100644 --- a/js/src/views/Wallet/Details/details.js +++ b/js/src/views/Wallet/Details/details.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Details/index.js b/js/src/views/Wallet/Details/index.js index d0bf396b6..175c98966 100644 --- a/js/src/views/Wallet/Details/index.js +++ b/js/src/views/Wallet/Details/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Transactions/index.js b/js/src/views/Wallet/Transactions/index.js index f74dcd5e8..61c6a8aad 100644 --- a/js/src/views/Wallet/Transactions/index.js +++ b/js/src/views/Wallet/Transactions/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Transactions/transactions.js b/js/src/views/Wallet/Transactions/transactions.js index 58952bd9e..aff1623a4 100644 --- a/js/src/views/Wallet/Transactions/transactions.js +++ b/js/src/views/Wallet/Transactions/transactions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/wallet.js b/js/src/views/Wallet/wallet.js index 1a5fbeecd..b33772c48 100644 --- a/js/src/views/Wallet/wallet.js +++ b/js/src/views/Wallet/wallet.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/WriteContract/writeContract.js b/js/src/views/WriteContract/writeContract.js index 7b0902c1f..31c4dd244 100644 --- a/js/src/views/WriteContract/writeContract.js +++ b/js/src/views/WriteContract/writeContract.js @@ -1,4 +1,4 @@ - // Copyright 2015, 2016 Ethcore (UK) Ltd. + // Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/WriteContract/writeContractStore.js b/js/src/views/WriteContract/writeContractStore.js index 7ea957752..dd1985466 100644 --- a/js/src/views/WriteContract/writeContractStore.js +++ b/js/src/views/WriteContract/writeContractStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/npmParity.js b/js/test/npmParity.js index 6e125e9e2..a7486de2f 100644 --- a/js/test/npmParity.js +++ b/js/test/npmParity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/app.js b/js/webpack/app.js index e63e91969..cf38ec99c 100644 --- a/js/webpack/app.js +++ b/js/webpack/app.js @@ -1,5 +1,5 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/npm.js b/js/webpack/npm.js index a1bbaeda9..a5f4b383f 100644 --- a/js/webpack/npm.js +++ b/js/webpack/npm.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/shared.js b/js/webpack/shared.js index 3c593fd87..ec011242e 100644 --- a/js/webpack/shared.js +++ b/js/webpack/shared.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/user_defaults.rs b/parity/user_defaults.rs index 652abfea1..20c6244bb 100644 --- a/parity/user_defaults.rs +++ b/parity/user_defaults.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/auto_args.rs b/rpc/src/v1/helpers/auto_args.rs index ce1e6854a..9c4e1d74a 100644 --- a/rpc/src/v1/helpers/auto_args.rs +++ b/rpc/src/v1/helpers/auto_args.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/errors.rs b/rpc/src/v1/helpers/errors.rs index 673987084..68f99795a 100644 --- a/rpc/src/v1/helpers/errors.rs +++ b/rpc/src/v1/helpers/errors.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/signing_queue.rs b/rpc/src/v1/helpers/signing_queue.rs index 144e672c1..03489bad7 100644 --- a/rpc/src/v1/helpers/signing_queue.rs +++ b/rpc/src/v1/helpers/signing_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index d68d59e59..97134951c 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index 74f467e5e..1f995749a 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/fetch.rs b/rpc/src/v1/tests/helpers/fetch.rs index 98d888a10..bdf9ea65b 100644 --- a/rpc/src/v1/tests/helpers/fetch.rs +++ b/rpc/src/v1/tests/helpers/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/miner_service.rs b/rpc/src/v1/tests/helpers/miner_service.rs index 39fba8406..132e2a5e0 100644 --- a/rpc/src/v1/tests/helpers/miner_service.rs +++ b/rpc/src/v1/tests/helpers/miner_service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/mod.rs b/rpc/src/v1/tests/helpers/mod.rs index 321a9717e..ce0f40271 100644 --- a/rpc/src/v1/tests/helpers/mod.rs +++ b/rpc/src/v1/tests/helpers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/snapshot_service.rs b/rpc/src/v1/tests/helpers/snapshot_service.rs index b78aa374d..9edc164a8 100644 --- a/rpc/src/v1/tests/helpers/snapshot_service.rs +++ b/rpc/src/v1/tests/helpers/snapshot_service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/sync_provider.rs b/rpc/src/v1/tests/helpers/sync_provider.rs index 8800d926a..039ca4c3d 100644 --- a/rpc/src/v1/tests/helpers/sync_provider.rs +++ b/rpc/src/v1/tests/helpers/sync_provider.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index 7a7a1f682..f84f4d53e 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/manage_network.rs b/rpc/src/v1/tests/mocked/manage_network.rs index 2a1cfb6d4..03bae523a 100644 --- a/rpc/src/v1/tests/mocked/manage_network.rs +++ b/rpc/src/v1/tests/mocked/manage_network.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/mod.rs b/rpc/src/v1/tests/mocked/mod.rs index a7d7156b4..0ba0fc95c 100644 --- a/rpc/src/v1/tests/mocked/mod.rs +++ b/rpc/src/v1/tests/mocked/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/net.rs b/rpc/src/v1/tests/mocked/net.rs index 37ef84fca..1c4a4c1ac 100644 --- a/rpc/src/v1/tests/mocked/net.rs +++ b/rpc/src/v1/tests/mocked/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index 9b4daaccd..01bc37ad3 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/parity_accounts.rs b/rpc/src/v1/tests/mocked/parity_accounts.rs index 8b42500e6..a30b6c43c 100644 --- a/rpc/src/v1/tests/mocked/parity_accounts.rs +++ b/rpc/src/v1/tests/mocked/parity_accounts.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/parity_set.rs b/rpc/src/v1/tests/mocked/parity_set.rs index 55f155693..d05c12770 100644 --- a/rpc/src/v1/tests/mocked/parity_set.rs +++ b/rpc/src/v1/tests/mocked/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/personal.rs b/rpc/src/v1/tests/mocked/personal.rs index ea4973ee4..c2984240f 100644 --- a/rpc/src/v1/tests/mocked/personal.rs +++ b/rpc/src/v1/tests/mocked/personal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/rpc.rs b/rpc/src/v1/tests/mocked/rpc.rs index 44406f4e3..52ba78859 100644 --- a/rpc/src/v1/tests/mocked/rpc.rs +++ b/rpc/src/v1/tests/mocked/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/signer.rs b/rpc/src/v1/tests/mocked/signer.rs index c87abb7eb..3537717d4 100644 --- a/rpc/src/v1/tests/mocked/signer.rs +++ b/rpc/src/v1/tests/mocked/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/signing.rs b/rpc/src/v1/tests/mocked/signing.rs index 31a700443..526360f0f 100644 --- a/rpc/src/v1/tests/mocked/signing.rs +++ b/rpc/src/v1/tests/mocked/signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/web3.rs b/rpc/src/v1/tests/mocked/web3.rs index c3bd79110..c7ad42426 100644 --- a/rpc/src/v1/tests/mocked/web3.rs +++ b/rpc/src/v1/tests/mocked/web3.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/block.rs b/rpc/src/v1/types/block.rs index 5aab6ced8..6dd441ee8 100644 --- a/rpc/src/v1/types/block.rs +++ b/rpc/src/v1/types/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/confirmations.rs b/rpc/src/v1/types/confirmations.rs index f69018422..fd81bf6e7 100644 --- a/rpc/src/v1/types/confirmations.rs +++ b/rpc/src/v1/types/confirmations.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/mod.rs b/rpc/src/v1/types/mod.rs index c1bc34407..984e38bcd 100644 --- a/rpc/src/v1/types/mod.rs +++ b/rpc/src/v1/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/mod.rs.in b/rpc/src/v1/types/mod.rs.in index 364fa53d3..c5509bd57 100644 --- a/rpc/src/v1/types/mod.rs.in +++ b/rpc/src/v1/types/mod.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/receipt.rs b/rpc/src/v1/types/receipt.rs index 24170a14c..1b98b1086 100644 --- a/rpc/src/v1/types/receipt.rs +++ b/rpc/src/v1/types/receipt.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/rpc_settings.rs b/rpc/src/v1/types/rpc_settings.rs index de8f90410..87ca245b6 100644 --- a/rpc/src/v1/types/rpc_settings.rs +++ b/rpc/src/v1/types/rpc_settings.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/sync.rs b/rpc/src/v1/types/sync.rs index 6f8938be9..3e40ecb85 100644 --- a/rpc/src/v1/types/sync.rs +++ b/rpc/src/v1/types/sync.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/trace.rs b/rpc/src/v1/types/trace.rs index ace76827c..5ba166010 100644 --- a/rpc/src/v1/types/trace.rs +++ b/rpc/src/v1/types/trace.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/trace_filter.rs b/rpc/src/v1/types/trace_filter.rs index 2517b1585..b9a4c4951 100644 --- a/rpc/src/v1/types/trace_filter.rs +++ b/rpc/src/v1/types/trace_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/transaction.rs b/rpc/src/v1/types/transaction.rs index 933a4a482..31374e912 100644 --- a/rpc/src/v1/types/transaction.rs +++ b/rpc/src/v1/types/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/transaction_request.rs b/rpc/src/v1/types/transaction_request.rs index a4f8e6387..258346d56 100644 --- a/rpc/src/v1/types/transaction_request.rs +++ b/rpc/src/v1/types/transaction_request.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/uint.rs b/rpc/src/v1/types/uint.rs index 245348709..2dc9093c1 100644 --- a/rpc/src/v1/types/uint.rs +++ b/rpc/src/v1/types/uint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/work.rs b/rpc/src/v1/types/work.rs index 0817eb24a..559edac59 100644 --- a/rpc/src/v1/types/work.rs +++ b/rpc/src/v1/types/work.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/chain.rs b/sync/src/chain.rs index c6e123b3f..7b9257c6c 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bigint/src/uint.rs b/util/bigint/src/uint.rs index c0b6e0987..e2c06b664 100644 --- a/util/bigint/src/uint.rs +++ b/util/bigint/src/uint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/connection.rs b/util/network/src/connection.rs index ea0763b09..0a43d18c1 100644 --- a/util/network/src/connection.rs +++ b/util/network/src/connection.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/discovery.rs b/util/network/src/discovery.rs index 996578af5..a6adf8d1d 100644 --- a/util/network/src/discovery.rs +++ b/util/network/src/discovery.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/handshake.rs b/util/network/src/handshake.rs index 0eeda3b54..7364b06e7 100644 --- a/util/network/src/handshake.rs +++ b/util/network/src/handshake.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/host.rs b/util/network/src/host.rs index 975fb87b8..2bdeab93e 100644 --- a/util/network/src/host.rs +++ b/util/network/src/host.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/session.rs b/util/network/src/session.rs index 3aab05d9a..d19d330c9 100644 --- a/util/network/src/session.rs +++ b/util/network/src/session.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/earlymergedb.rs b/util/src/journaldb/earlymergedb.rs index 60263a2cd..26d1576ce 100644 --- a/util/src/journaldb/earlymergedb.rs +++ b/util/src/journaldb/earlymergedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/overlayrecentdb.rs b/util/src/journaldb/overlayrecentdb.rs index 34f942a0b..a80fedc79 100644 --- a/util/src/journaldb/overlayrecentdb.rs +++ b/util/src/journaldb/overlayrecentdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/triedbmut.rs b/util/src/trie/triedbmut.rs index f5940dd7b..63720b7b4 100644 --- a/util/src/trie/triedbmut.rs +++ b/util/src/trie/triedbmut.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify From 94f5501c617ff8f975743d5b8538a0c4f775a70c Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Sun, 11 Dec 2016 19:43:58 +0100 Subject: [PATCH 120/131] authors & homepage => Parity --- Cargo.toml | 2 +- dapps/Cargo.toml | 2 +- dapps/js-glue/Cargo.toml | 2 +- dapps/ui/Cargo.toml | 4 ++-- db/Cargo.toml | 4 ++-- devtools/Cargo.toml | 4 ++-- ethash/Cargo.toml | 2 +- ethcore/Cargo.toml | 4 ++-- ethcore/hash-fetch/Cargo.toml | 4 ++-- ethcore/light/Cargo.toml | 4 ++-- ethcrypto/Cargo.toml | 2 +- ethkey/Cargo.toml | 2 +- ethstore/Cargo.toml | 2 +- evmbin/Cargo.toml | 2 +- evmjit/Cargo.toml | 2 +- ipc/codegen/Cargo.toml | 2 +- ipc/hypervisor/Cargo.toml | 2 +- ipc/nano/Cargo.toml | 2 +- ipc/rpc/Cargo.toml | 2 +- ipc/tests/Cargo.toml | 2 +- js/Cargo.precompiled.toml | 2 +- js/Cargo.toml | 2 +- json/Cargo.toml | 2 +- logger/Cargo.toml | 2 +- rpc/Cargo.toml | 2 +- rpc/rpctest/Cargo.toml | 2 +- signer/Cargo.toml | 4 ++-- stratum/Cargo.toml | 2 +- sync/Cargo.toml | 2 +- util/Cargo.toml | 4 ++-- util/bigint/Cargo.toml | 4 ++-- util/bloom/Cargo.toml | 2 +- util/fetch/Cargo.toml | 4 ++-- util/https-fetch/Cargo.toml | 4 ++-- util/io/Cargo.toml | 4 ++-- util/network/Cargo.toml | 4 ++-- util/rlp/Cargo.toml | 2 +- util/sha3/Cargo.toml | 4 ++-- util/table/Cargo.toml | 2 +- util/using_queue/Cargo.toml | 2 +- 40 files changed, 54 insertions(+), 54 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c3a44e1cc..bce959f61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore client." name = "parity" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [build-dependencies] diff --git a/dapps/Cargo.toml b/dapps/Cargo.toml index bbab8420e..93c82790a 100644 --- a/dapps/Cargo.toml +++ b/dapps/Cargo.toml @@ -3,7 +3,7 @@ description = "Parity Dapps crate" name = "ethcore-dapps" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [lib] diff --git a/dapps/js-glue/Cargo.toml b/dapps/js-glue/Cargo.toml index 827c67ef5..8832624a8 100644 --- a/dapps/js-glue/Cargo.toml +++ b/dapps/js-glue/Cargo.toml @@ -3,7 +3,7 @@ description = "Base Package for all Parity built-in dapps" name = "parity-dapps-glue" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [build-dependencies] diff --git a/dapps/ui/Cargo.toml b/dapps/ui/Cargo.toml index de8207b88..e835bd820 100644 --- a/dapps/ui/Cargo.toml +++ b/dapps/ui/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore Parity UI" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "parity-ui" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [build-dependencies] rustc_version = "0.1" diff --git a/db/Cargo.toml b/db/Cargo.toml index 9642ed882..30bfda90a 100644 --- a/db/Cargo.toml +++ b/db/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore Database" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-db" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [build-dependencies] diff --git a/devtools/Cargo.toml b/devtools/Cargo.toml index 3b648c450..163bd7baf 100644 --- a/devtools/Cargo.toml +++ b/devtools/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore development/test/build tools" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-devtools" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] rand = "0.3" diff --git a/ethash/Cargo.toml b/ethash/Cargo.toml index bf1ba990e..98ba22f5b 100644 --- a/ethash/Cargo.toml +++ b/ethash/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethash" version = "1.5.0" -authors = ["arkpar <arkadiy@ethcore.io"] +authors = ["Parity Technologies <admin@parity.io>"] [lib] diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index bd87c422f..40d767ab0 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [build-dependencies] diff --git a/ethcore/hash-fetch/Cargo.toml b/ethcore/hash-fetch/Cargo.toml index 4fb724c08..3d1a57240 100644 --- a/ethcore/hash-fetch/Cargo.toml +++ b/ethcore/hash-fetch/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Fetching hash-addressed content." -homepage = "https://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-hash-fetch" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] log = "0.3" diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index c89bbc74f..37d7034d2 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Parity LES primitives" -homepage = "https://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-light" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [build-dependencies] diff --git a/ethcrypto/Cargo.toml b/ethcrypto/Cargo.toml index 5c638b555..16d91988a 100644 --- a/ethcrypto/Cargo.toml +++ b/ethcrypto/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcrypto" version = "0.1.0" -authors = ["debris <marek.kotewicz@gmail.com>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] rust-crypto = "0.2.36" diff --git a/ethkey/Cargo.toml b/ethkey/Cargo.toml index 319a38b20..d9d1c7efa 100644 --- a/ethkey/Cargo.toml +++ b/ethkey/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethkey" version = "0.2.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] rand = "0.3.14" diff --git a/ethstore/Cargo.toml b/ethstore/Cargo.toml index 03347cbd7..f47d9171f 100644 --- a/ethstore/Cargo.toml +++ b/ethstore/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethstore" version = "0.1.0" -authors = ["debris <marek.kotewicz@gmail.com>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [dependencies] diff --git a/evmbin/Cargo.toml b/evmbin/Cargo.toml index 479e7e7ec..ad2d69d57 100644 --- a/evmbin/Cargo.toml +++ b/evmbin/Cargo.toml @@ -2,7 +2,7 @@ name = "evm" description = "Parity's EVM implementation" version = "0.1.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [lib] name = "evm" diff --git a/evmjit/Cargo.toml b/evmjit/Cargo.toml index 12c57a769..a849b9323 100644 --- a/evmjit/Cargo.toml +++ b/evmjit/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "evmjit" version = "1.5.0" -authors = ["debris <marek.kotewicz@gmail.com>"] +authors = ["Parity Technologies <admin@parity.io>"] [lib] crate-type = ["dylib"] diff --git a/ipc/codegen/Cargo.toml b/ipc/codegen/Cargo.toml index 2867609d6..5717453ef 100644 --- a/ipc/codegen/Cargo.toml +++ b/ipc/codegen/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc-codegen" version = "1.5.0" -authors = ["Nikolay Volf"] +authors = ["Parity Technologies <admin@parity.io>"] license = "GPL-3.0" description = "Macros to auto-generate implementations for ipc call" build = "build.rs" diff --git a/ipc/hypervisor/Cargo.toml b/ipc/hypervisor/Cargo.toml index d730b9bcf..abce5a3ec 100644 --- a/ipc/hypervisor/Cargo.toml +++ b/ipc/hypervisor/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc-hypervisor" version = "1.2.0" -authors = ["Nikolay Volf <nikolay@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] license = "GPL-3.0" build = "build.rs" diff --git a/ipc/nano/Cargo.toml b/ipc/nano/Cargo.toml index 32171bbf4..7d559dbab 100644 --- a/ipc/nano/Cargo.toml +++ b/ipc/nano/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc-nano" version = "1.5.0" -authors = ["Nikolay Volf <nikolay@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] license = "GPL-3.0" [features] diff --git a/ipc/rpc/Cargo.toml b/ipc/rpc/Cargo.toml index 1aecb3292..312433be1 100644 --- a/ipc/rpc/Cargo.toml +++ b/ipc/rpc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc" version = "1.5.0" -authors = ["Nikolay Volf <nikvolf@gmail.com>"] +authors = ["Parity Technologies <admin@parity.io>"] license = "GPL-3.0" [features] diff --git a/ipc/tests/Cargo.toml b/ipc/tests/Cargo.toml index 23bde87e2..1f7723a4f 100644 --- a/ipc/tests/Cargo.toml +++ b/ipc/tests/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc-tests" version = "0.1.0" -authors = ["Nikolay Volf"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [lib] diff --git a/js/Cargo.precompiled.toml b/js/Cargo.precompiled.toml index b8175e4f7..5de652037 100644 --- a/js/Cargo.precompiled.toml +++ b/js/Cargo.precompiled.toml @@ -3,7 +3,7 @@ description = "Parity built-in dapps." name = "parity-ui-precompiled" version = "1.4.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [features] diff --git a/js/Cargo.toml b/js/Cargo.toml index e52bfec9e..231f5fa24 100644 --- a/js/Cargo.toml +++ b/js/Cargo.toml @@ -3,7 +3,7 @@ description = "Parity built-in dapps." name = "parity-ui-dev" version = "1.4.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [features] diff --git a/json/Cargo.toml b/json/Cargo.toml index 67303cc7e..747be8f7d 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethjson" version = "0.1.0" -authors = ["debris <marek.kotewicz@gmail.com>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [dependencies] diff --git a/logger/Cargo.toml b/logger/Cargo.toml index 590eb0b2d..a22c748fb 100644 --- a/logger/Cargo.toml +++ b/logger/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore client." name = "ethcore-logger" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] log = "0.3" diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index dcdf68325..5d974e59f 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore jsonrpc" name = "ethcore-rpc" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [lib] diff --git a/rpc/rpctest/Cargo.toml b/rpc/rpctest/Cargo.toml index 19c7feb7c..461746001 100644 --- a/rpc/rpctest/Cargo.toml +++ b/rpc/rpctest/Cargo.toml @@ -3,7 +3,7 @@ description = "Rpc test client." name = "rpctest" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] ctrlc = { git = "https://github.com/ethcore/rust-ctrlc.git" } diff --git a/signer/Cargo.toml b/signer/Cargo.toml index 78fda12be..abf5d7755 100644 --- a/signer/Cargo.toml +++ b/signer/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore Trusted Signer" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-signer" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [build-dependencies] diff --git a/stratum/Cargo.toml b/stratum/Cargo.toml index 609f4ee9b..2a79ecd13 100644 --- a/stratum/Cargo.toml +++ b/stratum/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore stratum lib" name = "ethcore-stratum" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [build-dependencies] diff --git a/sync/Cargo.toml b/sync/Cargo.toml index f4166bbe5..40c07e911 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore blockchain sync" name = "ethsync" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore <admin@ethcore.io"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [lib] diff --git a/util/Cargo.toml b/util/Cargo.toml index 1a439ebf8..594024f3f 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore utility library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-util" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [dependencies] diff --git a/util/bigint/Cargo.toml b/util/bigint/Cargo.toml index 3b6b852cb..2b8d8313d 100644 --- a/util/bigint/Cargo.toml +++ b/util/bigint/Cargo.toml @@ -1,11 +1,11 @@ [package] description = "Large fixed-size integers and hash function outputs" -homepage = "http://ethcore.io" +homepage = "http://parity.io" repository = "https://github.com/ethcore/parity" license = "GPL-3.0" name = "ethcore-bigint" version = "0.1.2" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [build-dependencies] diff --git a/util/bloom/Cargo.toml b/util/bloom/Cargo.toml index c1d6f7638..99464879f 100644 --- a/util/bloom/Cargo.toml +++ b/util/bloom/Cargo.toml @@ -1,7 +1,7 @@ [project] name = "ethcore-bloom-journal" version = "0.1.0" -authors = ["Ethcore<admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] description = "Journaling bloom filter" license = "GPL3" diff --git a/util/fetch/Cargo.toml b/util/fetch/Cargo.toml index 663d167bf..b179add5b 100644 --- a/util/fetch/Cargo.toml +++ b/util/fetch/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "HTTP/HTTPS fetching library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "fetch" version = "0.1.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] log = "0.3" diff --git a/util/https-fetch/Cargo.toml b/util/https-fetch/Cargo.toml index b40cf8943..e0149c351 100644 --- a/util/https-fetch/Cargo.toml +++ b/util/https-fetch/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "HTTPS fetching library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "https-fetch" version = "0.1.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] log = "0.3" diff --git a/util/io/Cargo.toml b/util/io/Cargo.toml index 0a7adaf56..ce20830f1 100644 --- a/util/io/Cargo.toml +++ b/util/io/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore IO library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-io" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] mio = { git = "https://github.com/ethcore/mio" } diff --git a/util/network/Cargo.toml b/util/network/Cargo.toml index 37ff825b0..c60705d0d 100644 --- a/util/network/Cargo.toml +++ b/util/network/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore network library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-network" version = "1.5.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] log = "0.3" diff --git a/util/rlp/Cargo.toml b/util/rlp/Cargo.toml index 7095ddb04..ae6b4accd 100644 --- a/util/rlp/Cargo.toml +++ b/util/rlp/Cargo.toml @@ -3,7 +3,7 @@ description = "Recursive-length prefix encoding, decoding, and compression" license = "GPL-3.0" name = "rlp" version = "0.1.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] elastic-array = { git = "https://github.com/ethcore/elastic-array" } diff --git a/util/sha3/Cargo.toml b/util/sha3/Cargo.toml index ac423b22f..8f8d6d160 100644 --- a/util/sha3/Cargo.toml +++ b/util/sha3/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Rust bindings for tinykeccak C library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "sha3" version = "0.1.0" -authors = ["Ethcore <admin@ethcore.io>"] +authors = ["Parity Technologies <admin@parity.io>"] build = "build.rs" [build-dependencies] diff --git a/util/table/Cargo.toml b/util/table/Cargo.toml index 57d47a8e9..f2faca184 100644 --- a/util/table/Cargo.toml +++ b/util/table/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "table" version = "0.1.0" -authors = ["debris <marek.kotewicz@gmail.com>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] diff --git a/util/using_queue/Cargo.toml b/util/using_queue/Cargo.toml index 0708cbd00..4030d0d8d 100644 --- a/util/using_queue/Cargo.toml +++ b/util/using_queue/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "using_queue" version = "0.1.0" -authors = ["debris <marek.kotewicz@gmail.com>"] +authors = ["Parity Technologies <admin@parity.io>"] [dependencies] From 282178e1fa59804b0871e77ecdf01d19e9d193c2 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 19:06:28 +0000 Subject: [PATCH 121/131] [ci skip] js-precompiled 20161211-190404 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c492bc9e..95a5571ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#6430c6ef5d00f3a411546021ae2915740abce561" +source = "git+https://github.com/ethcore/js-precompiled.git#2397280818ec4e4502b379f788f2eecdbc63abb4" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index b4ea41a61..1e0ea8b68 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.113", + "version": "0.2.114", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From f4134cf634d2923c6decda8570aafebed85a15cc Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 19:39:15 +0000 Subject: [PATCH 122/131] [ci skip] js-precompiled 20161211-193650 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95a5571ed..e14857b03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#2397280818ec4e4502b379f788f2eecdbc63abb4" +source = "git+https://github.com/ethcore/js-precompiled.git#343c9172fd4378d19046e48b69a0c590a79622ee" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 1e0ea8b68..39b0cf363 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.114", + "version": "0.2.115", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 4dbfcf231d54d58920e3af9f9eb0d704e34fb8b1 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sun, 11 Dec 2016 21:03:40 +0100 Subject: [PATCH 123/131] Cache fetched Dapps (#3804) * Have a singleton DappsFetcher so we don't realod them at each page load * Better dapps Fetcher : event based listener Update on meta change * Remove dapps fetcher => all in singleton dapps store + utils * Modify header to Parity --- js/src/contracts/dappreg.js | 6 +- js/src/redux/providers/signerReducer.js | 2 +- js/src/util/dapps.js | 208 ++++++++++++++++ js/src/views/Dapp/dapp.js | 2 +- js/src/views/Dapps/dapps.js | 2 +- js/src/views/Dapps/dappsStore.js | 300 +++++++++++------------- 6 files changed, 352 insertions(+), 168 deletions(-) create mode 100644 js/src/util/dapps.js diff --git a/js/src/contracts/dappreg.js b/js/src/contracts/dappreg.js index b9ee15764..d82c76a5a 100644 --- a/js/src/contracts/dappreg.js +++ b/js/src/contracts/dappreg.js @@ -22,8 +22,12 @@ export default class DappReg { this.getInstance(); } + getContract () { + return this._registry.getContract('dappreg'); + } + getInstance () { - return this._registry.getContractInstance('dappreg'); + return this.getContract().then((contract) => contract.instance); } count () { diff --git a/js/src/redux/providers/signerReducer.js b/js/src/redux/providers/signerReducer.js index cc10b3fd1..c6d55f140 100644 --- a/js/src/redux/providers/signerReducer.js +++ b/js/src/redux/providers/signerReducer.js @@ -62,7 +62,7 @@ export default handleActions({ signerSuccessConfirmRequest (state, action) { const { id, txHash } = action.payload; const confirmed = Object.assign( - state.pending.find(p => p.id === id), + state.pending.find(p => p.id === id) || { id }, { result: txHash, status: 'confirmed' } ); diff --git a/js/src/util/dapps.js b/js/src/util/dapps.js new file mode 100644 index 000000000..89f17274e --- /dev/null +++ b/js/src/util/dapps.js @@ -0,0 +1,208 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import BigNumber from 'bignumber.js'; +import { pick, range, uniq } from 'lodash'; + +import Contracts from '~/contracts'; +import { hashToImageUrl } from '~/redux/util'; +import { bytesToHex } from '~/api/util/format'; + +import builtinApps from '~/views/Dapps/builtin.json'; + +function getHost (api) { + const host = process.env.DAPPS_URL || + ( + process.env.NODE_ENV === 'production' + ? api.dappsUrl + : '' + ); + + if (host === '/') { + return ''; + } + + return host; +} + +export function subscribeToChanges (api, dappReg, callback) { + return dappReg + .getContract() + .then((dappRegContract) => { + const dappRegInstance = dappRegContract.instance; + + const signatures = ['MetaChanged', 'OwnerChanged', 'Registered'] + .map((event) => dappRegInstance[event].signature); + + return api.eth + .newFilter({ + fromBlock: '0', + toBlock: 'latest', + address: dappRegInstance.address, + topics: [ signatures ] + }) + .then((filterId) => { + return api + .subscribe('eth_blockNumber', () => { + if (filterId > -1) { + api.eth + .getFilterChanges(filterId) + .then((logs) => { + return dappRegContract.parseEventLogs(logs); + }) + .then((events) => { + if (events.length === 0) { + return []; + } + + // Return uniq IDs which changed meta-data + const ids = uniq(events.map((event) => bytesToHex(event.params.id.value))); + callback(ids); + }); + } + }) + .then((blockSubId) => { + return { + block: blockSubId, + filter: filterId + }; + }); + }); + }); +} + +export function fetchBuiltinApps () { + const { dappReg } = Contracts.get(); + + return Promise + .all(builtinApps.map((app) => dappReg.getImage(app.id))) + .then((imageIds) => { + return builtinApps.map((app, index) => { + app.type = 'builtin'; + app.image = hashToImageUrl(imageIds[index]); + return app; + }); + }) + .catch((error) => { + console.warn('DappsStore:fetchBuiltinApps', error); + }); +} + +export function fetchLocalApps (api) { + return fetch(`${getHost(api)}/api/apps`) + .then((response) => { + return response.ok + ? response.json() + : []; + }) + .then((apps) => { + return apps + .map((app) => { + app.type = 'local'; + app.visible = true; + return app; + }) + .filter((app) => app.id && !['ui'].includes(app.id)); + }) + .catch((error) => { + console.warn('DappsStore:fetchLocal', error); + }); +} + +export function fetchRegistryAppIds () { + const { dappReg } = Contracts.get(); + + return dappReg + .count() + .then((count) => { + const promises = range(0, count.toNumber()).map((index) => dappReg.at(index)); + return Promise.all(promises); + }) + .then((appsInfo) => { + const appIds = appsInfo + .map(([appId, owner]) => bytesToHex(appId)) + .filter((appId) => { + return (new BigNumber(appId)).gt(0) && !builtinApps.find((app) => app.id === appId); + }); + + return appIds; + }) + .catch((error) => { + console.warn('DappsStore:fetchRegistryAppIds', error); + }); +} + +export function fetchRegistryApp (api, dappReg, appId) { + return Promise + .all([ + dappReg.getImage(appId), + dappReg.getContent(appId), + dappReg.getManifest(appId) + ]) + .then(([ imageId, contentId, manifestId ]) => { + const app = { + id: appId, + image: hashToImageUrl(imageId), + contentHash: bytesToHex(contentId).substr(2), + manifestHash: bytesToHex(manifestId).substr(2), + type: 'network', + visible: true + }; + + return fetchManifest(api, app.manifestHash) + .then((manifest) => { + if (manifest) { + app.manifestHash = null; + + // Add usefull manifest fields to app + Object.assign(app, pick(manifest, ['author', 'description', 'name', 'version'])); + } + + return app; + }); + }) + .then((app) => { + // Keep dapps that has a Manifest File and an Id + const dapp = (app.manifestHash || !app.id) ? null : app; + return dapp; + }) + .catch((error) => { + console.warn('DappsStore:fetchRegistryApp', error); + }); +} + +export function fetchManifest (api, manifestHash) { + if (/^(0x)?0+/.test(manifestHash)) { + return Promise.resolve(null); + } + + return fetch( + `${getHost(api)}/api/content/${manifestHash}/`, + { redirect: 'follow', mode: 'cors' } + ) + .then((response) => { + return response.ok + ? response.json() + : null; + }) + .then((manifest) => { + return manifest; + }) + .catch((error) => { + console.warn('DappsStore:fetchManifest', error); + return null; + }); +} diff --git a/js/src/views/Dapp/dapp.js b/js/src/views/Dapp/dapp.js index 16a842964..87245ca72 100644 --- a/js/src/views/Dapp/dapp.js +++ b/js/src/views/Dapp/dapp.js @@ -31,7 +31,7 @@ export default class Dapp extends Component { params: PropTypes.object }; - store = new DappsStore(this.context.api); + store = DappsStore.get(this.context.api); render () { const { dappsUrl } = this.context.api; diff --git a/js/src/views/Dapps/dapps.js b/js/src/views/Dapps/dapps.js index 07bdcd758..9760382c2 100644 --- a/js/src/views/Dapps/dapps.js +++ b/js/src/views/Dapps/dapps.js @@ -36,7 +36,7 @@ export default class Dapps extends Component { api: PropTypes.object.isRequired } - store = new DappsStore(this.context.api); + store = DappsStore.get(this.context.api); render () { let externalOverlay = null; diff --git a/js/src/views/Dapps/dappsStore.js b/js/src/views/Dapps/dappsStore.js index 1841f4c7c..e167331a4 100644 --- a/js/src/views/Dapps/dappsStore.js +++ b/js/src/views/Dapps/dappsStore.js @@ -14,17 +14,21 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import BigNumber from 'bignumber.js'; import { action, computed, observable, transaction } from 'mobx'; import store from 'store'; import Contracts from '~/contracts'; -import { hashToImageUrl } from '~/redux/util'; - -import builtinApps from './builtin.json'; +import { + fetchBuiltinApps, fetchLocalApps, + fetchRegistryAppIds, fetchRegistryApp, + subscribeToChanges +} from '~/util/dapps'; const LS_KEY_DISPLAY = 'displayApps'; const LS_KEY_EXTERNAL_ACCEPT = 'acceptExternal'; +const BUILTIN_APPS_KEY = 'BUILTIN_APPS_KEY'; + +let instance = null; export default class DappsStore { @observable apps = []; @@ -32,23 +36,138 @@ export default class DappsStore { @observable modalOpen = false; @observable externalOverlayVisible = true; + _api = null; + _subscriptions = {}; + + _cachedApps = {}; _manifests = {}; + _registryAppsIds = null; constructor (api) { this._api = api; this.loadExternalOverlay(); - this.readDisplayApps(); + this.loadApps(); + this.subscribeToChanges(); + } + + loadApps () { + const { dappReg } = Contracts.get(); Promise .all([ - this._fetchBuiltinApps(), - this._fetchLocalApps(), - this._fetchRegistryApps() + this.fetchBuiltinApps().then((apps) => this.addApps(apps)), + this.fetchLocalApps().then((apps) => this.addApps(apps)), + this.fetchRegistryApps(dappReg).then((apps) => this.addApps(apps)) ]) .then(this.writeDisplayApps); } + static get (api) { + if (!instance) { + instance = new DappsStore(api); + } else { + instance.loadApps(); + } + + return instance; + } + + subscribeToChanges () { + const { dappReg } = Contracts.get(); + + // Unsubscribe from previous subscriptions, if any + if (this._subscriptions.block) { + this._api.unsubscribe(this._subscriptions.block); + } + + if (this._subscriptions.filter) { + this._api.eth.uninstallFilter(this._subscriptions.filter); + } + + // Subscribe to dapps reg changes + subscribeToChanges(this._api, dappReg, (appIds) => { + const updates = appIds.map((appId) => { + return this.fetchRegistryApp(dappReg, appId, true); + }); + + Promise + .all(updates) + .then((apps) => { + this.addApps(apps); + }); + }).then((subscriptions) => { + this._subscriptions = subscriptions; + }); + } + + fetchBuiltinApps (force = false) { + if (!force && this._cachedApps[BUILTIN_APPS_KEY] !== undefined) { + return Promise.resolve(this._cachedApps[BUILTIN_APPS_KEY]); + } + + this._cachedApps[BUILTIN_APPS_KEY] = fetchBuiltinApps() + .then((apps) => { + this._cachedApps[BUILTIN_APPS_KEY] = apps; + return apps; + }); + + return Promise.resolve(this._cachedApps[BUILTIN_APPS_KEY]); + } + + fetchLocalApps () { + return fetchLocalApps(this._api); + } + + fetchRegistryAppIds (force = false) { + if (!force && this._registryAppsIds) { + return Promise.resolve(this._registryAppsIds); + } + + this._registryAppsIds = fetchRegistryAppIds() + .then((appIds) => { + this._registryAppsIds = appIds; + return this._registryAppsIds; + }); + + return Promise.resolve(this._registryAppsIds); + } + + fetchRegistryApp (dappReg, appId, force = false) { + if (!force && this._cachedApps[appId] !== undefined) { + return Promise.resolve(this._cachedApps[appId]); + } + + this._cachedApps[appId] = fetchRegistryApp(this._api, dappReg, appId) + .then((dapp) => { + this._cachedApps[appId] = dapp; + return dapp; + }); + + return Promise.resolve(this._cachedApps[appId]); + } + + fetchRegistryApps (dappReg) { + return this + .fetchRegistryAppIds() + .then((appIds) => { + const promises = appIds.map((appId) => { + // Fetch the Dapp and display it ASAP + return this + .fetchRegistryApp(dappReg, appId) + .then((app) => { + if (app) { + this.addApps([ app ]); + } + + return app; + }); + }); + + return Promise.all(promises); + }); + } + @computed get sortedBuiltin () { return this.apps.filter((app) => app.type === 'builtin'); } @@ -112,9 +231,17 @@ export default class DappsStore { store.set(LS_KEY_DISPLAY, this.displayApps); } - @action addApps = (apps) => { + @action addApps = (_apps) => { transaction(() => { + const apps = _apps.filter((app) => app); + + // Get new apps IDs if available + const newAppsIds = apps + .map((app) => app.id) + .filter((id) => id); + this.apps = this.apps + .filter((app) => !app.id || !newAppsIds.includes(app.id)) .concat(apps || []) .sort((a, b) => a.name.localeCompare(b.name)); @@ -128,159 +255,4 @@ export default class DappsStore { this.displayApps = Object.assign({}, this.displayApps, visibility); }); } - - _getHost (api) { - const host = process.env.DAPPS_URL || (process.env.NODE_ENV === 'production' - ? this._api.dappsUrl - : ''); - - if (host === '/') { - return ''; - } - - return host; - } - - _fetchBuiltinApps () { - const { dappReg } = Contracts.get(); - - return Promise - .all(builtinApps.map((app) => dappReg.getImage(app.id))) - .then((imageIds) => { - this.addApps( - builtinApps.map((app, index) => { - app.type = 'builtin'; - app.image = hashToImageUrl(imageIds[index]); - return app; - }) - ); - }) - .catch((error) => { - console.warn('DappsStore:fetchBuiltinApps', error); - }); - } - - _fetchLocalApps () { - return fetch(`${this._getHost()}/api/apps`) - .then((response) => { - return response.ok - ? response.json() - : []; - }) - .then((apps) => { - return apps - .map((app) => { - app.type = 'local'; - app.visible = true; - return app; - }) - .filter((app) => app.id && !['ui'].includes(app.id)); - }) - .then(this.addApps) - .catch((error) => { - console.warn('DappsStore:fetchLocal', error); - }); - } - - _fetchRegistryApps () { - const { dappReg } = Contracts.get(); - - return dappReg - .count() - .then((_count) => { - const count = _count.toNumber(); - const promises = []; - - for (let index = 0; index < count; index++) { - promises.push(dappReg.at(index)); - } - - return Promise.all(promises); - }) - .then((appsInfo) => { - const appIds = appsInfo - .map(([appId, owner]) => this._api.util.bytesToHex(appId)) - .filter((appId) => { - return (new BigNumber(appId)).gt(0) && !builtinApps.find((app) => app.id === appId); - }); - - return Promise - .all([ - Promise.all(appIds.map((appId) => dappReg.getImage(appId))), - Promise.all(appIds.map((appId) => dappReg.getContent(appId))), - Promise.all(appIds.map((appId) => dappReg.getManifest(appId))) - ]) - .then(([imageIds, contentIds, manifestIds]) => { - return appIds.map((appId, index) => { - const app = { - id: appId, - image: hashToImageUrl(imageIds[index]), - contentHash: this._api.util.bytesToHex(contentIds[index]).substr(2), - manifestHash: this._api.util.bytesToHex(manifestIds[index]).substr(2), - type: 'network', - visible: true - }; - - return app; - }); - }); - }) - .then((apps) => { - return Promise - .all(apps.map((app) => this._fetchManifest(app.manifestHash))) - .then((manifests) => { - return apps.map((app, index) => { - const manifest = manifests[index]; - - if (manifest) { - app.manifestHash = null; - Object.keys(manifest) - .filter((key) => ['author', 'description', 'name', 'version'].includes(key)) - .forEach((key) => { - app[key] = manifest[key]; - }); - } - - return app; - }); - }) - .then((apps) => { - return apps.filter((app) => { - return !app.manifestHash && app.id; - }); - }); - }) - .then(this.addApps) - .catch((error) => { - console.warn('DappsStore:fetchRegistry', error); - }); - } - - _fetchManifest (manifestHash) { - if (/^(0x)?0+/.test(manifestHash)) { - return Promise.resolve(null); - } - - if (this._manifests[manifestHash]) { - return Promise.resolve(this._manifests[manifestHash]); - } - - return fetch(`${this._getHost()}/api/content/${manifestHash}/`, { redirect: 'follow', mode: 'cors' }) - .then((response) => { - return response.ok - ? response.json() - : null; - }) - .then((manifest) => { - if (manifest) { - this._manifests[manifestHash] = manifest; - } - - return manifest; - }) - .catch((error) => { - console.warn('DappsStore:fetchManifest', error); - return null; - }); - } } From 4c3dea2a0bc826da1269c2a2bb9fbdc70762157c Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Sun, 11 Dec 2016 21:03:48 +0100 Subject: [PATCH 124/131] Fix React-Router in i18n locale change (#3815) * Routes in routes config => no more react router error message * Add LocalStorage for Locale Selection * Ethcore to Parity LTD --- js/src/i18n/store.js | 14 +++++ js/src/main.js | 69 ++----------------------- js/src/routes.js | 119 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+), 66 deletions(-) create mode 100644 js/src/routes.js diff --git a/js/src/i18n/store.js b/js/src/i18n/store.js index 773c596ef..497e55c72 100644 --- a/js/src/i18n/store.js +++ b/js/src/i18n/store.js @@ -19,11 +19,14 @@ import { action, observable, transaction } from 'mobx'; import { addLocaleData } from 'react-intl'; import de from 'react-intl/locale-data/de'; import en from 'react-intl/locale-data/en'; +import store from 'store'; import languages from './languages'; import deMessages from './de'; import enMessages from './en'; +const LS_STORE_KEY = '_parity::locale'; + let instance = null; const isProduction = process.env.NODE_ENV === 'production'; @@ -45,10 +48,21 @@ export default class Store { @observable messages = MESSAGES[DEFAULT]; @observable isDevelopment = !isProduction; + constructor () { + const savedLocale = store.get(LS_STORE_KEY); + + this.locale = (savedLocale && LOCALES.includes(savedLocale)) + ? savedLocale + : DEFAULT; + this.messages = MESSAGES[this.locale]; + } + @action setLocale (locale) { transaction(() => { this.locale = locale; this.messages = MESSAGES[locale]; + + store.set(LS_STORE_KEY, locale); }); } diff --git a/js/src/main.js b/js/src/main.js index 52d8b0976..1b2b66a94 100644 --- a/js/src/main.js +++ b/js/src/main.js @@ -15,10 +15,9 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; -import { Redirect, Router, Route, IndexRoute } from 'react-router'; - -import { Accounts, Account, Addresses, Address, Application, Contract, Contracts, WriteContract, Wallet, Dapp, Dapps, Settings, SettingsBackground, SettingsParity, SettingsProxy, SettingsViews, Signer, Status } from '~/views'; +import { Router } from 'react-router'; +import routes from './routes'; import styles from './reset.css'; export default class MainApplication extends Component { @@ -26,73 +25,11 @@ export default class MainApplication extends Component { routerHistory: PropTypes.any.isRequired }; - handleDeprecatedRoute = (nextState, replace) => { - const { address } = nextState.params; - const redirectMap = { - account: 'accounts', - address: 'addresses', - contract: 'contracts' - }; - - const oldRoute = nextState.routes[0].path; - const newRoute = Object.keys(redirectMap).reduce((newRoute, key) => { - return newRoute.replace(new RegExp(`^/${key}`), '/' + redirectMap[key]); - }, oldRoute); - - console.warn(`Route "${oldRoute}" is deprecated. Please use "${newRoute}"`); - replace(newRoute.replace(':address', address)); - } - render () { const { routerHistory } = this.props; return ( - <Router className={ styles.reset } history={ routerHistory }> - <Redirect from='/' to='/accounts' /> - <Redirect from='/auth' to='/accounts' query={ {} } /> - <Redirect from='/settings' to='/settings/views' /> - - { /** Backward Compatible links */ } - <Route path='/account/:address' onEnter={ this.handleDeprecatedRoute } /> - <Route path='/address/:address' onEnter={ this.handleDeprecatedRoute } /> - <Route path='/contract/:address' onEnter={ this.handleDeprecatedRoute } /> - - <Route path='/' component={ Application }> - <Route path='accounts'> - <IndexRoute component={ Accounts } /> - <Route path=':address' component={ Account } /> - <Route path='/wallet/:address' component={ Wallet } /> - </Route> - - <Route path='addresses'> - <IndexRoute component={ Addresses } /> - <Route path=':address' component={ Address } /> - </Route> - - <Route path='apps' component={ Dapps } /> - <Route path='app/:id' component={ Dapp } /> - - <Route path='contracts'> - <IndexRoute component={ Contracts } /> - <Route path='develop' component={ WriteContract } /> - <Route path=':address' component={ Contract } /> - </Route> - - <Route path='settings' component={ Settings }> - <Route path='background' component={ SettingsBackground } /> - <Route path='proxy' component={ SettingsProxy } /> - <Route path='views' component={ SettingsViews } /> - <Route path='parity' component={ SettingsParity } /> - </Route> - - <Route path='signer' component={ Signer } /> - - <Route path='status'> - <IndexRoute component={ Status } /> - <Route path=':subpage' component={ Status } /> - </Route> - </Route> - </Router> + <Router className={ styles.reset } history={ routerHistory } routes={ routes } /> ); } } diff --git a/js/src/routes.js b/js/src/routes.js new file mode 100644 index 000000000..82296852b --- /dev/null +++ b/js/src/routes.js @@ -0,0 +1,119 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import { + Accounts, Account, Addresses, Address, Application, + Contract, Contracts, WriteContract, Wallet, Dapp, Dapps, + Settings, SettingsBackground, SettingsParity, SettingsProxy, + SettingsViews, Signer, Status +} from '~/views'; + +function handleDeprecatedRoute (nextState, replace) { + const { address } = nextState.params; + const redirectMap = { + account: 'accounts', + address: 'addresses', + contract: 'contracts' + }; + + const oldRoute = nextState.routes[0].path; + const newRoute = Object.keys(redirectMap).reduce((newRoute, key) => { + return newRoute.replace(new RegExp(`^/${key}`), '/' + redirectMap[key]); + }, oldRoute); + + console.warn(`Route "${oldRoute}" is deprecated. Please use "${newRoute}"`); + replace(newRoute.replace(':address', address)); +} + +function redirectTo (path) { + return (nextState, replace) => { + replace(path); + }; +} + +const accountsRoutes = [ + { path: ':address', component: Account }, + { path: '/wallet/:address', component: Wallet } +]; + +const addressesRoutes = [ + { path: ':address', component: Address } +]; + +const contractsRoutes = [ + { path: 'develop', component: WriteContract }, + { path: ':address', component: Contract } +]; + +const settingsRoutes = [ + { path: 'background', component: SettingsBackground }, + { path: 'proxy', component: SettingsProxy }, + { path: 'views', component: SettingsViews }, + { path: 'parity', component: SettingsParity } +]; + +const statusRoutes = [ + { path: ':subpage', component: Status } +]; + +const routes = [ + // Backward Compatible routes + { path: '/account/:address', onEnter: handleDeprecatedRoute }, + { path: '/address/:address', onEnter: handleDeprecatedRoute }, + { path: '/contract/:address', onEnter: handleDeprecatedRoute }, + + { path: '/', onEnter: redirectTo('/accounts') }, + { path: '/auth', onEnter: redirectTo('/accounts') }, + { path: '/settings', onEnter: redirectTo('/settings/views') }, + + { + path: '/', + component: Application, + childRoutes: [ + { + path: 'accounts', + indexRoute: { component: Accounts }, + childRoutes: accountsRoutes + }, + { + path: 'addresses', + indexRoute: { component: Addresses }, + childRoutes: addressesRoutes + }, + { + path: 'contracts', + indexRoute: { component: Contracts }, + childRoutes: contractsRoutes + }, + { + path: 'status', + indexRoute: { component: Status }, + childRoutes: statusRoutes + }, + { + path: 'settings', + component: Settings, + childRoutes: settingsRoutes + }, + + { path: 'apps', component: Dapps }, + { path: 'app/:id', component: Dapp }, + { path: 'signer', component: Signer } + ] + } +]; + +export default routes; From 83d9bc189b6febc532cdbb5894fbcc08aa7f9ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Sun, 11 Dec 2016 21:08:15 +0100 Subject: [PATCH 125/131] Fixing test --- ethcore/light/src/net/tests/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 0b3226f0d..46e47bb3c 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -69,7 +69,7 @@ impl IoContext for Expect { Some(super::MAX_PROTOCOL_VERSION) } - fn persistent_peer_id(&self, _peer: &PeerId) -> Option<NodeId> { + fn persistent_peer_id(&self, _peer: PeerId) -> Option<NodeId> { None } } From 2de64bb5e49219a1052d0b19e80b4f160b51b550 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 20:24:36 +0000 Subject: [PATCH 126/131] [ci skip] js-precompiled 20161211-202217 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e14857b03..0da2d3b52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#343c9172fd4378d19046e48b69a0c590a79622ee" +source = "git+https://github.com/ethcore/js-precompiled.git#76b1f17e5a446de76493530d1d9d330e08d6ceac" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 39b0cf363..692bc5707 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.115", + "version": "0.2.116", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 22ac80d98fa711d42b57346fe8aa88061dd58960 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jacogr@gmail.com> Date: Mon, 12 Dec 2016 00:38:38 +0100 Subject: [PATCH 127/131] Add store for AddAddress (#3819) * WIP * Updated tests * Final round of fixes * Header update --- js/src/modals/AddAddress/addAddress.js | 158 ++++++++++---------- js/src/modals/AddAddress/addAddress.spec.js | 32 ++++ js/src/modals/AddAddress/store.js | 87 +++++++++++ js/src/modals/AddAddress/store.spec.js | 128 ++++++++++++++++ js/src/modals/AddAddress/store.test.js | 28 ++++ js/src/ui/Form/Input/input.js | 55 ++++--- js/src/ui/Form/InputAddress/inputAddress.js | 45 +++--- js/src/ui/Modal/modal.js | 21 ++- js/test/mocha.config.js | 4 +- 9 files changed, 423 insertions(+), 135 deletions(-) create mode 100644 js/src/modals/AddAddress/addAddress.spec.js create mode 100644 js/src/modals/AddAddress/store.js create mode 100644 js/src/modals/AddAddress/store.spec.js create mode 100644 js/src/modals/AddAddress/store.test.js diff --git a/js/src/modals/AddAddress/addAddress.js b/js/src/modals/AddAddress/addAddress.js index 177223290..437b87663 100644 --- a/js/src/modals/AddAddress/addAddress.js +++ b/js/src/modals/AddAddress/addAddress.js @@ -14,31 +14,29 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. -import React, { Component, PropTypes } from 'react'; import ContentAdd from 'material-ui/svg-icons/content/add'; import ContentClear from 'material-ui/svg-icons/content/clear'; +import { observer } from 'mobx-react'; +import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; -import { Button, Modal, Form, Input, InputAddress } from '~/ui'; -import { ERRORS, validateAddress, validateName } from '~/util/validation'; +import { Button, Form, Input, InputAddress, Modal } from '~/ui'; +import Store from './store'; + +@observer export default class AddAddress extends Component { static contextTypes = { api: PropTypes.object.isRequired } static propTypes = { - contacts: PropTypes.object.isRequired, address: PropTypes.string, - onClose: PropTypes.func + contacts: PropTypes.object.isRequired, + onClose: PropTypes.func.isRequired }; - state = { - address: '', - addressError: ERRORS.invalidAddress, - name: '', - nameError: ERRORS.invalidName, - description: '' - }; + store = new Store(this.context.api, this.props.contacts); componentWillMount () { if (this.props.address) { @@ -49,109 +47,113 @@ export default class AddAddress extends Component { render () { return ( <Modal - visible actions={ this.renderDialogActions() } - title='add saved address'> + title={ + <FormattedMessage + id='addAddress.label' + defaultMessage='add saved address' /> + } + visible> { this.renderFields() } </Modal> ); } renderDialogActions () { - const { addressError, nameError } = this.state; - const hasError = !!(addressError || nameError); + const { hasError } = this.store; return ([ <Button icon={ <ContentClear /> } - label='Cancel' - onClick={ this.onClose } />, + label={ + <FormattedMessage + id='addAddress.button.close' + defaultMessage='Cancel' /> + } + onClick={ this.onClose } + ref='closeButton' />, <Button - icon={ <ContentAdd /> } - label='Save Address' disabled={ hasError } - onClick={ this.onAdd } /> + icon={ <ContentAdd /> } + label={ + <FormattedMessage + id='addAddress.button.add' + defaultMessage='Save Address' /> + } + onClick={ this.onAdd } + ref='addButton' /> ]); } renderFields () { - const { address, addressError, description, name, nameError } = this.state; + const { address, addressError, description, name, nameError } = this.store; return ( <Form> <InputAddress - label='network address' - hint='the network address for the entry' - error={ addressError } - value={ address } - disabled={ !!this.props.address } allowCopy={ false } - onChange={ this.onEditAddress } /> + disabled={ !!this.props.address } + error={ addressError } + hint={ + <FormattedMessage + id='addAddress.input.address.hint' + defaultMessage='the network address for the entry' /> + } + label={ + <FormattedMessage + id='addAddress.input.address.label' + defaultMessage='network address' /> + } + onChange={ this.onEditAddress } + ref='inputAddress' + value={ address } /> <Input - label='address name' - hint='a descriptive name for the entry' error={ nameError } - value={ name } - onChange={ this.onEditName } /> + hint={ + <FormattedMessage + id='addAddress.input.name.hint' + defaultMessage='a descriptive name for the entry' /> + } + label={ + <FormattedMessage + id='addAddress.input.name.label' + defaultMessage='address name' /> + } + onChange={ this.onEditName } + ref='inputName' + value={ name } /> <Input - multiLine - rows={ 1 } - label='(optional) address description' - hint='an expanded description for the entry' - value={ description } - onChange={ this.onEditDescription } /> + hint={ + <FormattedMessage + id='addAddress.input.description.hint' + defaultMessage='an expanded description for the entry' /> + } + label={ + <FormattedMessage + id='addAddress.input.description.label' + defaultMessage='(optional) address description' /> + } + onChange={ this.onEditDescription } + ref='inputDescription' + value={ description } /> </Form> ); } - onEditAddress = (event, _address) => { - const { contacts } = this.props; - let { address, addressError } = validateAddress(_address); - - if (!addressError) { - const contact = contacts[address]; - - if (contact) { - addressError = ERRORS.duplicateAddress; - } - } - - this.setState({ - address, - addressError - }); + onEditAddress = (event, address) => { + this.store.setAddress(address); } onEditDescription = (event, description) => { - this.setState({ - description - }); + this.store.setDescription(description); } - onEditName = (event, _name) => { - const { name, nameError } = validateName(_name); - - this.setState({ - name, - nameError - }); + onEditName = (event, name) => { + this.store.setName(name); } onAdd = () => { - const { api } = this.context; - const { address, name, description } = this.state; - - Promise.all([ - api.parity.setAccountName(address, name), - api.parity.setAccountMeta(address, { - description, - timestamp: Date.now(), - deleted: false - }) - ]).catch((error) => { - console.error('onAdd', error); - }); - + this.store.add(); this.props.onClose(); } diff --git a/js/src/modals/AddAddress/addAddress.spec.js b/js/src/modals/AddAddress/addAddress.spec.js new file mode 100644 index 000000000..e03abd9d6 --- /dev/null +++ b/js/src/modals/AddAddress/addAddress.spec.js @@ -0,0 +1,32 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import { shallow } from 'enzyme'; +import React from 'react'; + +import AddAddress from './'; + +describe('modals/AddAddress', () => { + describe('rendering', () => { + it('renders defaults', () => { + expect( + shallow( + <AddAddress /> + ) + ).to.be.ok; + }); + }); +}); diff --git a/js/src/modals/AddAddress/store.js b/js/src/modals/AddAddress/store.js new file mode 100644 index 000000000..fd248a361 --- /dev/null +++ b/js/src/modals/AddAddress/store.js @@ -0,0 +1,87 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import { action, computed, transaction, observable } from 'mobx'; + +import { ERRORS, validateAddress, validateName } from '~/util/validation'; + +export default class Store { + @observable address = ''; + @observable addressError = ERRORS.invalidAddress; + @observable createError = null; + @observable description = ''; + @observable name = ''; + @observable nameError = ERRORS.invalidName; + + constructor (api, contacts) { + this._api = api; + this._contacts = contacts; + } + + @computed get hasError () { + return !!(this.addressError || this.nameError); + } + + @action setAddress = (_address) => { + let { address, addressError } = validateAddress(_address); + + if (!addressError) { + const contact = this._contacts[address]; + + if (contact) { + addressError = ERRORS.duplicateAddress; + } + } + + transaction(() => { + this.address = address; + this.addressError = addressError; + }); + } + + @action setCreateError = (error) => { + this.createError = error; + } + + @action setDescription = (description) => { + this.description = description; + } + + @action setName = (_name) => { + const { name, nameError } = validateName(_name); + + transaction(() => { + this.name = name; + this.nameError = nameError; + }); + } + + add () { + return Promise + .all([ + this._api.parity.setAccountName(this.address, this.name), + this._api.parity.setAccountMeta(this.address, { + description: this.description, + timestamp: Date.now(), + deleted: false + }) + ]) + .catch((error) => { + console.warn('Store:add', error); + this.setCreateError(error); + }); + } +} diff --git a/js/src/modals/AddAddress/store.spec.js b/js/src/modals/AddAddress/store.spec.js new file mode 100644 index 000000000..c730fa32f --- /dev/null +++ b/js/src/modals/AddAddress/store.spec.js @@ -0,0 +1,128 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import sinon from 'sinon'; + +import Store from './store'; + +import { TEST_ADDR_A, TEST_ADDR_B, TEST_CONTACTS } from './store.test.js'; + +describe('modals/AddAddress/store', () => { + let store; + + describe('@action', () => { + beforeEach(() => { + store = new Store(null, TEST_CONTACTS); + }); + + describe('setAddress', () => { + it('successfully sets non-existent addresses', () => { + store.setAddress(TEST_ADDR_B); + + expect(store.addressError).to.be.null; + expect(store.address).to.equal(TEST_ADDR_B); + }); + + it('fails on invalid addresses', () => { + store.setAddress('0xinvalid'); + + expect(store.addressError).not.to.be.null; + }); + + it('fails when an address is already added', () => { + store.setAddress(TEST_ADDR_A); + + expect(store.addressError).not.to.be.null; + }); + }); + + describe('setName', () => { + it('sucessfully sets valid names', () => { + const name = 'Test Name'; + + store.setName(name); + + expect(store.nameError).to.be.null; + expect(store.name).to.equal(name); + }); + + it('fails when name is invalid', () => { + store.setName(null); + + expect(store.nameError).not.to.be.null; + }); + }); + }); + + describe('@computed', () => { + beforeEach(() => { + store = new Store(null, TEST_CONTACTS); + }); + + describe('hasError', () => { + beforeEach(() => { + store.setAddress(TEST_ADDR_B); + store.setName('Test Name'); + }); + + it('returns false proper inputs', () => { + expect(store.hasError).to.be.false; + }); + + it('returns true with addressError', () => { + store.setAddress(TEST_ADDR_A); + + expect(store.addressError).not.to.be.null; + expect(store.hasError).to.be.true; + }); + + it('returns true with nameError', () => { + store.setName(null); + + expect(store.nameError).not.to.be.null; + expect(store.hasError).to.be.true; + }); + }); + }); + + describe('methods', () => { + let api; + + beforeEach(() => { + api = { + parity: { + setAccountMeta: sinon.stub().resolves(true), + setAccountName: sinon.stub().resolves(true) + } + }; + store = new Store(api, {}); + }); + + describe('add', () => { + it('calls setAccountMeta', () => { + store.add(); + + expect(api.parity.setAccountMeta).to.have.been.called; + }); + + it('calls setAccountName', () => { + store.add(); + + expect(api.parity.setAccountName).to.have.been.called; + }); + }); + }); +}); diff --git a/js/src/modals/AddAddress/store.test.js b/js/src/modals/AddAddress/store.test.js new file mode 100644 index 000000000..1d497a328 --- /dev/null +++ b/js/src/modals/AddAddress/store.test.js @@ -0,0 +1,28 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +const TEST_ADDR_A = '0x63Cf90D3f0410092FC0fca41846f596223979195'; +const TEST_ADDR_B = '0x00A40dEfa9933e82244bE542Fa7F8748eCCdd457'; + +const TEST_CONTACTS = { + [TEST_ADDR_A]: { name: 'test', meta: {} } +}; + +export { + TEST_ADDR_A, + TEST_ADDR_B, + TEST_CONTACTS +}; diff --git a/js/src/ui/Form/Input/input.js b/js/src/ui/Form/Input/input.js index b11400d04..8351de2e6 100644 --- a/js/src/ui/Form/Input/input.js +++ b/js/src/ui/Form/Input/input.js @@ -18,6 +18,8 @@ import React, { Component, PropTypes } from 'react'; import { TextField } from 'material-ui'; import { noop } from 'lodash'; +import { nodeOrStringProptype } from '~/util/proptypes'; + import CopyToClipboard from '../../CopyToClipboard'; import styles from './input.css'; @@ -41,18 +43,21 @@ const NAME_ID = ' '; export default class Input extends Component { static propTypes = { - children: PropTypes.node, - className: PropTypes.string, - disabled: PropTypes.bool, - readOnly: PropTypes.bool, allowCopy: PropTypes.oneOfType([ PropTypes.string, PropTypes.bool ]), - floatCopy: PropTypes.bool, + children: PropTypes.node, + className: PropTypes.string, + disabled: PropTypes.bool, error: PropTypes.string, - hint: PropTypes.string, - label: PropTypes.string, + readOnly: PropTypes.bool, + floatCopy: PropTypes.bool, + hint: nodeOrStringProptype(), + hideUnderline: PropTypes.bool, + label: nodeOrStringProptype(), + max: PropTypes.any, + min: PropTypes.any, multiLine: PropTypes.bool, onBlur: PropTypes.func, onChange: PropTypes.func, @@ -61,26 +66,26 @@ export default class Input extends Component { rows: PropTypes.number, type: PropTypes.string, submitOnBlur: PropTypes.bool, - hideUnderline: PropTypes.bool, + style: PropTypes.object, value: PropTypes.oneOfType([ - PropTypes.number, PropTypes.string - ]), - min: PropTypes.any, - max: PropTypes.any, - style: PropTypes.object + PropTypes.number, + PropTypes.string + ]) }; static defaultProps = { - submitOnBlur: true, - readOnly: false, allowCopy: false, hideUnderline: false, floatCopy: false, + readOnly: false, + submitOnBlur: true, style: {} } state = { - value: typeof this.props.value === 'undefined' ? '' : this.props.value + value: typeof this.props.value === 'undefined' + ? '' + : this.props.value } componentWillReceiveProps (newProps) { @@ -114,38 +119,29 @@ export default class Input extends Component { autoComplete='off' className={ className } errorText={ error } - floatingLabelFixed floatingLabelText={ label } - + fullWidth hintText={ hint } id={ NAME_ID } inputStyle={ inputStyle } - fullWidth - max={ max } min={ min } - multiLine={ multiLine } name={ NAME_ID } - onBlur={ this.onBlur } onChange={ this.onChange } onKeyDown={ this.onKeyDown } onPaste={ this.onPaste } - readOnly={ readOnly } rows={ rows } style={ textFieldStyle } type={ type || 'text' } - underlineDisabledStyle={ UNDERLINE_DISABLED } underlineStyle={ readOnly ? UNDERLINE_READONLY : UNDERLINE_NORMAL } underlineFocusStyle={ readOnly ? { display: 'none' } : null } underlineShow={ !hideUnderline } - - value={ value } - > + value={ value }> { children } </TextField> </div> @@ -159,11 +155,14 @@ export default class Input extends Component { if (!allowCopy) { return null; } + const text = typeof allowCopy === 'string' ? allowCopy : value; - const style = hideUnderline ? {} : { position: 'relative', top: '2px' }; + const style = hideUnderline + ? {} + : { position: 'relative', top: '2px' }; return ( <div className={ styles.copy } style={ style }> diff --git a/js/src/ui/Form/InputAddress/inputAddress.js b/js/src/ui/Form/InputAddress/inputAddress.js index 1f062382a..e2a0707d5 100644 --- a/js/src/ui/Form/InputAddress/inputAddress.js +++ b/js/src/ui/Form/InputAddress/inputAddress.js @@ -18,28 +18,30 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import Input from '../Input'; -import IdentityIcon from '../../IdentityIcon'; import util from '~/api/util'; +import { nodeOrStringProptype } from '~/util/proptypes'; + +import IdentityIcon from '../../IdentityIcon'; +import Input from '../Input'; import styles from './inputAddress.css'; class InputAddress extends Component { static propTypes = { + accountsInfo: PropTypes.object, + allowCopy: PropTypes.bool, className: PropTypes.string, disabled: PropTypes.bool, error: PropTypes.string, - label: PropTypes.string, - hint: PropTypes.string, - value: PropTypes.string, - accountsInfo: PropTypes.object, - tokens: PropTypes.object, - text: PropTypes.bool, + hideUnderline: PropTypes.bool, + hint: nodeOrStringProptype(), + label: nodeOrStringProptype(), onChange: PropTypes.func, onSubmit: PropTypes.func, - hideUnderline: PropTypes.bool, - allowCopy: PropTypes.bool, - small: PropTypes.bool + small: PropTypes.bool, + text: PropTypes.bool, + tokens: PropTypes.object, + value: PropTypes.string }; static defaultProps = { @@ -49,8 +51,8 @@ class InputAddress extends Component { }; render () { - const { className, disabled, error, label, hint, value, text } = this.props; - const { small, allowCopy, hideUnderline, onSubmit, accountsInfo, tokens } = this.props; + const { className, disabled, error, hint, label, text, value } = this.props; + const { accountsInfo, allowCopy, hideUnderline, onSubmit, small, tokens } = this.props; const account = accountsInfo[value] || tokens[value]; @@ -68,17 +70,20 @@ class InputAddress extends Component { return ( <div className={ containerClasses.join(' ') }> <Input + allowCopy={ allowCopy && (disabled ? value : false) } className={ classes.join(' ') } disabled={ disabled } - label={ label } - hint={ hint } error={ error } - value={ text && account ? account.name : value } + hideUnderline={ hideUnderline } + hint={ hint } + label={ label } onChange={ this.handleInputChange } onSubmit={ onSubmit } - allowCopy={ allowCopy && (disabled ? value : false) } - hideUnderline={ hideUnderline } - /> + value={ + text && account + ? account.name + : value + } /> { icon } </div> ); @@ -128,8 +133,8 @@ class InputAddress extends Component { } function mapStateToProps (state) { - const { accountsInfo } = state.personal; const { tokens } = state.balances; + const { accountsInfo } = state.personal; return { accountsInfo, diff --git a/js/src/ui/Modal/modal.js b/js/src/ui/Modal/modal.js index fd8e67aad..f72c3ffb1 100644 --- a/js/src/ui/Modal/modal.js +++ b/js/src/ui/Modal/modal.js @@ -42,11 +42,11 @@ class Modal extends Component { className: PropTypes.string, compact: PropTypes.bool, current: PropTypes.number, - waiting: PropTypes.array, + settings: PropTypes.object.isRequired, steps: PropTypes.array, title: nodeOrStringProptype(), visible: PropTypes.bool.isRequired, - settings: PropTypes.object.isRequired + waiting: PropTypes.array } render () { @@ -55,23 +55,23 @@ class Modal extends Component { const contentStyle = muiTheme.parity.getBackgroundStyle(null, settings.backgroundSeed); const header = ( <Title - current={ current } busy={ busy } - waiting={ waiting } + current={ current } steps={ steps } - title={ title } /> + title={ title } + waiting={ waiting } /> ); const classes = `${styles.dialog} ${className}`; return ( <Dialog - className={ classes } actions={ actions } + actionsContainerClassName={ styles.actions } actionsContainerStyle={ ACTIONS_STYLE } autoDetectWindowHeight={ false } autoScrollBodyContent - actionsContainerClassName={ styles.actions } bodyClassName={ styles.body } + className={ classes } contentClassName={ styles.content } contentStyle={ contentStyle } modal @@ -82,7 +82,12 @@ class Modal extends Component { style={ DIALOG_STYLE } title={ header } titleStyle={ TITLE_STYLE }> - <Container light compact={ compact } style={ { transition: 'none' } }> + <Container + compact={ compact } + light + style={ + { transition: 'none' } + }> { children } </Container> </Dialog> diff --git a/js/test/mocha.config.js b/js/test/mocha.config.js index e90c91ebf..3201cd4ac 100644 --- a/js/test/mocha.config.js +++ b/js/test/mocha.config.js @@ -15,11 +15,13 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. import 'isomorphic-fetch'; +import 'mock-local-storage'; import es6Promise from 'es6-promise'; es6Promise.polyfill(); -import 'mock-local-storage'; +import injectTapEventPlugin from 'react-tap-event-plugin'; +injectTapEventPlugin(); import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; From 0cb16ae5895b5457a4d43881c22f4a35a0a5939c Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac <ngotchac@gmail.com> Date: Mon, 12 Dec 2016 00:38:47 +0100 Subject: [PATCH 128/131] Add store for MethodDecoding (#3821) * Add Loader to Transactions * Add Method Decoding Store (better fetching of methods) * Load locally stored ABI in MethodDecodingStore * Fixes UI glitches along the way * Linting * Add method decoding from User Contracts --- js/src/redux/providers/personalActions.js | 5 + js/src/ui/Form/AddressSelect/addressSelect.js | 56 +++-- js/src/ui/Form/AutoComplete/autocomplete.css | 24 ++ js/src/ui/Form/AutoComplete/autocomplete.js | 22 +- js/src/ui/MethodDecoding/methodDecoding.js | 138 +++-------- .../ui/MethodDecoding/methodDecodingStore.js | 216 ++++++++++++++++++ .../Account/Transactions/transactions.js | 27 ++- js/src/views/WriteContract/writeContract.css | 4 + 8 files changed, 360 insertions(+), 132 deletions(-) create mode 100644 js/src/ui/Form/AutoComplete/autocomplete.css create mode 100644 js/src/ui/MethodDecoding/methodDecodingStore.js diff --git a/js/src/redux/providers/personalActions.js b/js/src/redux/providers/personalActions.js index b172aaf8d..7ca7c3374 100644 --- a/js/src/redux/providers/personalActions.js +++ b/js/src/redux/providers/personalActions.js @@ -19,6 +19,8 @@ import { isEqual } from 'lodash'; import { fetchBalances } from './balancesActions'; import { attachWallets } from './walletActions'; +import MethodDecodingStore from '~/ui/MethodDecoding/methodDecodingStore'; + export function personalAccountsInfo (accountsInfo) { const accounts = {}; const contacts = {}; @@ -41,6 +43,9 @@ export function personalAccountsInfo (accountsInfo) { } }); + // Load user contracts for Method Decoding + MethodDecodingStore.loadContracts(contracts); + return (dispatch) => { const data = { accountsInfo, diff --git a/js/src/ui/Form/AddressSelect/addressSelect.js b/js/src/ui/Form/AddressSelect/addressSelect.js index 3fb15cd86..c443ecaa2 100644 --- a/js/src/ui/Form/AddressSelect/addressSelect.js +++ b/js/src/ui/Form/AddressSelect/addressSelect.js @@ -16,6 +16,7 @@ import React, { Component, PropTypes } from 'react'; import { MenuItem } from 'material-ui'; +import { isEqual, pick } from 'lodash'; import AutoComplete from '../AutoComplete'; import IdentityIcon from '../../IdentityIcon'; @@ -31,19 +32,20 @@ export default class AddressSelect extends Component { } static propTypes = { - disabled: PropTypes.bool, + onChange: PropTypes.func.isRequired, + accounts: PropTypes.object, + allowInput: PropTypes.bool, + balances: PropTypes.object, contacts: PropTypes.object, contracts: PropTypes.object, - wallets: PropTypes.object, - label: PropTypes.string, - hint: PropTypes.string, + disabled: PropTypes.bool, error: PropTypes.string, - value: PropTypes.string, + hint: PropTypes.string, + label: PropTypes.string, tokens: PropTypes.object, - onChange: PropTypes.func.isRequired, - allowInput: PropTypes.bool, - balances: PropTypes.object + value: PropTypes.string, + wallets: PropTypes.object } state = { @@ -53,6 +55,9 @@ export default class AddressSelect extends Component { value: '' } + // Cache autocomplete items + items = {} + entriesFromProps (props = this.props) { const { accounts = {}, contacts = {}, contracts = {}, wallets = {} } = props; @@ -76,6 +81,15 @@ export default class AddressSelect extends Component { return { autocompleteEntries, entries }; } + shouldComponentUpdate (nextProps, nextState) { + const keys = [ 'error', 'value' ]; + + const prevValues = pick(this.props, keys); + const nextValues = pick(nextProps, keys); + + return !isEqual(prevValues, nextValues); + } + componentWillMount () { const { value } = this.props; const { entries, autocompleteEntries } = this.entriesFromProps(); @@ -143,14 +157,21 @@ export default class AddressSelect extends Component { renderItem = (entry) => { const { address, name } = entry; - return { - text: name && name.toUpperCase() || address, - value: this.renderMenuItem(address), - address - }; + const _balance = this.getBalance(address); + const balance = _balance ? _balance.toNumber() : _balance; + + if (!this.items[address] || this.items[address].balance !== balance) { + this.items[address] = { + text: name && name.toUpperCase() || address, + value: this.renderMenuItem(address), + address, balance + }; + } + + return this.items[address]; } - renderBalance (address) { + getBalance (address) { const { balances = {} } = this.props; const balance = balances[address]; @@ -164,7 +185,12 @@ export default class AddressSelect extends Component { return null; } - const value = fromWei(ethToken.value); + return ethToken.value; + } + + renderBalance (address) { + const balance = this.getBalance(address); + const value = fromWei(balance); return ( <div className={ styles.balance }> diff --git a/js/src/ui/Form/AutoComplete/autocomplete.css b/js/src/ui/Form/AutoComplete/autocomplete.css new file mode 100644 index 000000000..9fad53edb --- /dev/null +++ b/js/src/ui/Form/AutoComplete/autocomplete.css @@ -0,0 +1,24 @@ +/* Copyright 2015, 2016 Ethcore (UK) Ltd. +/* This file is part of Parity. +/* +/* Parity is free software: you can redistribute it and/or modify +/* it under the terms of the GNU General Public License as published by +/* the Free Software Foundation, either version 3 of the License, or +/* (at your option) any later version. +/* +/* Parity is distributed in the hope that it will be useful, +/* but WITHOUT ANY WARRANTY; without even the implied warranty of +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +/* GNU General Public License for more details. +/* +/* You should have received a copy of the GNU General Public License +/* along with Parity. If not, see <http://www.gnu.org/licenses/>. +*/ + +.item { + &:last-child { + &.divider { + display: none; + } + } +} diff --git a/js/src/ui/Form/AutoComplete/autocomplete.js b/js/src/ui/Form/AutoComplete/autocomplete.js index c98019009..3ebd59772 100644 --- a/js/src/ui/Form/AutoComplete/autocomplete.js +++ b/js/src/ui/Form/AutoComplete/autocomplete.js @@ -21,13 +21,18 @@ import { PopoverAnimationVertical } from 'material-ui/Popover'; import { isEqual } from 'lodash'; +import styles from './autocomplete.css'; + // Hack to prevent "Unknown prop `disableFocusRipple` on <hr> tag" error class Divider extends Component { static muiName = MUIDivider.muiName; render () { return ( - <div style={ { margin: '0.25em 0' } }> + <div + style={ { margin: '0.25em 0' } } + className={ [styles.item, styles.divider].join(' ') } + > <MUIDivider style={ { height: 2 } } /> </div> ); @@ -143,11 +148,16 @@ export default class AutoComplete extends Component { if (renderItem && typeof renderItem === 'function') { item = renderItem(entry); + + // Add the item class to the entry + const classNames = [ styles.item ].concat(item.value.props.className); + item.value = React.cloneElement(item.value, { className: classNames.join(' ') }); } else { item = { text: entry, value: ( <MenuItem + className={ styles.item } primaryText={ entry } /> ) @@ -160,6 +170,7 @@ export default class AutoComplete extends Component { } item.divider = currentDivider; + item.entry = entry; return item; }).filter((item) => item !== undefined); @@ -215,13 +226,8 @@ export default class AutoComplete extends Component { return; } - const { entries } = this.props; - - const entriesArray = (entries instanceof Array) - ? entries - : Object.values(entries); - - const entry = entriesArray[idx]; + const { dataSource } = this.state; + const { entry } = dataSource[idx]; this.handleOnChange(entry); this.setState({ entry, open: false }); diff --git a/js/src/ui/MethodDecoding/methodDecoding.js b/js/src/ui/MethodDecoding/methodDecoding.js index e02355ffb..fcf7f7513 100644 --- a/js/src/ui/MethodDecoding/methodDecoding.js +++ b/js/src/ui/MethodDecoding/methodDecoding.js @@ -17,16 +17,14 @@ import BigNumber from 'bignumber.js'; import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; -import { bindActionCreators } from 'redux'; import CircularProgress from 'material-ui/CircularProgress'; -import Contracts from '~/contracts'; import { Input, InputAddress } from '../Form'; +import MethodDecodingStore from './methodDecodingStore'; import styles from './methodDecoding.css'; const ASCII_INPUT = /^[a-z0-9\s,?;.:/!()-_@'"#]+$/i; -const CONTRACT_CREATE = '0x60606040'; const TOKEN_METHODS = { '0xa9059cbb': 'transfer(to,value)' }; @@ -38,19 +36,17 @@ class MethodDecoding extends Component { static propTypes = { address: PropTypes.string.isRequired, - tokens: PropTypes.object, + token: PropTypes.object, transaction: PropTypes.object, historic: PropTypes.bool } state = { contractAddress: null, - method: null, methodName: null, methodInputs: null, methodParams: null, methodSignature: null, - token: null, isContract: false, isDeploy: false, isReceived: false, @@ -59,14 +55,29 @@ class MethodDecoding extends Component { inputType: 'auto' } - componentWillMount () { - const lookupResult = this.lookup(); + methodDecodingStore = MethodDecodingStore.get(this.context.api); - if (typeof lookupResult === 'object' && typeof lookupResult.then === 'function') { - lookupResult.then(() => this.setState({ isLoading: false })); - } else { - this.setState({ isLoading: false }); - } + componentWillMount () { + const { address, transaction } = this.props; + + this + .methodDecodingStore + .lookup(address, transaction) + .then((lookup) => { + const newState = { + methodName: lookup.name, + methodInputs: lookup.inputs, + methodParams: lookup.params, + methodSignature: lookup.signature, + + isContract: lookup.contract, + isDeploy: lookup.deploy, + isLoading: false, + isReceived: lookup.received + }; + + this.setState(newState); + }); } render () { @@ -116,7 +127,8 @@ class MethodDecoding extends Component { } renderAction () { - const { methodName, methodInputs, methodSignature, token, isDeploy, isReceived, isContract } = this.state; + const { token } = this.props; + const { methodName, methodInputs, methodSignature, isDeploy, isReceived, isContract } = this.state; if (isDeploy) { return this.renderDeploy(); @@ -378,7 +390,7 @@ class MethodDecoding extends Component { } renderTokenValue (value) { - const { token } = this.state; + const { token } = this.props; return ( <span className={ styles.tokenValue }> @@ -436,96 +448,18 @@ class MethodDecoding extends Component { }); } - lookup () { - const { transaction } = this.props; - - if (!transaction) { - return; - } - - const { api } = this.context; - const { address, tokens } = this.props; - - const isReceived = transaction.to === address; - const contractAddress = isReceived ? transaction.from : transaction.to; - const input = transaction.input || transaction.data; - - const token = (tokens || {})[contractAddress]; - this.setState({ token, isReceived, contractAddress }); - - if (!input || input === '0x') { - return; - } - - const { signature, paramdata } = api.util.decodeCallData(input); - this.setState({ methodSignature: signature, methodParams: paramdata }); - - if (!signature || signature === CONTRACT_CREATE || transaction.creates) { - this.setState({ isDeploy: true }); - return; - } - - if (contractAddress === '0x') { - return; - } - - return api.eth - .getCode(contractAddress || transaction.creates) - .then((bytecode) => { - const isContract = bytecode && /^(0x)?([0]*[1-9a-f]+[0]*)+$/.test(bytecode); - - this.setState({ isContract }); - - if (!isContract) { - return; - } - - return Contracts.get() - .signatureReg - .lookup(signature) - .then((method) => { - let methodInputs = null; - let methodName = null; - - if (method && method.length) { - const { methodParams } = this.state; - const abi = api.util.methodToAbi(method); - - methodName = abi.name; - methodInputs = api.util - .decodeMethodInput(abi, methodParams) - .map((value, index) => { - const type = abi.inputs[index].type; - - return { type, value }; - }); - } - - this.setState({ - method, - methodName, - methodInputs, - bytecode - }); - }); - }) - .catch((error) => { - console.warn('lookup', error); - }); - } } -function mapStateToProps (state) { - const { tokens } = state.balances; +function mapStateToProps (initState, initProps) { + const { tokens } = initState.balances; + const { address } = initProps; - return { tokens }; + const token = (tokens || {})[address]; + + return () => { + return { token }; + }; } - -function mapDispatchToProps (dispatch) { - return bindActionCreators({}, dispatch); -} - export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps )(MethodDecoding); diff --git a/js/src/ui/MethodDecoding/methodDecodingStore.js b/js/src/ui/MethodDecoding/methodDecodingStore.js new file mode 100644 index 000000000..24433e541 --- /dev/null +++ b/js/src/ui/MethodDecoding/methodDecodingStore.js @@ -0,0 +1,216 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see <http://www.gnu.org/licenses/>. + +import Contracts from '~/contracts'; +import Abi from '~/abi'; +import * as abis from '~/contracts/abi'; + +const CONTRACT_CREATE = '0x60606040'; + +let instance = null; + +export default class MethodDecodingStore { + + api = null; + + _isContract = {}; + _methods = {}; + + constructor (api, contracts = {}) { + this.api = api; + + // Load the signatures from the local ABIs + Object.keys(abis).forEach((abiKey) => { + this.loadFromAbi(abis[abiKey]); + }); + + this.addContracts(contracts); + } + + addContracts (contracts = {}) { + // Load the User defined contracts + Object.values(contracts).forEach((contract) => { + if (!contract || !contract.meta || !contract.meta.abi) { + return; + } + this.loadFromAbi(contract.meta.abi); + }); + } + + loadFromAbi (_abi) { + const abi = new Abi(_abi); + abi + .functions + .map((f) => ({ sign: f.signature, abi: f.abi })) + .forEach((mapping) => { + const sign = (/^0x/.test(mapping.sign) ? '' : '0x') + mapping.sign; + this._methods[sign] = mapping.abi; + }); + } + + static get (api, contracts = {}) { + if (!instance) { + instance = new MethodDecodingStore(api, contracts); + } + + // Set API if not set yet + if (!instance.api) { + instance.api = api; + } + + return instance; + } + + static loadContracts (contracts = {}) { + if (!instance) { + // Just create the instance with null API + MethodDecodingStore.get(null, contracts); + } else { + instance.addContracts(contracts); + } + } + + /** + * Looks up a transaction in the context of the given + * address + * + * @param {String} address The address contract + * @param {Object} transaction The transaction to lookup + * @return {Promise} The result of the lookup. Resolves with: + * { + * contract: Boolean, + * deploy: Boolean, + * inputs: Array, + * name: String, + * params: Array, + * received: Boolean, + * signature: String + * } + */ + lookup (address, transaction) { + const result = {}; + + if (!transaction) { + return Promise.resolve(result); + } + + const isReceived = transaction.to === address; + const contractAddress = isReceived ? transaction.from : transaction.to; + const input = transaction.input || transaction.data; + + result.received = isReceived; + + // No input, should be a ETH transfer + if (!input || input === '0x') { + return Promise.resolve(result); + } + + const { signature, paramdata } = this.api.util.decodeCallData(input); + result.signature = signature; + result.params = paramdata; + + // Contract deployment + if (!signature || signature === CONTRACT_CREATE || transaction.creates) { + return Promise.resolve({ ...result, deploy: true }); + } + + return this + .isContract(contractAddress || transaction.creates) + .then((isContract) => { + result.contract = isContract; + + if (!isContract) { + return result; + } + + return this + .fetchMethodAbi(signature) + .then((abi) => { + let methodName = null; + let methodInputs = null; + + if (abi) { + methodName = abi.name; + methodInputs = this.api.util + .decodeMethodInput(abi, paramdata) + .map((value, index) => { + const type = abi.inputs[index].type; + return { type, value }; + }); + } + + return { + ...result, + name: methodName, + inputs: methodInputs + }; + }); + }) + .catch((error) => { + console.warn('lookup', error); + }); + } + + fetchMethodAbi (signature) { + if (this._methods[signature] !== undefined) { + return Promise.resolve(this._methods[signature]); + } + + this._methods[signature] = Contracts.get() + .signatureReg + .lookup(signature) + .then((method) => { + let abi = null; + + if (method && method.length) { + abi = this.api.util.methodToAbi(method); + } + + this._methods[signature] = abi; + return this._methods[signature]; + }); + + return Promise.resolve(this._methods[signature]); + } + + /** + * Checks (and caches) if the given address is a + * Contract or not, from its fetched bytecode + */ + isContract (contractAddress) { + // If zero address, it isn't a contract + if (/^(0x)?0*$/.test(contractAddress)) { + return Promise.resolve(false); + } + + if (this._isContract[contractAddress]) { + return Promise.resolve(this._isContract[contractAddress]); + } + + this._isContract[contractAddress] = this.api.eth + .getCode(contractAddress) + .then((bytecode) => { + // Is a contract if the address contains *valid* bytecode + const _isContract = bytecode && /^(0x)?([0]*[1-9a-f]+[0]*)+$/.test(bytecode); + + this._isContract[contractAddress] = _isContract; + return this._isContract[contractAddress]; + }); + + return Promise.resolve(this._isContract[contractAddress]); + } + +} diff --git a/js/src/views/Account/Transactions/transactions.js b/js/src/views/Account/Transactions/transactions.js index b8b28208f..eb11e8def 100644 --- a/js/src/views/Account/Transactions/transactions.js +++ b/js/src/views/Account/Transactions/transactions.js @@ -19,7 +19,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import etherscan from '~/3rdparty/etherscan'; -import { Container, TxList } from '~/ui'; +import { Container, TxList, Loading } from '~/ui'; import styles from './transactions.css'; @@ -60,19 +60,32 @@ class Transactions extends Component { } render () { - const { address } = this.props; - const { hashes } = this.state; - return ( <Container title='transactions'> - <TxList - address={ address } - hashes={ hashes } /> + { this.renderTransactionList() } { this.renderEtherscanFooter() } </Container> ); } + renderTransactionList () { + const { address } = this.props; + const { hashes, loading } = this.state; + + if (loading) { + return ( + <Loading /> + ); + } + + return ( + <TxList + address={ address } + hashes={ hashes } + /> + ); + } + renderEtherscanFooter () { const { traceMode } = this.props; diff --git a/js/src/views/WriteContract/writeContract.css b/js/src/views/WriteContract/writeContract.css index ca47e7332..2502c4060 100644 --- a/js/src/views/WriteContract/writeContract.css +++ b/js/src/views/WriteContract/writeContract.css @@ -32,6 +32,10 @@ flex: 1; flex-direction: row; + // Fallback for browsers not supporting `calc` + min-height: 90vh; + min-height: calc(100vh - 8em); + > * { margin: 0; From 29af24519d20b14e43df894b5731eb20b20f8ce2 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Sun, 11 Dec 2016 23:48:03 +0000 Subject: [PATCH 129/131] [ci skip] js-precompiled 20161211-234535 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0da2d3b52..3bd372326 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#76b1f17e5a446de76493530d1d9d330e08d6ceac" +source = "git+https://github.com/ethcore/js-precompiled.git#ee7a831d2b268b0992b6942fbd4811f4fa8118ea" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 692bc5707..c3e576dc9 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.116", + "version": "0.2.117", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From f1096619a5419eea047e7918581499b50eac1bce Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Mon, 12 Dec 2016 03:43:28 +0000 Subject: [PATCH 130/131] [ci skip] js-precompiled 20161212-034026 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3bd372326..0a084b644 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#ee7a831d2b268b0992b6942fbd4811f4fa8118ea" +source = "git+https://github.com/ethcore/js-precompiled.git#2ee29643a048cca9fc0c7cde0b8409101dc73802" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index c3e576dc9..8a3b60c36 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.117", + "version": "0.2.118", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From 1db46473272a70265ff5259f3b77ab8499c0d069 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Mon, 12 Dec 2016 05:26:15 +0000 Subject: [PATCH 131/131] [ci skip] js-precompiled 20161212-052342 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0a084b644..eb86cd47b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#2ee29643a048cca9fc0c7cde0b8409101dc73802" +source = "git+https://github.com/ethcore/js-precompiled.git#eb9d978ed5ad1c514b37e89c716f80b3c8d613b5" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 8a3b60c36..95b15bb83 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.118", + "version": "0.2.119", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>",