pub trait LightningTest: ILnRpcClient {
    // Required methods
    fn invoice<'life0, 'async_trait>(
        &'life0 self,
        amount: Amount,
        expiry_time: Option<u64>
    ) -> Pin<Box<dyn Future<Output = Result<Bolt11Invoice>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_shared(&self) -> bool;
    fn listening_address(&self) -> String;
    fn lightning_node_type(&self) -> LightningNodeType;

    // Provided method
    fn unpayable_invoice(
        &self,
        amount: Amount,
        expiry_time: Option<u64>
    ) -> Result<Bolt11Invoice> { ... }
}

Required Methods§

source

fn invoice<'life0, 'async_trait>( &'life0 self, amount: Amount, expiry_time: Option<u64> ) -> Pin<Box<dyn Future<Output = Result<Bolt11Invoice>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Creates invoice from the lightning implementation

source

fn is_shared(&self) -> bool

Is this a LN instance shared with other tests

source

fn listening_address(&self) -> String

source

fn lightning_node_type(&self) -> LightningNodeType

Provided Methods§

source

fn unpayable_invoice( &self, amount: Amount, expiry_time: Option<u64> ) -> Result<Bolt11Invoice>

Creates an invoice that is not payable

  • Mocks use hard-coded invoice description to fail the payment
  • Real fixtures won’t be able to route to randomly generated node pubkey

Implementors§