- class OracleLightningNetwork.OracleLightningNetwork(channel_graph: ChannelGraph.ChannelGraph)
- allocate_amount_as_inflight_on_path(attempt: Attempt.Attempt)
allocates amt as in_flights to all channels of the path
- property network
- send_onion(attempt: Attempt.Attempt)
Probes the oracle network if the amount of satoshis for this attempt can be sent through the given path in the attempt. If successful, then inflight amounts are placed on the respective oracle channels as well as uncertainty channels, and the Attempt is set to INFLIGHT. If not successful, then the status of the Attempt is set to FAILED and the failing channel is returned
attempt – the attempt that is probed
did sending the onion succeed?
- Return type
if sending the onion failed, at which channel did it fail
- Return type
UncertaintyChannel or None
- settle_attempt(attempt: Attempt.Attempt)
receives a payment attempt and adjusts the balances of the OracleChannels and its reverse channels along the path.
settle_attempt should only be called after all send_onions for a payment terminated successfully!
- theoretical_maximum_payable_amount(source: str, destination: str, base_fee: int = 0)
Uses the information from the oracle to compute the min-cut between source and destination
This is only useful for experiments and simulations if one wants to know what would be possible to actually send before starting the payment loop