-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ipfs node info #116
Merged
Merged
Ipfs node info #116
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
UpdateDuration is equal the EraDuration. Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
charmitro
suggested changes
Aug 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error[E0277]: the trait bound `u32: From<u64>` is not satisfied
--> /Users/charmitro/Cherry/Cherry-Node/bin/node/runtime/src/lib.rs:929:24
|
929 | type UpdateDuration = UpdateDuration;
| ^^^^^^^^^^^^^^ the trait `From<u64>` is not implemented for `u32`
|
= help: the following other types implement trait `From<T>`:
<f32 as From<i16>>
<f32 as From<i8>>
<f32 as From<u16>>
<f32 as From<u8>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
and 87 others
note: required because of the requirements on the impl of `hidden_include::traits::Get<u32>` for `UpdateDuration`
--> /Users/charmitro/Cherry/Cherry-Node/bin/node/runtime/src/lib.rs:918:1
|
918 | / parameter_types! {
919 | | pub const UpdateDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64 * 6;
920 | | pub const MaxIpfsOwned: u32 = 5;
921 | | pub const DefaultAssetLifetime: BlockNumber = DEFAULT_ASSET_LIFETIME;
922 | | }
| |_^
note: required by a bound in `pallet_ipfs::Config::UpdateDuration`
--> /Users/charmitro/Cherry/Cherry-Node/bin/node/pallets/pallet-ipfs/src/lib.rs:168:24
|
168 | type UpdateDuration: Get<Self::BlockNumber>;
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_ipfs::Config::UpdateDuration`
= note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `node-runtime` due to previous error
charmitro
suggested changes
Aug 8, 2022
Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
Co-Authored-By: Martín Noblía <mnoblia@disroot.org>
fix: type convertion error and ExportIpfsStats event arguments
charmitro
approved these changes
Aug 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We changed the
get_storage
function fields so that it will return themaximum_storage
of the IPFS node, instead of thetotal_files
and we changed the fields in theIpfsNode
struct to match our needs.We created a new type
UpdateDuration
which equals theEraDuration
and we are gonna use it for depositing the event. Added a new event, which will be the one that thenode-listener
will be listening to. The event is still wip.Added a new function
publish_ipfs_node_db_info
which will get the info from the our storage, make some type convertions and then publish the results through the deposited event (wip).Closes #115