瀏覽代碼

Merge branch 'redesign' of http://dev.prmsys.net:3001/Rimmon/HyperCube into redesign

ganahrhr 3 年之前
父節點
當前提交
fd178840e9
共有 3 個文件被更改,包括 7 次插入4 次删除
  1. 2 1
      Models/Blockchain.cs
  2. 2 2
      Pages/Blockchains.razor
  3. 3 1
      Post.cs

+ 2 - 1
Models/Blockchain.cs

@@ -22,7 +22,8 @@ namespace HyperCube.Models
         }
         public static int selectedNum;
         public static string URLdefault = "127.0.0.1";
-        public static int defaultPort = 8545;
+        //public static int defaultPort = 8545;
+        public static int defaultPort = 8666;
         public static string defaultName = "Ethereum dev network";
 
         public static bool newData = false;

+ 2 - 2
Pages/Blockchains.razor

@@ -138,8 +138,8 @@
 @code
     {
     private Random r = new Random();
-    private string bcURL = "127.0.0.1";
-    private int bcport = 8545;
+    private string bcURL = Blockchain.URLdefault;
+    private int bcport = Blockchain.defaultPort;
     private string bytecode = "";
     private string error = "";
     string lastTransAddr = "";

+ 3 - 1
Post.cs

@@ -5,6 +5,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
 using Console = HyperCube.Utils.AdvConsole;
+using HyperCube.Models;
 
 namespace HyperCube
 {
@@ -13,7 +14,8 @@ namespace HyperCube
         public static async Task<string> PostRequestAsync(string json)
         {
             Console.WriteLine($"json req {json} len {json.Length}");
-            var httpWebRequest = (HttpWebRequest)WebRequest.Create("http://127.0.0.1:8545");
+            string url = $"http://{Blockchain.URLdefault}:{Blockchain.defaultPort}";
+            var httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
 
             httpWebRequest.ContentType = "application/json";
             httpWebRequest.Method = "POST";