You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Require best block timestamp within ChannelManager::new
This ensures freshly initialized nodes can proceed to create unexpired
invoices without a call to `best_block_updated`, since an invoice's
expiration delta is applied to `highest_seen_timestamp`.
// Note that this is unrealistic as each payment send will require at least two fsync
9875
9881
// calls per node.
9876
9882
let network = bitcoin::Network::Testnet;
9883
+
let genesis_block = bitcoin::blockdata::constants::genesis_block(network);
9877
9884
9878
9885
let tx_broadcaster = test_utils::TestBroadcaster::new(network);
9879
9886
let fee_estimator = test_utils::TestFeeEstimator{sat_per_kw:Mutex::new(253)};
@@ -9890,7 +9897,7 @@ pub mod bench {
9890
9897
let node_a = ChannelManager::new(&fee_estimator,&chain_monitor_a,&tx_broadcaster,&router,&logger_a,&keys_manager_a,&keys_manager_a,&keys_manager_a, config.clone(),ChainParameters{
9891
9898
network,
9892
9899
best_block:BestBlock::from_network(network),
9893
-
});
9900
+
}, genesis_block.header.time);
9894
9901
let node_a_holder = ANodeHolder{node:&node_a };
9895
9902
9896
9903
let logger_b = test_utils::TestLogger::with_id("node a".to_owned());
@@ -9900,7 +9907,7 @@ pub mod bench {
9900
9907
let node_b = ChannelManager::new(&fee_estimator,&chain_monitor_b,&tx_broadcaster,&router,&logger_b,&keys_manager_b,&keys_manager_b,&keys_manager_b, config.clone(),ChainParameters{
0 commit comments