Skip to content

Commit

Permalink
Payout type fix 0.9.30 (#166)
Browse files Browse the repository at this point in the history
enum coordination with DAC
  • Loading branch information
aie0 authored Nov 27, 2023
1 parent 73f2023 commit ad390bd
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions pallets/ddc-payouts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ pub struct NodeUsage {
/// Stores reward in tokens(units) of node provider as per NodeUsage
#[derive(PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, Default, Clone)]
pub struct NodeReward {
pub transfer: u128, // tokens for transferred_bytes
pub storage: u128, // tokens for stored_bytes
pub puts: u128, // tokens for number_of_puts
pub gets: u128, // tokens for number_of_gets
pub transfer: u128, // reward in tokens for NodeUsage::transferred_bytes
pub storage: u128, // reward in tokens for NodeUsage::stored_bytes
pub puts: u128, // reward in tokens for NodeUsage::number_of_puts
pub gets: u128, // reward in tokens for NodeUsage::number_of_gets
}

#[derive(PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, Default, Clone)]
Expand All @@ -77,10 +77,10 @@ pub struct BillingReportDebt {
/// Stores charge in tokens(units) of customer as per CustomerUsage
#[derive(PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, Default, Clone)]
pub struct CustomerCharge {
pub transfer: u128, // tokens for transferred_bytes
pub storage: u128, // tokens for stored_bytes
pub puts: u128, // tokens for number_of_puts
pub gets: u128, // tokens for number_of_gets
pub transfer: u128, // charge in tokens for CustomerUsage::transferred_bytes
pub storage: u128, // charge in tokens for CustomerUsage::stored_bytes
pub puts: u128, // charge in tokens for CustomerUsage::number_of_puts
pub gets: u128, // charge in tokens for CustomerUsage::number_of_gets
}

/// The balance type of this pallet.
Expand Down Expand Up @@ -249,17 +249,17 @@ pub mod pallet {
}

#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, PartialEq, Default)]
// don't remove or change numbers, if needed add a new state to the end with new number
// DAC uses the state value for integration!
pub enum State {
#[default]
NotInitialized,
Initialized,
ChargingCustomers,
CustomersChargedWithFees,
CustomersCharged,
FeesDeducted,
RewardingProviders,
ProvidersRewarded,
Finalized,
NotInitialized = 1,
Initialized = 2,
ChargingCustomers = 3,
CustomersChargedWithFees = 4,
RewardingProviders = 5,
ProvidersRewarded = 6,
Finalized = 7,
}

#[pallet::call]
Expand Down

0 comments on commit ad390bd

Please sign in to comment.