summaryrefslogtreecommitdiff
path: root/eth-wire
diff options
context:
space:
mode:
authorAntoine A <>2022-02-06 18:54:51 +0100
committerAntoine A <>2022-02-06 18:54:51 +0100
commit79f0adf3132feab2135ddf51e58e33a7f9c4dc81 (patch)
tree1b3497c51e10fb27795a28b89e97bbaa574af8e3 /eth-wire
parent328d7758e31a025301be956310cbb47a3ed4b29a (diff)
downloaddepolymerization-79f0adf3132feab2135ddf51e58e33a7f9c4dc81.tar.gz
depolymerization-79f0adf3132feab2135ddf51e58e33a7f9c4dc81.tar.bz2
depolymerization-79f0adf3132feab2135ddf51e58e33a7f9c4dc81.zip
Improve tests
Diffstat (limited to 'eth-wire')
-rw-r--r--eth-wire/src/bin/eth-wire-cli.rs3
-rw-r--r--eth-wire/src/bin/eth-wire-utils.rs3
-rw-r--r--eth-wire/src/loops/worker.rs2
3 files changed, 5 insertions, 3 deletions
diff --git a/eth-wire/src/bin/eth-wire-cli.rs b/eth-wire/src/bin/eth-wire-cli.rs
index 94149a1..3180506 100644
--- a/eth-wire/src/bin/eth-wire-cli.rs
+++ b/eth-wire/src/bin/eth-wire-cli.rs
@@ -18,10 +18,11 @@ use eth_wire::{rpc::Rpc, BlockState};
use ethereum_types::H160;
use common::{
config::{Config, CoreConfig},
- postgres::{Client, NoTls},
+ postgres::{Client, NoTls}, log::init,
};
fn main() {
+ init();
let args: Vec<_> = std::env::args().collect();
let config = CoreConfig::load_from_file(&args[2]);
assert_eq!(config.currency, "ETH");
diff --git a/eth-wire/src/bin/eth-wire-utils.rs b/eth-wire/src/bin/eth-wire-utils.rs
index 500e6f3..cb15d45 100644
--- a/eth-wire/src/bin/eth-wire-utils.rs
+++ b/eth-wire/src/bin/eth-wire-utils.rs
@@ -15,7 +15,7 @@
*/
use std::{path::PathBuf, str::FromStr};
-use common::{api_common::Amount, rand_slice};
+use common::{api_common::Amount, rand_slice, log::init};
use eth_wire::{
rpc::{hex::Hex, Rpc, TransactionRequest},
taler_util::taler_to_eth,
@@ -115,6 +115,7 @@ struct BalanceCmd {
}
fn main() {
+ init();
let args: Args = argh::from_env();
match args.cmd {
Cmd::Deposit(DepositCmd {
diff --git a/eth-wire/src/loops/worker.rs b/eth-wire/src/loops/worker.rs
index ef1be19..b1962a5 100644
--- a/eth-wire/src/loops/worker.rs
+++ b/eth-wire/src/loops/worker.rs
@@ -207,7 +207,7 @@ fn withdraw(db: &mut Client, rpc: &mut Rpc, state: &WireState) -> LoopResult<boo
Ok(row.is_some())
}
-/// Bounce a transaction on the blockchain, return false if nor more requested transaction are found
+/// Bounce a transaction on the blockchain, return false if no more requested transaction are found
fn bounce(db: &mut Client, rpc: &mut Rpc, fee: U256) -> LoopResult<bool> {
// We rely on the advisory lock to ensure we are the only one sending transactions
let row = db.query_opt(