geth add peers static-nodes.json

https://medium.com/taipei-ethereum-meetup/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E7%A7%81%E7%B6%B2%E5%BB%BA%E7%AB%8B-%E4%B8%80-43f8677fc9f8 如果要組成一個私人網路,同樣按照上面的流程建立其他節點。如果沒有下–nodiscover參數的話,最後節點應該會找到彼此。如果有下的話就必須用手動的方式加入其他節點,加入的方式有三種: 一是在geth指令加入–bootnodes參數; 二是進到console裡使用 admin.addPeer(); 三是存成static-nodes.json檔,讓geth自動連線。 不管是使用哪一種,我們都要先知道要連到 static-nodes.json 裡面使用domain,可能會有問題,要自行更換ip Example: geth --data ~/data cp static-nodes.json ~/data/geth/static-nodes.json static-nodes.json like this [ "enode://53999cc519079c5190798b1114bd16a05a8d5190796cc51907988a4e80ebda7b6c519079e56b0b161da3475c4dc62f6b51907967a6e327e46aa56329c519079f@192.168.0.10:30303" ]

2019-04-24 · 1 min · 22 words · Me

[轉]The Ultimate Guide to Secure, Harden and Improve Performance of Nginx Web Server

https://www.tecmint.com/nginx-web-server-security-hardening-and-performance-tips/?fbclid=IwAR3WRK-N-buun8QIMDUbzes72-w6p8SKCxnzr0sGU_PFAyudPRbHiumtFu0

2019-04-23 · 1 min · word · Me

linux aws s3 exploer crossftp

https://www.tecmint.com/nginx-web-server-security-hardening-and-performance-tips/?fbclid=IwAR3WRK-N-buun8QIMDUbzes72-w6p8SKCxnzr0sGU_PFAyudPRbHiumtFu0

2019-04-23 · 1 min · word · Me

supertest jest

Jest Expect Methods https://jestjs.io/docs/en/expect it = test it('count > 30', async () => { await reqTarget.get("/members").expect(200) .then((res) => { //Can use foreach, more easy for(key in res.body){ //console.log(res.body\[key\].cou ); if (res.body\[key\].cou > 100) throw new Error("count: "+res.body\[key\].cou +" > 30"); //for vars value check message expect(res.body\[key\].cou ).toBeLessThan(30); } }); });

2019-04-23 · 1 min · 50 words · Me

geth 新版 豪秒產生無法匯入

geth新版的geth.log 會產生豪秒 舊 INFO [04-22|16:29:56] 新 INFO [03-28|13:43:35.004] 差別在.004 看log會發現只有logstash的warning,經同事正確解釋是: >>因為logstash轉換出來的日期格式2019-03-28 13:43:35.004,Elasticsearch不認得,所以對logstash來說是Warning,但對Elasticsearch是Error,造成Log寫不進去~ 所以在logstash.conf上必須在解析date上,補上 “YYYY-MM-dd HH:mm:ss,SSS”, “YYYY-MM-dd HH:mm:ss.SSS” date { match => \[ "gethdate" , "YYYY-MM-dd HH:mm:ss", "YYYY-MM-dd HH:mm:ss,SSS", "YYYY-MM-dd HH:mm:ss.SSS"\] target => "gethdate" timezone => "Asia/Taipei" } 這樣就可以正常匯入geth.log了

2019-04-23 · 1 min · 38 words · Me