Skip to content

Commit 9957f86

Browse files
committed
Merge #374: Remove serde-deny-unknown-fields from model types
899b08e Remove serde-deny-unknown-fields from model types (Jamil Lambert, PhD) Pull request description: The attribute was added to catch mistakes in what core returns compared to what is in the structs. This has no meaning in `model` since they are internal conversions of the version specific types. Remove the attribute from all `model` types. Closes #373 ACKs for top commit: tcharding: ACK 899b08e Tree-SHA512: aadda766f61afc609c3d66f138949f7e82fc703f0c325494ef99316f98971dca3faea557e3a2af2ce72493c79620c05719652e049f5ea73c6f8b321c4aa398f2
2 parents 40b6314 + 899b08e commit 9957f86

File tree

7 files changed

+0
-136
lines changed

7 files changed

+0
-136
lines changed

types/src/model/blockchain.rs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use super::ScriptPubkey;
1919

2020
/// Models the result of JSON-RPC method `dumptxoutset`.
2121
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
22-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
2322
pub struct DumpTxOutSet {
2423
/// The number of coins written in the snapshot.
2524
pub coins_written: Amount,
@@ -37,17 +36,14 @@ pub struct DumpTxOutSet {
3736

3837
/// Models the result of JSON-RPC method `getbestblockhash`.
3938
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
40-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
4139
pub struct GetBestBlockHash(pub BlockHash);
4240

4341
/// Models the result of JSON-RPC method `getblock` with verbosity set to 0.
4442
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
45-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
4643
pub struct GetBlockVerboseZero(pub Block);
4744

4845
/// Models the result of JSON-RPC method `getblock` with verbosity set to 1.
4946
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
50-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
5147
pub struct GetBlockVerboseOne {
5248
/// The block hash (same as provided) in RPC call.
5349
pub hash: BlockHash,
@@ -91,7 +87,6 @@ pub struct GetBlockVerboseOne {
9187

9288
/// Models the result of JSON-RPC method `getblockchaininfo`.
9389
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
94-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
9590
pub struct GetBlockchainInfo {
9691
/// Current network name as defined in BIP70 (main, test, signet, regtest).
9792
pub chain: Network,
@@ -137,7 +132,6 @@ pub struct GetBlockchainInfo {
137132

138133
/// Softfork status. Part of `getblockchaininfo`.
139134
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
140-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
141135
pub struct Softfork {
142136
/// The [`SoftforkType`]: one of "buried", "bip9".
143137
#[serde(rename = "type")]
@@ -166,7 +160,6 @@ pub enum SoftforkType {
166160

167161
/// BIP-9 softfork info. Part of `getblockchaininfo`.
168162
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
169-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
170163
pub struct Bip9SoftforkInfo {
171164
/// One of "defined", "started", "locked_in", "active", "failed".
172165
pub status: Bip9SoftforkStatus,
@@ -201,7 +194,6 @@ pub enum Bip9SoftforkStatus {
201194

202195
/// BIP-9 softfork statistics. Part of `getblockchaininfo`.
203196
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
204-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
205197
pub struct Bip9SoftforkStatistics {
206198
/// The length in blocks of the BIP9 signalling period.
207199
pub period: u32,
@@ -217,12 +209,10 @@ pub struct Bip9SoftforkStatistics {
217209

218210
/// Models the result of JSON-RPC method `getblockcount`.
219211
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
220-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
221212
pub struct GetBlockCount(pub u64);
222213

223214
/// Models the result of JSON-RPC method `getblockfilter`.
224215
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
225-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
226216
pub struct GetBlockFilter {
227217
/// The filter data.
228218
pub filter: Vec<u8>,
@@ -232,17 +222,14 @@ pub struct GetBlockFilter {
232222

233223
/// Models the result of JSON-RPC method `getblockhash`.
234224
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
235-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
236225
pub struct GetBlockHash(pub BlockHash);
237226

238227
/// Models the result of JSON-RPC method `getblockheader`.
239228
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
240-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
241229
pub struct GetBlockHeader(pub block::Header);
242230

243231
/// Models the result of JSON-RPC method `getblockheader`.
244232
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
245-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
246233
pub struct GetBlockHeaderVerbose {
247234
/// the block hash (same as provided).
248235
pub hash: BlockHash,
@@ -278,7 +265,6 @@ pub struct GetBlockHeaderVerbose {
278265

279266
/// Models the result of JSON-RPC method `getblockstats`.
280267
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
281-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
282268
pub struct GetBlockStats {
283269
/// Average fee in the block.
284270
pub average_fee: Amount,
@@ -348,7 +334,6 @@ pub struct GetBlockStats {
348334

349335
/// Models the result of JSON-RPC method `getchainstates`.
350336
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
351-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
352337
pub struct GetChainStates {
353338
/// The number of headers seen so far.
354339
pub headers: u32,
@@ -358,7 +343,6 @@ pub struct GetChainStates {
358343

359344
/// A single chainstate. Part of `getchainstates`.
360345
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
361-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
362346
pub struct ChainState {
363347
/// Number of blocks in this chainstate.
364348
pub blocks: u32,
@@ -384,12 +368,10 @@ pub struct ChainState {
384368

385369
/// Models the result of JSON-RPC method `getchaintips`.
386370
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
387-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
388371
pub struct GetChainTips(pub Vec<ChainTips>);
389372

390373
/// An individual list item from the result of JSON-RPC method `getchaintips`.
391374
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
392-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
393375
pub struct ChainTips {
394376
/// Height of the chain tip.
395377
pub height: u32,
@@ -419,7 +401,6 @@ pub enum ChainTipsStatus {
419401

420402
/// Models the result of JSON-RPC method `getchaintxstats`.
421403
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
422-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
423404
pub struct GetChainTxStats {
424405
/// The timestamp for the final block in the window in UNIX format.
425406
pub time: u32,
@@ -441,7 +422,6 @@ pub struct GetChainTxStats {
441422

442423
/// Models the result of JSON-RPC method `getdeploymentinfo`.
443424
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
444-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
445425
pub struct GetDeploymentInfo {
446426
/// Requested block hash (or tip).
447427
pub hash: BlockHash,
@@ -453,7 +433,6 @@ pub struct GetDeploymentInfo {
453433

454434
/// Deployment info. Part of `getdeploymentinfo`.
455435
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
456-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
457436
pub struct DeploymentInfo {
458437
/// One of "buried", "bip9".
459438
pub deployment_type: String,
@@ -467,7 +446,6 @@ pub struct DeploymentInfo {
467446

468447
/// Status of bip9 softforks. Part of `getdeploymentinfo`.
469448
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
470-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
471449
pub struct Bip9Info {
472450
/// The bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status).
473451
pub bit: Option<u8>,
@@ -491,7 +469,6 @@ pub struct Bip9Info {
491469

492470
/// Numeric statistics about signalling for a softfork. Part of `getdeploymentinfo`.
493471
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
494-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
495472
pub struct Bip9Statistics {
496473
/// The length in blocks of the signalling period.
497474
pub period: u32,
@@ -507,7 +484,6 @@ pub struct Bip9Statistics {
507484

508485
/// Models the result of the JSON-RPC method `getdescriptoractivity`.
509486
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
510-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
511487
pub struct GetDescriptorActivity {
512488
/// A list of activity events related to the descriptors.
513489
pub activity: Vec<ActivityEntry>,
@@ -524,7 +500,6 @@ pub enum ActivityEntry {
524500

525501
/// Models a 'spend' activity event. Part of `getdescriptoractivity`.
526502
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
527-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
528503
pub struct SpendActivity {
529504
/// The total amount of the spent output.
530505
pub amount: Amount,
@@ -546,7 +521,6 @@ pub struct SpendActivity {
546521

547522
/// Models a 'receive' activity event. Part of `getdescriptoractivity`
548523
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
549-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
550524
pub struct ReceiveActivity {
551525
/// The total amount in BTC of the new output.
552526
pub amount: Amount,
@@ -564,37 +538,30 @@ pub struct ReceiveActivity {
564538

565539
/// Models the result of JSON-RPC method `getdifficulty`.
566540
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
567-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
568541
pub struct GetDifficulty(pub f64);
569542

570543
/// Models the result of JSON-RPC method `getmempoolancestors` with verbose set to false.
571544
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
572-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
573545
pub struct GetMempoolAncestors(pub Vec<Txid>);
574546

575547
/// Models the result of JSON-RPC method `getmempoolancestors` with verbose set to true.
576548
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
577-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
578549
pub struct GetMempoolAncestorsVerbose(pub BTreeMap<Txid, MempoolEntry>);
579550

580551
/// Models the result of JSON-RPC method `getmempooldescendants` with verbose set to false.
581552
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
582-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
583553
pub struct GetMempoolDescendants(pub Vec<Txid>);
584554

585555
/// Models the result of JSON-RPC method `getmempooldescendants` with verbose set to true.
586556
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
587-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
588557
pub struct GetMempoolDescendantsVerbose(pub BTreeMap<Txid, MempoolEntry>);
589558

590559
/// Models the result of JSON-RPC method `getmempoolentry`.
591560
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
592-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
593561
pub struct GetMempoolEntry(pub MempoolEntry);
594562

595563
/// Mempool data. Part of `getmempoolentry`.
596564
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
597-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
598565
pub struct MempoolEntry {
599566
/// Virtual transaction size as defined in BIP 141. v0.19 and later only.
600567
///
@@ -637,7 +604,6 @@ pub struct MempoolEntry {
637604

638605
/// Fee object. Part of `getmempoolentry`.
639606
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
640-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
641607
pub struct MempoolEntryFees {
642608
/// Transaction fee in BTC.
643609
pub base: Amount,
@@ -651,7 +617,6 @@ pub struct MempoolEntryFees {
651617

652618
/// Models the result of JSON-RPC method `getmempoolinfo` with verbose set to true.
653619
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
654-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
655620
pub struct GetMempoolInfo {
656621
/// True if the mempool is fully loaded. v0.19 and later only.
657622
pub loaded: Option<bool>,
@@ -685,17 +650,14 @@ pub struct GetMempoolInfo {
685650

686651
/// Models the result of JSON-RPC method `getrawmempool` with verbose set to false.
687652
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
688-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
689653
pub struct GetRawMempool(pub Vec<Txid>);
690654

691655
/// Models the result of JSON-RPC method `getrawmempool` with verbose set to true.
692656
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
693-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
694657
pub struct GetRawMempoolVerbose(pub BTreeMap<Txid, MempoolEntry>);
695658

696659
/// Models the result of JSON-RPC method `gettxout`.
697660
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
698-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
699661
pub struct GetTxOut {
700662
/// The hash of the block at the tip of the chain.
701663
pub best_block: BlockHash,
@@ -713,7 +675,6 @@ pub struct GetTxOut {
713675

714676
/// Models the result of JSON-RPC method `gettxoutsetinfo`.
715677
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
716-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
717678
pub struct GetTxOutSetInfo {
718679
/// The current block height (index).
719680
pub height: u32,
@@ -740,12 +701,10 @@ pub struct GetTxOutSetInfo {
740701

741702
/// Models the result of JSON-RPC method `gettxspendingprevout`.
742703
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
743-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
744704
pub struct GetTxSpendingPrevout(pub Vec<GetTxSpendingPrevoutItem>);
745705

746706
/// A transaction item. Part of `gettxspendingprevout`.
747707
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
748-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
749708
pub struct GetTxSpendingPrevoutItem {
750709
/// The outpoint containing the transaction id and vout value of the checked output.
751710
pub outpoint: OutPoint,
@@ -755,7 +714,6 @@ pub struct GetTxSpendingPrevoutItem {
755714

756715
/// Models the result of JSON-RPC method `loadtxoutset`.
757716
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
758-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
759717
pub struct LoadTxOutSet {
760718
/// The number of coins loaded from the snapshot.
761719
pub coins_loaded: Amount,
@@ -780,5 +738,4 @@ pub struct ScanBlocksStart {
780738

781739
/// Models the result of JSON-RPC method `verifytxoutproof`.
782740
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
783-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
784741
pub struct VerifyTxOutProof(pub Vec<Txid>);

types/src/model/generating.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use serde::{Deserialize, Serialize};
1010

1111
/// Models the result of JSON-RPC method `generate`.
1212
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
13-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
1413
pub struct Generate(pub Vec<BlockHash>);
1514

1615
impl Generate {
@@ -23,7 +22,6 @@ impl Generate {
2322

2423
/// Models the result of JSON-RPC method `generateblock`.
2524
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
26-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
2725
pub struct GenerateBlock {
2826
/// Hash of generated block.
2927
pub hash: BlockHash,
@@ -33,7 +31,6 @@ pub struct GenerateBlock {
3331

3432
/// Models the result of JSON-RPC method `generatetoaddress`.
3533
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
36-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
3734
pub struct GenerateToAddress(pub Vec<BlockHash>);
3835

3936
impl GenerateToAddress {
@@ -46,7 +43,6 @@ impl GenerateToAddress {
4643

4744
/// Models the result of JSON-RPC method `generatetodescriptor`.
4845
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
49-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
5046
pub struct GenerateToDescriptor(pub Vec<BlockHash>);
5147

5248
impl GenerateToDescriptor {

types/src/model/mining.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use serde::{Deserialize, Serialize};
1414

1515
/// Models the result of JSON-RPC method `getblocktemplate`.
1616
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
17-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
1817
pub struct GetBlockTemplate {
1918
/// The preferred block version.
2019
pub version: block::Version,
@@ -72,7 +71,6 @@ pub struct GetBlockTemplate {
7271

7372
/// Non-coinbase transaction contents. Part of `getblocktemplate`.
7473
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
75-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
7674
pub struct BlockTemplateTransaction {
7775
/// The transaction.
7876
pub data: Transaction,
@@ -99,7 +97,6 @@ pub struct BlockTemplateTransaction {
9997

10098
/// Models the result of JSON-RPC method `getmininginfo`.
10199
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
102-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
103100
pub struct GetMiningInfo {
104101
/// The current block.
105102
pub blocks: u64,
@@ -132,7 +129,6 @@ pub struct GetMiningInfo {
132129

133130
/// Represents the `next` block information. Part of `getmininginfo`.
134131
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
135-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
136132
pub struct NextBlockInfo {
137133
/// The next height.
138134
pub height: u64,
@@ -146,12 +142,10 @@ pub struct NextBlockInfo {
146142

147143
/// Models the result of JSON-RPC method `getprioritisedtransactions`.
148144
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
149-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
150145
pub struct GetPrioritisedTransactions(pub BTreeMap<Txid, PrioritisedTransaction>);
151146

152147
/// An individual prioritised transaction. Part of `getprioritisedtransactions`.
153148
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
154-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
155149
pub struct PrioritisedTransaction {
156150
/// Transaction fee delta in satoshis.
157151
pub fee_delta: Amount,

types/src/model/network.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use serde::{Deserialize, Serialize};
1010

1111
/// Models the result of JSON-RPC method `getnetworkinfo`.
1212
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
13-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
1413
pub struct GetNetworkInfo {
1514
/// The server version.
1615
pub version: usize,
@@ -48,7 +47,6 @@ pub struct GetNetworkInfo {
4847

4948
/// Information per network. Part of `getnetworkinfo`.
5049
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
51-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
5250
pub struct GetNetworkInfoNetwork {
5351
/// Network (ipv4, ipv6, onion, i2p, cjdns).
5452
pub name: String,
@@ -64,7 +62,6 @@ pub struct GetNetworkInfoNetwork {
6462

6563
/// Local address info. Part of `getnetworkinfo`.
6664
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
67-
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
6865
pub struct GetNetworkInfoAddress {
6966
/// Network address.
7067
pub address: String,

0 commit comments

Comments
 (0)