Skip to content

Commit 87d810b

Browse files
committed
disable json serialise as not working
1 parent 74d9787 commit 87d810b

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
lines changed

Cargo.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pallets/mining/eligibility/proxy/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ std = [
1515
'pallet-randomness-collective-flip/std',
1616
'pallet-transaction-payment/std',
1717
'pallet-treasury/std',
18-
'serde/std',
19-
'serde_json/std',
2018
'sp-core/std',
2119
'sp-io/std',
2220
'sp-runtime/std',
@@ -36,8 +34,6 @@ pallet-balances = { version = '2.0.0', default_features = false }
3634
pallet-randomness-collective-flip = { version = '2.0.0', default_features = false }
3735
pallet-transaction-payment = { version = '2.0.0', default_features = false }
3836
pallet-treasury = { version = '2.0.0', default-features = false }
39-
serde_json = '1.0.47'
40-
serde = { version = '1.0.102', features = ['derive'] }
4137
sp-core = { version = '2.0.0', default_features = false }
4238
sp-io = { version = '2.0.0', default_features = false }
4339
sp-runtime = { version = '2.0.0', default_features = false }

pallets/mining/eligibility/proxy/src/lib.rs

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use frame_support::{
2121
Parameter,
2222
};
2323
use frame_system::ensure_signed;
24-
use serde::{Serialize, Deserialize};
2524
use sp_io::hashing::blake2_128;
2625
use sp_runtime::{
2726
traits::{
@@ -60,7 +59,7 @@ type BalanceOf<T> = <<T as Trait>::Currency as Currency<<T as frame_system::Trai
6059
#[cfg_attr(feature = "std", derive())]
6160
pub struct MiningEligibilityProxy(pub [u8; 16]);
6261

63-
#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, Serialize)]
62+
#[derive(Encode, Decode, Debug, Default, Clone, PartialEq)]
6463
#[cfg_attr(feature = "std", derive())]
6564
pub struct MiningEligibilityProxyResult<U, V, W, X> {
6665
pub proxy_claim_requestor_account_id: U, /* Supernode (proxy) account id requesting DHX rewards as proxy to
@@ -70,13 +69,9 @@ pub struct MiningEligibilityProxyResult<U, V, W, X> {
7069
pub proxy_claim_block_redeemed: X,
7170
}
7271

73-
#[derive(Encode, Decode, Debug, Default, Clone, Eq, PartialEq, Serialize)]
72+
#[derive(Encode, Decode, Debug, Default, Clone, Eq, PartialEq)]
7473
#[cfg_attr(feature = "std", derive())]
75-
pub struct MiningEligibilityProxyClaimRewardeeData<T, U, V, W, X> where
76-
<T as frame_system::Trait>::AccountId: Serialize,
77-
<<T as Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance: Serialize,
78-
<T as frame_system::Trait>::BlockNumber: Serialize,
79-
{
74+
pub struct MiningEligibilityProxyClaimRewardeeData<U, V, W, X> {
8075
pub proxy_claim_rewardee_account_id: U, // Rewardee miner associated with supernode (proxy) account id
8176
pub proxy_claim_reward_amount: V, // Reward in DHX tokens for specific rewardee miner
8277
pub proxy_claim_start_block: W, // Start block associated with mining claim
@@ -412,10 +407,10 @@ impl<T: Trait> Module<T> {
412407
"Latest field proxy_claim_total_reward_amount {:#?}",
413408
_mining_eligibility_proxy_result.proxy_claim_total_reward_amount
414409
);
415-
debug::info!(
416-
"Latest field proxy_claim_rewardees_data {:#?}",
417-
serde_json::to_string_pretty(&_mining_eligibility_proxy_result.proxy_claim_rewardees_data)
418-
);
410+
// debug::info!(
411+
// "Latest field proxy_claim_rewardees_data {:#?}",
412+
// serde_json::to_string_pretty(&_mining_eligibility_proxy_result.proxy_claim_rewardees_data)
413+
// );
419414
debug::info!(
420415
"Latest field proxy_claim_block_redeemed {:#?}",
421416
_mining_eligibility_proxy_result.proxy_claim_block_redeemed
@@ -451,10 +446,10 @@ impl<T: Trait> Module<T> {
451446
"Inserted field proxy_claim_total_reward_amount {:#?}",
452447
_mining_eligibility_proxy_result.proxy_claim_total_reward_amount
453448
);
454-
debug::info!(
455-
"Inserted field proxy_claim_rewardees_data {:#?}",
456-
serde_json::to_string_pretty(&_mining_eligibility_proxy_result.proxy_claim_rewardees_data)
457-
);
449+
// debug::info!(
450+
// "Inserted field proxy_claim_rewardees_data {:#?}",
451+
// serde_json::to_string_pretty(&_mining_eligibility_proxy_result.proxy_claim_rewardees_data)
452+
// );
458453
debug::info!(
459454
"Inserted field proxy_claim_block_redeemed {:#?}",
460455
_mining_eligibility_proxy_result.proxy_claim_block_redeemed

0 commit comments

Comments
 (0)