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
9878
// calls per node.
9876
9879
let network = bitcoin::Network::Testnet;
9880
+
let genesis_block = bitcoin::blockdata::constants::genesis_block(network);
9877
9881
9878
9882
let tx_broadcaster = test_utils::TestBroadcaster::new(network);
9879
9883
let fee_estimator = test_utils::TestFeeEstimator{sat_per_kw:Mutex::new(253)};
@@ -9890,6 +9894,7 @@ pub mod bench {
9890
9894
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
9895
network,
9892
9896
best_block:BestBlock::from_network(network),
9897
+
best_block_timestamp: genesis_block.header.time,
9893
9898
});
9894
9899
let node_a_holder = ANodeHolder{node:&node_a };
9895
9900
@@ -9900,6 +9905,7 @@ pub mod bench {
9900
9905
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