public FederationGatewayFeature(ILoggerFactory loggerFactory,
                                        ICrossChainTransactionMonitor crossChainTransactionMonitor,
                                        Signals signals,
                                        IConnectionManager connectionManager,
                                        FederationGatewaySettings federationGatewaySettings,
                                        IFullNode fullNode,
                                        IFederationWalletManager federationWalletManager,
                                        IFederationWalletSyncManager walletSyncManager,
                                        Network network,
                                        ConcurrentChain chain,
                                        IMonitorChainSessionManager monitorChainSessionManager,
                                        ICounterChainSessionManager counterChainSessionManager)
        {
            this.loggerFactory = loggerFactory;
            this.crossChainTransactionMonitor = crossChainTransactionMonitor;
            this.signals                   = signals;
            this.connectionManager         = connectionManager;
            this.federationGatewaySettings = federationGatewaySettings;
            this.fullNode                  = fullNode;
            this.chain = chain;
            this.federationWalletManager = federationWalletManager;
            this.walletSyncManager       = walletSyncManager;
            this.network = network;

            this.counterChainSessionManager = counterChainSessionManager;
            this.monitorChainSessionManager = monitorChainSessionManager;

            // add our payload
            var payloadProvider = this.fullNode.Services.ServiceProvider.GetService(typeof(PayloadProvider)) as PayloadProvider;

            payloadProvider.AddPayload(typeof(RequestPartialTransactionPayload));
        }
 public FederationGatewayController(
     ILoggerFactory loggerFactory,
     ICounterChainSessionManager counterChainSessionManager)
 {
     this.logger = loggerFactory.CreateLogger(this.GetType().FullName);
     this.counterChainSessionManager = counterChainSessionManager;
 }
Beispiel #3
0
        public CrossChainTransactionMonitor(
            ILoggerFactory loggerFactory,
            Network network,
            ConcurrentChain concurrentChain,
            FederationGatewaySettings federationGatewaySettings,
            IMonitorChainSessionManager monitorChainSessionManager,
            ICounterChainSessionManager counterChainSessionManager,
            IInitialBlockDownloadState initialBlockDownloadState,
            IOpReturnDataReader opReturnDataReader,
            ICrossChainTransactionAuditor crossChainTransactionAuditor = null)
        {
            Guard.NotNull(loggerFactory, nameof(loggerFactory));
            Guard.NotNull(network, nameof(network));
            Guard.NotNull(monitorChainSessionManager, nameof(monitorChainSessionManager));
            Guard.NotNull(counterChainSessionManager, nameof(counterChainSessionManager));
            Guard.NotNull(federationGatewaySettings, nameof(federationGatewaySettings));
            Guard.NotNull(concurrentChain, nameof(concurrentChain));
            Guard.NotNull(initialBlockDownloadState, nameof(initialBlockDownloadState));
            Guard.NotNull(opReturnDataReader, nameof(opReturnDataReader));
            Guard.NotNull(crossChainTransactionAuditor, nameof(crossChainTransactionAuditor));

            this.logger  = loggerFactory.CreateLogger(this.GetType().FullName);
            this.network = network;
            this.monitorChainSessionManager   = monitorChainSessionManager;
            this.counterChainSessionManager   = counterChainSessionManager;
            this.federationGatewaySettings    = federationGatewaySettings;
            this.concurrentChain              = concurrentChain;
            this.initialBlockDownloadState    = initialBlockDownloadState;
            this.opReturnDataReader           = opReturnDataReader;
            this.crossChainTransactionAuditor = crossChainTransactionAuditor;
        }
        public PartialTransactionsBehavior(
            ILoggerFactory loggerFactory,
            ICrossChainTransactionMonitor crossChainTransactionMonitor,
            IFederationWalletManager federationWalletManager,
            ICounterChainSessionManager counterChainSessionManager,
            Network network,
            FederationGatewaySettings federationGatewaySettings)
        {
            Guard.NotNull(loggerFactory, nameof(loggerFactory));
            Guard.NotNull(crossChainTransactionMonitor, nameof(crossChainTransactionMonitor));
            Guard.NotNull(federationWalletManager, nameof(federationWalletManager));
            Guard.NotNull(counterChainSessionManager, nameof(counterChainSessionManager));
            Guard.NotNull(network, nameof(network));
            Guard.NotNull(federationGatewaySettings, nameof(federationGatewaySettings));

            this.logger        = loggerFactory.CreateLogger(this.GetType().FullName);
            this.loggerFactory = loggerFactory;
            this.crossChainTransactionMonitor = crossChainTransactionMonitor;
            this.federationWalletManager      = federationWalletManager;
            this.counterChainSessionManager   = counterChainSessionManager;
            this.network = network;
            this.federationGatewaySettings = federationGatewaySettings;
            this.ipAddressComparer         = new IPAddressComparer();
        }