Skip to content

Commit

Permalink
Fixed response format error (#429)
Browse files Browse the repository at this point in the history
## Description
<!-- Describe what change this PR is implementing -->

## Types of Changes
Please select the branch type you are merging and fill in the relevant
template.
<!--- Check the following box with an x if the following applies: -->
- [ ] Hotfix
- [ ] Release
- [ ] Fix or Feature

## Fix or Feature
<!--- Check the following box with an x if the following applies: -->

### Types of Changes
<!--- What types of changes does your code introduce? -->
- [ ] Tech Debt (Code improvements)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Dependency upgrade (A change in substrate or any 3rd party crate
version)

### Migrations and Hooks
<!--- Check the following box with an x if the following applies: -->
- [ ] This change requires a runtime migration.
- [ ] Modifies `on_initialize`
- [ ] Modifies `on_finalize`

### Checklist for Fix or Feature
<!--- All boxes need to be checked. Follow this checklist before
requiring PR review -->
- [ ] Change has been tested locally.
- [ ] Change adds / updates tests if applicable.
- [ ] Changelog doc updated.
- [ ] `spec_version` has been incremented.
- [ ] `network-relayer`'s
[events](https://github.com/Cerebellum-Network/network-relayer/blob/dev-cere/shared/substrate/events.go)
have been updated according to the blockchain events if applicable.
- [ ] All CI checks have been passed successfully

## Checklist for Hotfix
<!--- All boxes need to be checked. Follow this checklist before
requiring PR review -->
- [ ] Change has been deployed to Testnet.
- [ ] Change has been tested in Testnet.
- [ ] Changelog has been updated.
- [ ] Crate version has been updated.
- [ ] `spec_version` has been incremented.
- [ ] Transaction version has been updated if required.
- [ ] Pull Request to `dev` has been created.
- [ ] Pull Request to `staging` has been created.
- [ ] `network-relayer`'s
[events](https://github.com/Cerebellum-Network/network-relayer/blob/dev-cere/shared/substrate/events.go)
have been updated according to the blockchain events if applicable.
- [ ] All CI checks have been passed successfully

## Checklist for Release
<!--- All boxes need to be checked. Follow this checklist before
requiring PR review -->
- [ ] Change has been deployed to Devnet.
- [ ] Change has been tested in Devnet.
- [ ] Change has been deployed to Qanet.
- [ ] Change has been tested in Qanet.
- [ ] Change has been deployed to Testnet.
- [ ] Change has been tested in Testnet.
- [ ] Changelog has been updated.
- [ ] Crate version has been updated.
- [ ] Spec version has been updated.
- [ ] Transaction version has been updated if required.
- [ ] All CI checks have been passed successfully
  • Loading branch information
ayushmishra2005 authored Sep 19, 2024
1 parent de8c66f commit 5ae6d1b
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 117 deletions.
11 changes: 6 additions & 5 deletions pallets/ddc-verification/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,16 +596,17 @@ pub mod pallet {
/// Bucket id
pub(crate) bucket_id: BucketId,
/// SubAggregates.
pub(crate) sub_aggregate: Vec<BucketSubAggregate>,
pub(crate) sub_aggregates: Vec<BucketSubAggregate>,
}

/// Sub Aggregates of a bucket.
#[derive(
Debug, Serialize, Deserialize, Clone, Hash, Ord, PartialOrd, PartialEq, Eq, Encode, Decode,
)]
#[allow(non_snake_case)]
pub(crate) struct BucketSubAggregate {
/// Node id.
pub(crate) node_id: String,
pub(crate) NodeID: String,
/// Total amount of stored bytes.
pub(crate) stored_bytes: i64,
/// Total amount of transferred bytes.
Expand Down Expand Up @@ -1501,10 +1502,10 @@ pub mod pallet {
era_id
);
for customer_activity in customer_activities.clone() {
for bucket_sub_aggregate in customer_activity.sub_aggregate.clone() {
for bucket_sub_aggregate in customer_activity.sub_aggregates.clone() {
let bucket_node_aggregates_activity = BucketNodeAggregatesActivity {
bucket_id: customer_activity.bucket_id,
node_id: bucket_sub_aggregate.node_id,
node_id: bucket_sub_aggregate.NodeID,
stored_bytes: bucket_sub_aggregate.stored_bytes,
transferred_bytes: bucket_sub_aggregate.transferred_bytes,
number_of_puts: bucket_sub_aggregate.number_of_puts,
Expand All @@ -1513,7 +1514,7 @@ pub mod pallet {

bucket_node_aggregates_activities.push(bucket_node_aggregates_activity);
}
log::info!("🏠🚀 Fetched Bucket node-aggregates for cluster_id: {:?} for era_id: {:?} for bucket_id {:?}::: Bucket Sub-Aggregates are {:?}", cluster_id, era_id, customer_activity.bucket_id, customer_activity.sub_aggregate);
log::info!("🏠🚀 Fetched Bucket node-aggregates for cluster_id: {:?} for era_id: {:?} for bucket_id {:?}::: Bucket Sub-Aggregates are {:?}", cluster_id, era_id, customer_activity.bucket_id, customer_activity.sub_aggregates);
}

Self::get_consensus_for_bucket_node_aggregates(
Expand Down
Loading

0 comments on commit 5ae6d1b

Please sign in to comment.