mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 22:55:03 +03:00
set .route.peer-state when hearing valid packet
This commit is contained in:
parent
0c4c1f1cc2
commit
4c4e714b4b
@ -957,16 +957,17 @@
|
||||
%+ ~(put by peers.ames-state) sndr.packet
|
||||
^- ^ship-state
|
||||
:- %known
|
||||
=| ps=peer-state
|
||||
=| =peer-state
|
||||
=/ our-private-key sec:ex:crypto-core.ames-state
|
||||
=/ =symmetric-key
|
||||
(derive-symmetric-key public-key.open-packet our-private-key)
|
||||
::
|
||||
%_ ps
|
||||
%_ peer-state
|
||||
symmetric-key symmetric-key
|
||||
life `life`sndr-life.open-packet
|
||||
public-key `public-key`public-key.open-packet
|
||||
sponsors `(list ship)`(get-comet-sponsors sndr.packet)
|
||||
life sndr-life.open-packet
|
||||
public-key public-key.open-packet
|
||||
sponsors (get-comet-sponsors sndr.packet)
|
||||
route `[direct=%.y lane]
|
||||
==
|
||||
::
|
||||
event-core
|
||||
@ -1000,6 +1001,9 @@
|
||||
::
|
||||
?> =(sndr-life.shut-packet her-life.channel)
|
||||
?> =(rcvr-life.shut-packet our-life.channel)
|
||||
:: set .lane as new route to peer since packet is valid
|
||||
::
|
||||
=. route.peer-state `[direct=%.y lane]
|
||||
::
|
||||
=/ peer-core (make-peer-core peer-state channel)
|
||||
abet:(on-hear-shut-packet:peer-core lane shut-packet)
|
||||
|
Loading…
Reference in New Issue
Block a user