projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Consider `RouteParameters::max_total_routing_fee_msat` in `get_route`
[rust-lightning]
/
lightning
/
src
/
util
/
test_utils.rs
diff --git
a/lightning/src/util/test_utils.rs
b/lightning/src/util/test_utils.rs
index 8e2be87d8bef820b4bf56b19829aa09450a9f1d6..785b40befd472ba10b30fb618bd75eb9ab20c15a 100644
(file)
--- a/
lightning/src/util/test_utils.rs
+++ b/
lightning/src/util/test_utils.rs
@@
-62,7
+62,6
@@
use regex;
use crate::io;
use crate::prelude::*;
use core::cell::RefCell;
use crate::io;
use crate::prelude::*;
use core::cell::RefCell;
-use core::ops::Deref;
use core::time::Duration;
use crate::sync::{Mutex, Arc};
use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use core::time::Duration;
use crate::sync::{Mutex, Arc};
use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
@@
-297,6
+296,7
@@
pub(crate) struct WatchtowerPersister {
}
impl WatchtowerPersister {
}
impl WatchtowerPersister {
+ #[cfg(test)]
pub(crate) fn new(destination_script: Script) -> Self {
WatchtowerPersister {
persister: TestPersister::new(),
pub(crate) fn new(destination_script: Script) -> Self {
WatchtowerPersister {
persister: TestPersister::new(),
@@
-306,6
+306,7
@@
impl WatchtowerPersister {
}
}
}
}
+ #[cfg(test)]
pub(crate) fn justice_tx(&self, funding_txo: OutPoint, commitment_txid: &Txid)
-> Option<Transaction> {
self.watchtower_state.lock().unwrap().get(&funding_txo).unwrap().get(commitment_txid).cloned()
pub(crate) fn justice_tx(&self, funding_txo: OutPoint, commitment_txid: &Txid)
-> Option<Transaction> {
self.watchtower_state.lock().unwrap().get(&funding_txo).unwrap().get(commitment_txid).cloned()
@@
-426,7
+427,7
@@
impl<Signer: sign::WriteableEcdsaChannelSigner> chainmonitor::Persist<Signer> fo
}
}
}
}
-pub
(crate)
struct TestStore {
+pub struct TestStore {
persisted_bytes: Mutex<HashMap<String, HashMap<String, Vec<u8>>>>,
read_only: bool,
}
persisted_bytes: Mutex<HashMap<String, HashMap<String, Vec<u8>>>>,
read_only: bool,
}