@@ -9,7 +9,7 @@ use lightning::sign::EntropySource;
9
9
10
10
use bitcoin:: blockdata:: constants:: { genesis_block, ChainHash } ;
11
11
use bitcoin:: blockdata:: transaction:: Transaction ;
12
- use bitcoin:: network :: constants :: Network ;
12
+ use bitcoin:: Network ;
13
13
use lightning:: chain:: channelmonitor:: ANTI_REORG_DELAY ;
14
14
use lightning:: chain:: { chainmonitor, BestBlock , Confirm } ;
15
15
use lightning:: ln:: channelmanager;
@@ -35,7 +35,7 @@ use lightning::util::test_utils;
35
35
use lightning_liquidity:: { LiquidityClientConfig , LiquidityManager , LiquidityServiceConfig } ;
36
36
use lightning_persister:: fs_store:: FilesystemStore ;
37
37
38
- use std:: collections:: VecDeque ;
38
+ use std:: collections:: { HashMap , VecDeque } ;
39
39
use std:: path:: PathBuf ;
40
40
use std:: sync:: atomic:: { AtomicBool , Ordering } ;
41
41
use std:: sync:: mpsc:: SyncSender ;
@@ -143,10 +143,10 @@ impl Drop for Node {
143
143
}
144
144
145
145
struct Persister {
146
- graph_error : Option < ( std :: io:: ErrorKind , & ' static str ) > ,
146
+ graph_error : Option < ( lightning :: io:: ErrorKind , & ' static str ) > ,
147
147
graph_persistence_notifier : Option < SyncSender < ( ) > > ,
148
- manager_error : Option < ( std :: io:: ErrorKind , & ' static str ) > ,
149
- scorer_error : Option < ( std :: io:: ErrorKind , & ' static str ) > ,
148
+ manager_error : Option < ( lightning :: io:: ErrorKind , & ' static str ) > ,
149
+ scorer_error : Option < ( lightning :: io:: ErrorKind , & ' static str ) > ,
150
150
kv_store : FilesystemStore ,
151
151
}
152
152
@@ -162,19 +162,19 @@ impl Persister {
162
162
}
163
163
}
164
164
165
- fn with_graph_error ( self , error : std :: io:: ErrorKind , message : & ' static str ) -> Self {
165
+ fn with_graph_error ( self , error : lightning :: io:: ErrorKind , message : & ' static str ) -> Self {
166
166
Self { graph_error : Some ( ( error, message) ) , ..self }
167
167
}
168
168
169
169
fn with_graph_persistence_notifier ( self , sender : SyncSender < ( ) > ) -> Self {
170
170
Self { graph_persistence_notifier : Some ( sender) , ..self }
171
171
}
172
172
173
- fn with_manager_error ( self , error : std :: io:: ErrorKind , message : & ' static str ) -> Self {
173
+ fn with_manager_error ( self , error : lightning :: io:: ErrorKind , message : & ' static str ) -> Self {
174
174
Self { manager_error : Some ( ( error, message) ) , ..self }
175
175
}
176
176
177
- fn with_scorer_error ( self , error : std :: io:: ErrorKind , message : & ' static str ) -> Self {
177
+ fn with_scorer_error ( self , error : lightning :: io:: ErrorKind , message : & ' static str ) -> Self {
178
178
Self { scorer_error : Some ( ( error, message) ) , ..self }
179
179
}
180
180
}
@@ -194,7 +194,7 @@ impl KVStore for Persister {
194
194
&& key == CHANNEL_MANAGER_PERSISTENCE_KEY
195
195
{
196
196
if let Some ( ( error, message) ) = self . manager_error {
197
- return Err ( std :: io:: Error :: new ( error, message) ) ;
197
+ return Err ( lightning :: io:: Error :: new ( error, message) ) ;
198
198
}
199
199
}
200
200
@@ -212,7 +212,7 @@ impl KVStore for Persister {
212
212
} ;
213
213
214
214
if let Some ( ( error, message) ) = self . graph_error {
215
- return Err ( std :: io:: Error :: new ( error, message) ) ;
215
+ return Err ( lightning :: io:: Error :: new ( error, message) ) ;
216
216
}
217
217
}
218
218
@@ -221,7 +221,7 @@ impl KVStore for Persister {
221
221
&& key == SCORER_PERSISTENCE_KEY
222
222
{
223
223
if let Some ( ( error, message) ) = self . scorer_error {
224
- return Err ( std :: io:: Error :: new ( error, message) ) ;
224
+ return Err ( lightning :: io:: Error :: new ( error, message) ) ;
225
225
}
226
226
}
227
227
@@ -362,9 +362,6 @@ impl ScoreUpdate for TestScorer {
362
362
fn time_passed ( & mut self , _: Duration ) { }
363
363
}
364
364
365
- #[ cfg( c_bindings) ]
366
- impl lightning:: routing:: scoring:: Score for TestScorer { }
367
-
368
365
impl Drop for TestScorer {
369
366
fn drop ( & mut self ) {
370
367
if std:: thread:: panicking ( ) {
@@ -390,7 +387,9 @@ pub(crate) fn create_liquidity_node(
390
387
client_config : Option < LiquidityClientConfig > ,
391
388
) -> Node {
392
389
let tx_broadcaster = Arc :: new ( test_utils:: TestBroadcaster :: new ( network) ) ;
393
- let fee_estimator = Arc :: new ( test_utils:: TestFeeEstimator { sat_per_kw : Mutex :: new ( 253 ) } ) ;
390
+ let target_override = Mutex :: new ( HashMap :: new ( ) ) ;
391
+ let fee_estimator =
392
+ Arc :: new ( test_utils:: TestFeeEstimator { sat_per_kw : Mutex :: new ( 253 ) , target_override } ) ;
394
393
let logger = Arc :: new ( test_utils:: TestLogger :: with_id ( format ! ( "node {}" , i) ) ) ;
395
394
let genesis_block = genesis_block ( network) ;
396
395
let network_graph = Arc :: new ( NetworkGraph :: new ( network, logger. clone ( ) ) ) ;
0 commit comments