use lightning::util::events::{Event, EventHandler};
use lightning::util::logger::Logger;
use lightning::util::ser::Writeable;
use lightning::util::events::{Event, EventHandler};
use lightning::util::logger::Logger;
use lightning::util::ser::Writeable;
#[cfg(not(feature = "no-std"))]
type ConfiguredTime = std::time::Instant;
#[cfg(feature = "no-std")]
#[cfg(not(feature = "no-std"))]
type ConfiguredTime = std::time::Instant;
#[cfg(feature = "no-std")]
use bitcoin_hashes::sha256::Hash as Sha256;
use lightning::ln::PaymentPreimage;
use lightning::ln::channelmanager;
use bitcoin_hashes::sha256::Hash as Sha256;
use lightning::ln::PaymentPreimage;
use lightning::ln::channelmanager;
use std::collections::VecDeque;
use std::ops::DerefMut;
use std::time::{SystemTime, Duration};
use std::collections::VecDeque;
use std::ops::DerefMut;
use std::time::{SystemTime, Duration};
use lightning::util::errors::APIError::{ChannelUnavailable, MonitorUpdateInProgress};
fn invoice(payment_preimage: PaymentPreimage) -> Invoice {
use lightning::util::errors::APIError::{ChannelUnavailable, MonitorUpdateInProgress};
fn invoice(payment_preimage: PaymentPreimage) -> Invoice {