Browse Source

chainspec: add missing ContentConfig parameters

iorveth 3 years ago
parent
commit
80a1a5033e

+ 12 - 0
node/src/chain_spec/mod.rs

@@ -349,6 +349,18 @@ pub fn testnet_genesis(
                 next_series_id: 1,
                 next_person_id: 1,
                 next_channel_transfer_request_id: 1,
+                min_round_duration: 3,
+                max_round_duration: 20,
+                min_bid_lock_duration: 2,
+                max_bid_lock_duration: 10,
+                min_starting_price: 10,
+                max_starting_price: 1000,
+                min_creator_royalty: Perbill::from_percent(1),
+                max_creator_royalty: Perbill::from_percent(5),
+                min_bid_step: 10,
+                max_bid_step: 100,
+                auction_fee_percentage: Perbill::from_percent(1),
+                auction_starts_at_max_delta: 90_000,
             }
         }),
         proposals_codex: Some(ProposalsCodexConfig {

+ 3 - 0
node/src/cli.rs

@@ -59,6 +59,9 @@ pub enum Subcommand {
     /// Build a chain specification.
     BuildSpec(sc_cli::BuildSpecCmd),
 
+    /// Build a chain specification with a light client sync state.
+    BuildSyncSpec(sc_cli::BuildSyncSpecCmd),
+
     /// Validate blocks.
     CheckBlock(sc_cli::CheckBlockCmd),
 

+ 0 - 3
query-node/schemas/content.graphql

@@ -257,9 +257,6 @@ type Video @entity {
   "Flag signaling whether a video is censored."
   isCensored: Boolean!
 
-  "Video nft details"
-  nft: OwnedNFT!
-
   "Whether the Video contains explicit material."
   isExplicit: Boolean
 

+ 1 - 1
runtime-modules/content/src/lib.rs

@@ -1586,7 +1586,7 @@ impl<T: Trait> Module<T> {
     /// Ensure owner account id exists, retreive corresponding one.
     pub fn ensure_owner_account_id(
         video: &Video<T>,
-        owned_nft: &NFT<T>,
+        owned_nft: &Nft<T>,
     ) -> Result<T::AccountId, Error<T>> {
         match owned_nft.owner {
             ChannelOwner::Member(member_id) => Self::ensure_member_controller_account_id(member_id),

+ 1 - 0
runtime-modules/content/src/nft/mod.rs

@@ -1,5 +1,6 @@
 mod types;
 pub use types::*;
+use sp_std::borrow::ToOwned;
 
 use crate::*;
 

+ 1 - 1
runtime-modules/content/src/nft/types.rs

@@ -290,7 +290,7 @@ pub type Auction<T> =
     AuctionRecord<<T as frame_system::Trait>::BlockNumber, BalanceOf<T>, MemberId<T>>;
 
 /// OwnedNFT alias type for simplification.
-pub type NFT<T> = OwnedNFT<
+pub type Nft<T> = OwnedNFT<
     <T as frame_system::Trait>::BlockNumber,
     MemberId<T>,
     CuratorGroupId<T>,

+ 1 - 1
runtime/src/lib.rs

@@ -447,7 +447,7 @@ impl content::Trait for Runtime {
 }
 
 // TODO: Remove after the integration with the Content pallet.
-impl common::storage::StorageSystem<Runtime> for () {
+impl common::storage::StorageSystem<Runtime, MemberId> for () {
     fn atomically_add_content(
         _: StorageObjectOwner<MemberId, ChannelId, DAOId>,
         _: Vec<ContentParameters<ContentId, DataObjectTypeId>>,