Skip to content

Commit cbe6145

Browse files
bbalserkurotych
andauthored
Add sampling flag to DataTransferSession requests (#1052)
* Add sampling flag to DataTransferSession requests * update to master on helium-proto * don't run ignored test during CI and mark some packet verifier tests as ignore to get through CI limitations * marking tests to ignore to get through CI limitations * missed tests --------- Co-authored-by: Anatolii Kurotych <[email protected]>
1 parent d1b79e5 commit cbe6145

File tree

10 files changed

+79
-43
lines changed

10 files changed

+79
-43
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
env:
156156
DATABASE_URL: "postgres://postgres:postgres@postgres:5432/postgres"
157157
AWSLOCAL_ENDPOINT: "http://localstack:4566"
158-
run: cargo test -p ${{ matrix.package }} -- --include-ignored
158+
run: cargo test -p ${{ matrix.package }}
159159

160160
build-release:
161161
runs-on: ubuntu-latest

.github/workflows/DockerCI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ jobs:
158158
env:
159159
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
160160
AWSLOCAL_ENDPOINT: "http://localstack:4566"
161-
run: cargo test -p ${{ matrix.package }} -- --include-ignored
161+
run: cargo test -p ${{ matrix.package }}
162162
build-image:
163163
if: startsWith(github.ref, 'refs/tags/')
164164
needs: [fmt, clippy, tests]

Cargo.lock

Lines changed: 34 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ clap = { version = "4", features = ["derive"] }
4343
serde = { version = "1", features = ["derive"] }
4444
serde_json = "1"
4545
http-serde = "2"
46-
http = "*" # pickup version from http-serde
46+
http = "1"
4747
chrono = { version = "0", features = ["serde"] }
4848
tokio = { version = "1", default-features = false, features = [
4949
"fs",

file_store/src/mobile_session.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ pub struct DataTransferSessionReq {
230230
pub pub_key: PublicKeyBinary,
231231
pub signature: Vec<u8>,
232232
pub carrier_id: CarrierIdV2,
233+
pub sampling: bool,
233234
}
234235

235236
impl MsgDecode for DataTransferSessionReq {
@@ -251,6 +252,7 @@ impl TryFrom<DataTransferSessionReqV1> for DataTransferSessionReq {
251252
.try_into()?,
252253
pub_key: v.pub_key.into(),
253254
carrier_id,
255+
sampling: v.sampling,
254256
})
255257
}
256258
}
@@ -265,6 +267,7 @@ impl From<DataTransferSessionReq> for DataTransferSessionReqV1 {
265267
pub_key: v.pub_key.into(),
266268
signature: v.signature,
267269
carrier_id_v2: v.carrier_id.into(),
270+
sampling: v.sampling,
268271
..Default::default()
269272
}
270273
}

ingest/tests/common/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ impl TestClient {
514514
signature: vec![],
515515
rewardable_bytes: 0,
516516
carrier_id_v2: CarrierIdV2::Carrier9 as i32,
517+
sampling: false,
517518
};
518519

519520
data_transfer.signature = keypair.sign(&data_transfer.encode_to_vec())?;

0 commit comments

Comments
 (0)