mirror of
https://github.com/fluencelabs/examples
synced 2025-04-30 13:12:15 +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 Base58String : string
|
||||
alias Hash : string
|
||||
@ -13,6 +12,7 @@ data Info:
|
||||
external_addresses: []string
|
||||
|
||||
service Op("op"):
|
||||
noop()
|
||||
string_to_b58(s: string) -> Base58String
|
||||
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":
|
||||
res <<- err_value
|
||||
dead_peers <<- n
|
||||
Op.noop()
|
||||
|
||||
MyOp.identity(res!19)
|
||||
join res[19]
|
||||
TSOracle oracle_service_id
|
||||
consensus <- TSOracle.ts_frequency(res, tolerance, threshold, err_value)
|
||||
<- 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:
|
||||
res <- Peer.connect(n, nil)
|
||||
peers <<- n
|
||||
MyOpBool.identity(res!19)
|
||||
Op.noop()
|
||||
join res[19]
|
||||
<- res, peers
|
Loading…
x
Reference in New Issue
Block a user