Skip to content

Commit 2422594

Browse files
committed
try to fix type_length error
1 parent 5caf9e2 commit 2422594

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

crates/interledger-settlement-engines/src/engines/ethereum_ledger/test_helpers.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,15 @@ pub struct TestStore {
6666

6767
use crate::stores::LeftoversStore;
6868
use num_bigint::BigUint;
69+
6970
impl LeftoversStore for TestStore {
7071
fn save_leftovers(
7172
&self,
7273
account_id: String,
7374
leftovers: BigUint,
7475
) -> Box<Future<Item = (), Error = ()> + Send> {
76+
let mut guard = self.leftovers.write();
77+
(*guard).insert(account_id, leftovers.to_string());
7578
Box::new(ok(()))
7679
}
7780
}

crates/interledger-settlement-engines/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![type_length_limit = "1739269"]
2+
13
use clap::{value_t, App, Arg, SubCommand};
24
use hex;
35
use std::str::FromStr;

crates/interledger-settlement-engines/src/stores/redis_ethereum_ledger/store.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,17 @@ impl EthereumLedgerRedisStore {
108108
}
109109

110110
impl LeftoversStore for EthereumLedgerRedisStore {
111-
fn save_leftovers(&self, account_id: String, leftovers: BigUint) -> Box<dyn Future<Item = (), Error = ()> + Send> {
111+
fn save_leftovers(
112+
&self,
113+
account_id: String,
114+
leftovers: BigUint,
115+
) -> Box<dyn Future<Item = (), Error = ()> + Send> {
112116
let mut pipe = redis::pipe();
113117
pipe.set(format!("leftovers:{}", account_id), leftovers.to_string())
114118
.ignore();
115119
Box::new(
116120
pipe.query_async(self.connection.clone())
117-
.map_err(move |err| {
118-
error!("Error saving leftovers {:?}: {:?}", leftovers, err)
119-
})
121+
.map_err(move |err| error!("Error saving leftovers {:?}: {:?}", leftovers, err))
120122
.and_then(move |(_conn, _ret): (_, Value)| Ok(())),
121123
)
122124
}

0 commit comments

Comments
 (0)