Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
Add storage node usage field
Browse files Browse the repository at this point in the history
  • Loading branch information
khssnv committed Aug 12, 2024
1 parent 1a953fd commit a57ff1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions blockchain/pallets/ddcnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type StorageNode struct {
ProviderId types.AccountID
ClusterId types.Option[ClusterId]
Props StorageNodeProps
TotalUsage types.Option[NodeUsage]
}

// TODO: `Host` is not `[MaxHostLen]types.U8` because the original `BoundedVec<_, MaxHostLen>`
Expand Down
7 changes: 7 additions & 0 deletions blockchain/pallets/primitives.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,10 @@ type CustomerUsage struct {
NumberOfPuts types.U64
NumberOfGets types.U64
}

type NodeUsage struct {
TransferredBytes types.U64
StoredBytes types.I64
NumberOfPuts types.U64
NumberOfGets types.U64
}

0 comments on commit a57ff1c

Please sign in to comment.