Upgrade status-go to 0.17.6-beta (Constantinople).

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
Igor Mandrigin 2018-11-26 11:53:21 +01:00 committed by Andrea Maria Piana
parent 83a8d9db27
commit afc368b1b0
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
3 changed files with 7 additions and 6 deletions

View File

@ -1 +1 @@
v0.16.3-9-g27700aa2
0.17.6-beta

View File

@ -174,9 +174,8 @@
(defn registered-peer?
"truthy if the enode is a registered peer"
[peers enode]
(let [peer-ids (into #{} (map :id) peers)
enode-id (transport.utils/extract-enode-id enode)]
(contains? peer-ids enode-id)))
(let [registered-enodes (into #{} (map :enode) peers)]
(contains? registered-enodes enode)))
(defn update-mailserver-state [db state]
(assoc db :mailserver/state state))

View File

@ -22,8 +22,10 @@
(def peers
[{:id "08d8eb6177b187049f6c97ed3f6c74fbbefb94c7ad10bafcaf4b65ce89c314dcfee0a8bc4e7a5b824dfa08b45b360cc78f34f0aff981f8386caa07652d2e601b"
:enode "enode://08d8eb6177b187049f6c97ed3f6c74fbbefb94c7ad10bafcaf4b65ce89c314dcfee0a8bc4e7a5b824dfa08b45b360cc78f34f0aff981f8386caa07652d2e601b@163.172.177.138:40404"
:name "StatusIM/v0.9.9-unstable/linux-amd64/go1.9.2"}
{:id "0f7c65277f916ff4379fe520b875082a56e587eb3ce1c1567d9ff94206bdb05ba167c52272f20f634cd1ebdec5d9dfeb393018bfde1595d8e64a717c8b46692f"
:enode "enode://0f7c65277f916ff4379fe520b875082a56e587eb3ce1c1567d9ff94206bdb05ba167c52272f20f634cd1ebdec5d9dfeb393018bfde1595d8e64a717c8b46692f@203.136.241.111:40404"
:name "Geth/v1.7.2-stable/linux-amd64/go1.9.1"}])
(deftest test-registered-peer?
@ -297,7 +299,7 @@
(defn cofx-fixtures [sym-key registered-peer?]
{:db {:mailserver/state :connected
:peers-summary (if registered-peer?
[{:id "mailserver-id"}]
[{:id "mailserver-id" :enode "enode://mailserver-id@ip"}]
[])
:account/account {:settings {:fleet :eth.beta}}
:mailserver/current-id "mailserver-a"
@ -308,7 +310,7 @@
(mailserver/peers-summary-change (cofx-fixtures sym-key
registered-peer?)
(if registered-peer-before?
[{:id "mailserver-id"}]
[{:id "mailserver-id" :enode "enode://mailserver-id@ip"}]
[])))
(deftest peers-summary-change