src/Stratis.FederatedPeg.Tests/CrossChainTestBase.cs
/// <summary>
/// Create the wallet manager and wallet transaction handler.
/// </summary>
/// <param name="dataFolder">The data folder.</param>
Create the wallet manager and wallet transaction handler.
Create the wallet manager and wallet transaction handler .
protected void Init(DataFolder dataFolder)
        {
            this.dataFolder = dataFolder;
            this.federationWalletManager = new FederationWalletManager(
                this.loggerFactory,
                this.network,
                this.chain,
                dataFolder,
                this.walletFeePolicy,
                this.asyncLoopFactory,
                new NodeLifetime(),
                this.dateTimeProvider,
                this.federationGatewaySettings,
                this.withdrawalExtractor);
            this.federationWalletManager.Start();
            this.wallet = this.federationWalletManager.GetWallet();
            this.federationWalletTransactionHandler = new FederationWalletTransactionHandler(this.loggerFactory, this.federationWalletManager, this.walletFeePolicy, this.network);
            var storeSettings = (StoreSettings)FormatterServices.GetUninitializedObject(typeof(StoreSettings));
            this.federationWalletSyncManager = new FederationWalletSyncManager(this.loggerFactory, this.federationWalletManager, this.chain, this.network,
                this.blockRepository, storeSettings, Substitute.For<INodeLifetime>());
            this.federationWalletSyncManager.Start();
            string encryptedSeed = this.extendedKey.PrivateKey.GetEncryptedBitcoinSecret(walletPassword, this.network).ToWif();
            this.wallet.EncryptedSeed = encryptedSeed;
            this.federationWalletManager.Secret = new WalletSecret() { WalletPassword = walletPassword };
            System.Reflection.FieldInfo prop = this.federationWalletManager.GetType().GetField("isFederationActive",
                System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
            prop.SetValue(this.federationWalletManager, true);
        }
protected void Init ( DataFolder dataFolder ) { this . dataFolder = dataFolder ; this . federationWalletManager = new FederationWalletManager ( this . loggerFactory , this . network , this . chain , dataFolder , this . walletFeePolicy , this . asyncLoopFactory , new NodeLifetime ( ) , this . dateTimeProvider , this . federationGatewaySettings , this . withdrawalExtractor ) ; this . federationWalletManager . Start ( ) ; this . wallet = this . federationWalletManager . GetWallet ( ) ; this . federationWalletTransactionHandler = new FederationWalletTransactionHandler ( this . loggerFactory , this . federationWalletManager , this . walletFeePolicy , this . network ) ; var storeSettings = ( StoreSettings ) FormatterServices . GetUninitializedObject ( typeof ( StoreSettings ) ) ; this . federationWalletSyncManager = new FederationWalletSyncManager ( this . loggerFactory , this . federationWalletManager , this . chain , this . network , this . blockRepository , storeSettings , Substitute . For < INodeLifetime > ( ) ) ; this . federationWalletSyncManager . Start ( ) ; string encryptedSeed = this . extendedKey . PrivateKey . GetEncryptedBitcoinSecret ( walletPassword , this . network ) . ToWif ( ) ; this . wallet . EncryptedSeed = encryptedSeed ; this . federationWalletManager . Secret = new WalletSecret ( ) { WalletPassword = walletPassword } ; System . Reflection . FieldInfo prop = this . federationWalletManager . GetType ( ) . GetField ( " " , System . Reflection . BindingFlags . NonPublic | System . Reflection . BindingFlags . Instance ) ; prop . SetValue ( this . federationWalletManager , true ) ; }
Create the wallet manager and wallet transaction handler.
Create the wallet manager and wallet transaction handler .
// Create the wallet manager. // Starts and creates the wallet. // Set up the encrypted seed on the wallet.
dataFolder
DataFolder
The data folder.
The data folder .