Skip to content

Commit 69da95c

Browse files
committed
fix: remove uneeded log statements
1 parent 8905dce commit 69da95c

File tree

3 files changed

+5
-24
lines changed

3 files changed

+5
-24
lines changed

adapter/src/ethereum.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,7 @@ impl Adapter for EthereumAdapter {
135135
.hash_hex(&self.config.ethereum_core_address)
136136
.map_err(|_| map_error("Failed to hash the channel id"))?;
137137

138-
println!("checking1");
139-
println!("checking2");
140138
let our_channel_id = format!("0x{}", hex::encode(channel.id));
141-
println!(" our_channel_id {}", our_channel_id);
142-
println!(" channel_id {}", channel_id);
143139
if channel_id != our_channel_id {
144140
return Err(AdapterError::Configuration(
145141
"channel.id is not valid".to_string(),
@@ -164,12 +160,8 @@ impl Adapter for EthereumAdapter {
164160
None,
165161
)
166162
.wait()
167-
.map_err(|e| {
168-
println!("{:?}", e);
169-
map_error("contract channel status query failed")
170-
})?;
163+
.map_err(|e| map_error("contract channel status query failed"))?;
171164

172-
println!(" channel_status {}", channel_status);
173165
if channel_status != *CHANNEL_STATE_ACTIVE {
174166
return Err(AdapterError::Configuration(
175167
"channel is not Active on the ethereum network".to_string(),
@@ -525,7 +517,6 @@ mod test {
525517
.wait()
526518
.expect("failed to init adex contract");
527519

528-
println!("adex_contract address {:?}", adex_contract.address());
529520
// contract call set balance
530521
token_contract
531522
.call(
@@ -536,7 +527,6 @@ mod test {
536527
)
537528
.wait()
538529
.expect("Failed to set balance");
539-
println!("token address {}", token_contract.address());
540530

541531
let leader_validator_desc = ValidatorDesc {
542532
// keystore.json addresss (same with js)
@@ -601,7 +591,6 @@ mod test {
601591
.expect("failed to deserialise contract addr");
602592

603593
let channel_id = eth_channel.hash(&contract_addr).expect("hash hex");
604-
println!("channel_id {}", hex::encode(channel_id));
605594
// set id to proper id
606595
valid_channel.id = ChannelId::from_hex(hex::encode(channel_id))
607596
.expect("prep_db: failed to deserialize channel id");

adapter/src/lib.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ impl EthereumChannel {
131131
.iter()
132132
.map(|v| Address::from_slice(v.inner()))
133133
.collect();
134-
// let validator1 = hex::decode("2bdeafae53940669daa6f519373f686c1f3d3393").expect("should deserialize v1");
135-
// let validator2 = hex::decode("6704Fbfcd5Ef766B287262fA2281C105d57246a6").expect("should deserialize v2");
136134

137135
Ok(Self {
138136
creator,
@@ -145,10 +143,6 @@ impl EthereumChannel {
145143
}
146144

147145
pub fn hash(&self, contract_addr: &[u8; 20]) -> Result<[u8; 32], Box<dyn Error>> {
148-
// println!("hash {} {}, {} {}, {} {}",&self.creator[2..], &self.creator[2..].len(), contract_addr, contract_addr.len(), &self.token_addr[2..], &self.token_addr[2..].len());
149-
150-
// println!("deposit amount 2 {}", self.token_amount);
151-
// println!("valid_until 2 {}", self.valid_until);
152146
let tokens = [
153147
Token::Address(Address::from_slice(contract_addr)),
154148
Token::Address(self.creator.to_owned()),
@@ -228,16 +222,14 @@ fn encode_params(params: &[(ParamType, &str)], lenient: bool) -> Result<Vec<u8>,
228222
let tokens = params
229223
.iter()
230224
.map(|(param, value)| {
231-
println!("{}", value);
232225
if lenient {
233226
LenientTokenizer::tokenize(param, value)
234227
} else {
235228
StrictTokenizer::tokenize(param, value)
236229
}
237230
})
238231
.collect::<Result<Vec<_>, _>>()?;
239-
240-
println!("{:?}", tokens);
232+
241233
Ok(encode(&tokens).to_vec())
242234
}
243235

sentry/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ hex = "0.3.2"
1515
# CLI
1616
clap = "2.33.0"
1717
# Server
18-
tokio = "0.2.4"
19-
hyper = { version = "0.13.1" }
18+
tokio = "0.2.0-alpha.6"
19+
hyper = {version = "=0.13.0-alpha.4", features = ["unstable-stream"]}
2020
regex = "1"
2121
# Database
22-
redis = { version = "0.13.1-alpha.0", features = ["tokio-rt-core"]}
22+
redis = {version = "0.13.1-alpha.0"}
2323
bb8 = { git = "https://github.com/djc/bb8", branch = "async-await" }
2424
bb8-postgres = { git = "https://github.com/djc/bb8", branch = "async-await", features = ["with-chrono-0_4", "with-serde_json-1"] }
2525
# Migrations

0 commit comments

Comments
 (0)