예제 #1
0
 public FeeEstimatorDelegatesHolder(IFeeEstimator feeEstimator)
 {
     _feeEstimator           = feeEstimator ?? throw new ArgumentNullException(nameof(feeEstimator));
     _getEstSatPer1000Weight = feeEstimator.GetEstSatPer1000Weight;
     _handle   = GCHandle.Alloc(_getEstSatPer1000Weight);
     _disposed = false;
 }
        internal static FFIResult create_many_channel_monitor(
            InstallWatchTx installWatchTx,
            InstallWatchOutPoint installWatchOutPoint,
            WatchAllTxn watchAllTxn,
            GetChainUtxo getChainUtxo,
            FilterBlock filterBlock,
            ReEntered reEntered,

            BroadcastTransaction broadcastTransaction,
            Log log,
            GetEstSatPer1000Weight getEstSatPer1000Weight,
            out ManyChannelMonitorHandle handle,
            bool check = true
            ) =>
        MaybeCheck(_create_many_channel_monitor(
                       ref installWatchTx,
                       ref installWatchOutPoint,
                       ref watchAllTxn,
                       ref getChainUtxo,
                       ref filterBlock,
                       ref reEntered,
                       ref broadcastTransaction,
                       ref log,
                       ref getEstSatPer1000Weight,
                       out handle
                       ), check);
        private static extern FFIResult _create_many_channel_monitor(
            ref InstallWatchTx installWatchTx,
            ref InstallWatchOutPoint installWatchOutPoint,
            ref WatchAllTxn watchAllTxn,
            ref GetChainUtxo getChainUtxo,
            ref FilterBlock filterBlock,
            ref ReEntered reEntered,

            ref BroadcastTransaction broadcastTransaction,
            ref Log log,
            ref GetEstSatPer1000Weight getEstSatPer1000Weight,
            out ManyChannelMonitorHandle handle
            );
        private static extern FFIResult _deserialize_many_channel_monitor(
            IntPtr bufPtr,
            UIntPtr bufLen,
            ref InstallWatchTx installWatchTx,
            ref InstallWatchOutPoint installWatchOutPoint,
            ref WatchAllTxn watchAllTxn,
            ref GetChainUtxo getChainUtxo,
            ref FilterBlock filterBlock,
            ref ReEntered reEntered,

            ref BroadcastTransaction broadcastTransaction,
            ref Log log,
            ref GetEstSatPer1000Weight getEstSatPer1000Weight,

            IntPtr outputBufPtr,
            UIntPtr outputBufLen,
            out UIntPtr actualBufLen,
            out ManyChannelMonitorHandle manyChannelMonitorHandle
            );
        internal static FFIResult deserialize_many_channel_monitor(
            IntPtr bufPtr,
            UIntPtr bufLen,
            InstallWatchTx installWatchTx,
            InstallWatchOutPoint installWatchOutPoint,
            WatchAllTxn watchAllTxn,
            GetChainUtxo getChainUtxo,
            FilterBlock filterBlock,
            ReEntered reEntered,

            BroadcastTransaction broadcastTransaction,
            Log log,
            GetEstSatPer1000Weight getEstSatPer1000Weight,

            IntPtr outputBufPtr,
            UIntPtr outputBufLen,
            out UIntPtr actualBufLen,
            out ManyChannelMonitorHandle manyChannelMonitorHandle,
            bool check = true
            )
        => MaybeCheck(
            _deserialize_many_channel_monitor(
                bufPtr,
                bufLen,
                ref installWatchTx,
                ref installWatchOutPoint,
                ref watchAllTxn,
                ref getChainUtxo,
                ref filterBlock,
                ref reEntered,

                ref broadcastTransaction,
                ref log,
                ref getEstSatPer1000Weight,
                outputBufPtr,
                outputBufLen,
                out actualBufLen,
                out manyChannelMonitorHandle
                ),
            check);
예제 #6
0
 public FeeEstimatorDelegatesHolder(IFeeEstimator feeEstimator)
 {
     _feeEstimator           = feeEstimator ?? throw new ArgumentNullException(nameof(feeEstimator));
     _getEstSatPer1000Weight = confirmationTarget => _feeEstimator.GetEstSatPer1000Weight(confirmationTarget);
 }