Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions fuzz/src/chanmon_consistency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use bitcoin::transaction::{Transaction, TxOut};
use bitcoin::FeeRate;

use bitcoin::block::Header;
use bitcoin::hash_types::{BlockHash, Txid};
use bitcoin::hash_types::Txid;
use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::hashes::sha256d::Hash as Sha256dHash;
use bitcoin::hashes::Hash as TraitImport;
Expand Down Expand Up @@ -74,11 +74,11 @@ use lightning::sign::{
SignerProvider,
};
use lightning::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
use lightning::util::async_poll::{MaybeSend, MaybeSync};
use lightning::util::config::UserConfig;
use lightning::util::errors::APIError;
use lightning::util::hash_tables::*;
use lightning::util::logger::Logger;
use lightning::util::native_async::{MaybeSend, MaybeSync};
use lightning::util::ser::{LengthReadable, ReadableArgs, Writeable, Writer};
use lightning::util::test_channel_signer::{EnforcementState, SignerOp, TestChannelSigner};
use lightning::util::test_utils::TestWalletSource;
Expand Down Expand Up @@ -331,7 +331,7 @@ impl chain::Watch<TestChannelSigner> for TestChainMonitor {
.map(|(_, data)| data)
.unwrap_or(&map_entry.persisted_monitor);
let deserialized_monitor =
<(BlockHash, channelmonitor::ChannelMonitor<TestChannelSigner>)>::read(
<(BestBlock, channelmonitor::ChannelMonitor<TestChannelSigner>)>::read(
&mut &latest_monitor_data[..],
(&*self.keys, &*self.keys),
)
Expand Down Expand Up @@ -1002,7 +1002,7 @@ pub fn do_test<Out: Output + MaybeSend + MaybeSync>(
// Use a different value of `use_old_mons` if we have another monitor (only for node B)
// by shifting `use_old_mons` one in base-3.
use_old_mons /= 3;
let mon = <(BlockHash, ChannelMonitor<TestChannelSigner>)>::read(
let mon = <(BestBlock, ChannelMonitor<TestChannelSigner>)>::read(
&mut &serialized_mon[..],
(&**keys, &**keys),
)
Expand Down Expand Up @@ -1037,7 +1037,7 @@ pub fn do_test<Out: Output + MaybeSend + MaybeSync>(
};

let manager =
<(BlockHash, ChanMan)>::read(&mut &ser[..], read_args).expect("Failed to read manager");
<(BestBlock, ChanMan)>::read(&mut &ser[..], read_args).expect("Failed to read manager");
let res = (manager.1, chain_monitor.clone());
for (channel_id, mon) in monitors.drain() {
assert_eq!(
Expand Down
8 changes: 3 additions & 5 deletions fuzz/src/chanmon_deser.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// This file is auto-generated by gen_target.sh based on msg_target_template.txt
// To modify it, modify msg_target_template.txt and run gen_target.sh instead.

use bitcoin::hash_types::BlockHash;

use lightning::chain::channelmonitor;
use lightning::chain::{channelmonitor, BestBlock};
use lightning::util::ser::{ReadableArgs, Writeable, Writer};
use lightning::util::test_channel_signer::TestChannelSigner;
use lightning::util::test_utils::OnlyReadsKeysInterface;
Expand All @@ -23,14 +21,14 @@ impl Writer for VecWriter {
#[inline]
pub fn do_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
if let Ok((latest_block_hash, monitor)) =
<(BlockHash, channelmonitor::ChannelMonitor<TestChannelSigner>)>::read(
<(BestBlock, channelmonitor::ChannelMonitor<TestChannelSigner>)>::read(
&mut Cursor::new(data),
(&OnlyReadsKeysInterface {}, &OnlyReadsKeysInterface {}),
) {
let mut w = VecWriter(Vec::new());
monitor.write(&mut w).unwrap();
let deserialized_copy =
<(BlockHash, channelmonitor::ChannelMonitor<TestChannelSigner>)>::read(
<(BestBlock, channelmonitor::ChannelMonitor<TestChannelSigner>)>::read(
&mut Cursor::new(&w.0),
(&OnlyReadsKeysInterface {}, &OnlyReadsKeysInterface {}),
)
Expand Down
4 changes: 2 additions & 2 deletions fuzz/src/full_stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ use lightning::sign::{
SignerProvider,
};
use lightning::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
use lightning::util::async_poll::{MaybeSend, MaybeSync};
use lightning::util::config::{ChannelConfig, UserConfig};
use lightning::util::hash_tables::*;
use lightning::util::logger::Logger;
use lightning::util::native_async::{MaybeSend, MaybeSync};
use lightning::util::ser::{Readable, Writeable};
use lightning::util::test_channel_signer::{EnforcementState, TestChannelSigner};
use lightning::util::test_utils::TestWalletSource;
Expand Down Expand Up @@ -1956,8 +1956,8 @@ pub fn write_fst_seeds(path: &str) {

#[cfg(test)]
mod tests {
use lightning::util::async_poll::{MaybeSend, MaybeSync};
use lightning::util::logger::{Logger, Record};
use lightning::util::native_async::{MaybeSend, MaybeSync};
use std::collections::HashMap;
use std::sync::{Arc, Mutex};

Expand Down
4 changes: 2 additions & 2 deletions lightning-background-processor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ use lightning::routing::utxo::UtxoLookup;
#[cfg(not(c_bindings))]
use lightning::sign::EntropySource;
use lightning::sign::{ChangeDestinationSource, ChangeDestinationSourceSync, OutputSpender};
#[cfg(not(c_bindings))]
use lightning::util::async_poll::MaybeSend;
use lightning::util::logger::Logger;
#[cfg(not(c_bindings))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit msg typo

use lightning::util::native_async::MaybeSend;
use lightning::util::persist::{
KVStore, KVStoreSync, KVStoreSyncWrapper, CHANNEL_MANAGER_PERSISTENCE_KEY,
CHANNEL_MANAGER_PERSISTENCE_PRIMARY_NAMESPACE, CHANNEL_MANAGER_PERSISTENCE_SECONDARY_NAMESPACE,
Expand Down
1 change: 1 addition & 0 deletions lightning-block-sync/src/async_poll.rs
Loading
Loading