mirror of
https://github.com/fluencelabs/examples
synced 2025-06-09 16:11:19 +00:00
update to join, add Op.noop() hot fix
This commit is contained in:
parent
bb1feedb5a
commit
f87b67410e
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
alias PeerId : string
|
alias PeerId : string
|
||||||
alias Base58String : string
|
alias Base58String : string
|
||||||
alias Hash : string
|
alias Hash : string
|
||||||
@ -13,6 +12,7 @@ data Info:
|
|||||||
external_addresses: []string
|
external_addresses: []string
|
||||||
|
|
||||||
service Op("op"):
|
service Op("op"):
|
||||||
|
noop()
|
||||||
string_to_b58(s: string) -> Base58String
|
string_to_b58(s: string) -> Base58String
|
||||||
concat_strings(a: string, b: string) -> string
|
concat_strings(a: string, b: string) -> string
|
||||||
|
|
||||||
@ -68,8 +68,9 @@ func ts_oracle_with_consensus(tolerance: u32, threshold: f64, err_value:u64, nod
|
|||||||
if status! != "success":
|
if status! != "success":
|
||||||
res <<- err_value
|
res <<- err_value
|
||||||
dead_peers <<- n
|
dead_peers <<- n
|
||||||
|
Op.noop()
|
||||||
|
|
||||||
MyOp.identity(res!19)
|
join res[19]
|
||||||
TSOracle oracle_service_id
|
TSOracle oracle_service_id
|
||||||
consensus <- TSOracle.ts_frequency(res, tolerance, threshold, err_value)
|
consensus <- TSOracle.ts_frequency(res, tolerance, threshold, err_value)
|
||||||
<- consensus, dead_peers
|
<- consensus, dead_peers
|
||||||
@ -84,5 +85,6 @@ func ts_oracle_with_bool(tolerance: u32, threshold: f64, err_value:u64, node:str
|
|||||||
for n <- nodes par:
|
for n <- nodes par:
|
||||||
res <- Peer.connect(n, nil)
|
res <- Peer.connect(n, nil)
|
||||||
peers <<- n
|
peers <<- n
|
||||||
MyOpBool.identity(res!19)
|
Op.noop()
|
||||||
|
join res[19]
|
||||||
<- res, peers
|
<- res, peers
|
Loading…
x
Reference in New Issue
Block a user