Exemplo n.º 1
0
        void InitalizeCkbIfNecessary()
        {
            if (File.Exists(TomlFile))
            {
                return;
            }

            using System.Diagnostics.Process process = new();
            process.StartInfo.UseShellExecute        = false;
            process.StartInfo.RedirectStandardInput  = true;

            process.StartInfo.FileName         = BinaryFullPath(WorkPathManage.CkbForPaltform(ckbenum.ckb));
            process.StartInfo.WorkingDirectory = WorkingDirectory();
            process.StartInfo.Arguments        = BuildArguments();



            process.Start();

            StreamWriter writer = process.StandardInput;

            writer.Write(ChainSpec());
            writer.Close();

            process.WaitForExit();
            CopyTheConstractFiles(ProcessInfo.Contracts);
        }
Exemplo n.º 2
0
 protected override void Configure()
 {
     process = new System.Diagnostics.Process();
     process.StartInfo.UseShellExecute = false;
     //process.StartInfo.FileName = BinaryFullPath("ckb-indexer.exe");
     process.StartInfo.FileName         = BinaryFullPath(WorkPathManage.CkbForPaltform(ckbenum.ckbindexer));
     process.StartInfo.WorkingDirectory = WorkingDirectory();
     process.StartInfo.Arguments        = $"-s indexer-data -c http://127.0.0.1:{ProcessInfo.NodeRpcPort} -l 127.0.0.1:{ProcessInfo.IndexerRpcPort}";
 }
Exemplo n.º 3
0
        protected override void Configure()
        {
            UpdateConfiguration();

            process = new System.Diagnostics.Process();
            process.StartInfo.UseShellExecute = false;

            process.StartInfo.FileName         = BinaryFullPath(WorkPathManage.CkbForPaltform(ckbenum.ckb));
            process.StartInfo.WorkingDirectory = WorkingDirectory();
            process.StartInfo.Arguments        = "miner";
        }
Exemplo n.º 4
0
        protected override void Configure()
        {
            string?workingDirectory = Path.GetDirectoryName(TxFilePath);

            if (workingDirectory == null)
            {
                throw new Exception("No file path found!");
            }
            string debuggerBinaryPath = BinaryFullPath(WorkPathManage.CkbForPaltform(ckbenum.ckbdebugger));
            string arguments          = $"--port 7682 {debuggerBinaryPath} -l 0.0.0.0:2000 -g {ScriptGroupType} -h {ScriptHash} -t {TxFilePath} -e {IoType} -i {IoIndex}";

            if (BinaryPath != null)
            {
                arguments += $" -r {BinaryPath}";
            }
            process = new System.Diagnostics.Process();
            process.StartInfo.UseShellExecute  = false;
            process.StartInfo.FileName         = "ttyd";
            process.StartInfo.WorkingDirectory = workingDirectory;
            process.StartInfo.Arguments        = arguments;
        }