public TransactionService( ILoggerFactory loggerFactory, WalletManagerFactory walletManagerFactory, string walletName, Network network) { this.network = network; this.walletManagerFactory = walletManagerFactory; this.walletName = walletName; this.logger = loggerFactory.CreateLogger(GetType().FullName); this.feePer1000VBytes = Math.Max(network.MinTxFee, network.MinRelayTxFee); this.minimumPossibleFee = (MinimumVirtualSize + SignatureVirtualSize + ChangeOutputVirtualSize) * this.feePer1000VBytes / 1000; this.dustThreshold = this.minimumPossibleFee * 5; }
public X1WalletFeature( WalletManagerFactory walletManagerFactory, IConnectionManager connectionManager, BroadcasterBehavior broadcasterBehavior, INodeStats nodeStats, Network network, WalletController walletController) { this.walletManagerFactory = walletManagerFactory; this.connectionManager = connectionManager; this.broadcasterBehavior = broadcasterBehavior; this.network = network; this.walletController = walletController; nodeStats.RegisterStats(AddComponentStats, StatsType.Component, GetType().Name); nodeStats.RegisterStats(AddInlineStats, StatsType.Inline, GetType().Name, 800); }
public FakeFactory(ITestOutputHelper testOutputHelper) { this.testOutputHelper = testOutputHelper; this.Network = ObsidianXNetworksSelector.Obsidian.Mainnet(); this.loggerFactory = new TestLoggerFactory(testOutputHelper); this.nodeSettings = Obsidian.x1d.Util.Init.GetNodeSettings(new string[0]); this.DataFolder = this.nodeSettings.DataFolder; this.InitialBlockDownloadState = new TestInitialBlockDownloadState() { IBD = true }; this.ChainIndexer = new ChainIndexer(this.Network); this.Signals = new Signals(this.loggerFactory, new DefaultSubscriptionErrorHandler(this.loggerFactory)); this.NodeLifetime = new NodeLifetime(); this.BlockStore = new TestBlockStore(); this.NodeServices = new NodeServices(dataFolder: this.DataFolder, chainIndexer: this.ChainIndexer, network: this.Network, broadcasterManager: new TestBroadcastManager(), this.loggerFactory, nodeLifetime: this.NodeLifetime, signals: this.Signals, blockStore: this.BlockStore, timeSyncBehaviorState: null, initialBlockDownloadState: this.InitialBlockDownloadState, blockProvider: null, consensusManager: null, stakeChain: null, coinView: null, dateTimeProvider: null, chainState: null); this.WalletManagerFactory = new WalletManagerFactory(this.NodeServices); }
public void DisposeAndRecreateWalletManagerFactory() { this.WalletManagerFactory.Dispose(); this.WalletManagerFactory = CreateWalletManagerFactory(); }