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

@ -19,7 +19,7 @@ relay = ["libp2p-relay"]
dcutr = ["libp2p-dcutr"]
[dependencies]
instant = "0.1.11"
instant = "0.1.12"
libp2p-core = { workspace = true }
libp2p-dcutr = { workspace = true, optional = true }
libp2p-identify = { workspace = true, optional = true }