2021-11-12 13:19:16 +00:00
|
|
|
(seq
|
|
|
|
(seq
|
2022-02-04 15:45:37 +00:00
|
|
|
; set fluence root peer id as TG root
|
|
|
|
(call relay ("trust-graph" "set_root") ["12D3KooWNbZKaPWRZ8wgjGvrxdJFz9Fq5uVwkR6ERV1f74HhPdyB" 5] add_root_res)
|
2021-11-12 13:19:16 +00:00
|
|
|
(xor
|
|
|
|
(match add_root_res.$.success! true
|
|
|
|
(null)
|
|
|
|
)
|
|
|
|
(call relay ("op" "return") [add_root_res.$.error!])
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(seq
|
|
|
|
(fold certs i
|
|
|
|
(seq
|
|
|
|
(seq
|
|
|
|
(seq
|
|
|
|
(call relay ("peer" "timestamp_sec") [] cur_time)
|
2022-02-04 15:45:37 +00:00
|
|
|
; insert all certificates from on_start.json
|
2021-11-12 13:19:16 +00:00
|
|
|
(call relay ("trust-graph" "insert_cert") [i cur_time] insert_result)
|
|
|
|
)
|
|
|
|
(xor
|
|
|
|
(match insert_result.$.success! true
|
|
|
|
(null)
|
|
|
|
)
|
|
|
|
(call relay ("op" "return") [insert_result.$.error!])
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(next i)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(call relay ("op" "return") [true])
|
|
|
|
)
|
|
|
|
)
|