feat(gossipsub): allow compiling for WASM

This modification removes deprecated dependency `wasm_timer` and enables wasm compatibility on the gossibsup protocol by simply substituting the `wasm_timer::Instant` with `instant::Instant`(which supports `fn checked_add`) and `wasm_timer::Interval` with `futures_ticker::Ticker`.

Pull-Request: #3973.
This commit is contained in:
Onur
2023-05-25 09:19:47 +03:00
committed by GitHub
parent fc386a51a7
commit 801023f468
18 changed files with 69 additions and 94 deletions

View File

@ -15,7 +15,7 @@ either = "1.5"
fnv = "1.0"
futures = { version = "0.3.28", features = ["executor", "thread-pool"] }
futures-timer = "3"
instant = "0.1.11"
instant = "0.1.12"
libp2p-identity = { workspace = true, features = ["peerid", "ed25519"] }
log = "0.4"
multiaddr = { version = "0.17.1" }