Skip to content

Commit 678a371

Browse files
committed
Format code
Format code
1 parent de771f3 commit 678a371

File tree

22 files changed

+113
-133
lines changed

22 files changed

+113
-133
lines changed

client/src/client_sync/v17/blockchain.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,10 @@ macro_rules! impl_client_v17__scan_tx_out_set {
329329
}
330330

331331
/// Starts a scan of the UTXO set for specified descriptors.
332-
pub fn scan_tx_out_set_start(&self, scan_objects: &[&str]) -> Result<ScanTxOutSetStart> {
332+
pub fn scan_tx_out_set_start(
333+
&self,
334+
scan_objects: &[&str],
335+
) -> Result<ScanTxOutSetStart> {
333336
self.call("scantxoutset", &[into_json("start")?, into_json(scan_objects)?])
334337
}
335338

client/src/client_sync/v28/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ crate::impl_client_v17__scan_tx_out_set!();
5555
crate::impl_client_v17__verify_chain!();
5656
crate::impl_client_v17__verify_tx_out_proof!();
5757

58-
5958
// == Control ==
6059
crate::impl_client_v17__get_memory_info!();
6160
crate::impl_client_v18__get_rpc_info!();

types/src/model/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ pub use self::{
2828
GetDescriptorActivity, GetDifficulty, GetMempoolAncestors, GetMempoolAncestorsVerbose,
2929
GetMempoolDescendants, GetMempoolDescendantsVerbose, GetMempoolEntry, GetMempoolInfo,
3030
GetRawMempool, GetRawMempoolVerbose, GetTxOut, GetTxOutSetInfo, MempoolEntry,
31-
MempoolEntryFees, ReceiveActivity, ScanTxOutSetStart,
32-
ScanTxOutSetUnspent, Softfork, SoftforkType, SpendActivity, VerifyTxOutProof,
31+
MempoolEntryFees, ReceiveActivity, ScanTxOutSetStart, ScanTxOutSetUnspent, Softfork,
32+
SoftforkType, SpendActivity, VerifyTxOutProof,
3333
},
3434
generating::{Generate, GenerateBlock, GenerateToAddress, GenerateToDescriptor},
3535
mining::{

types/src/v17/blockchain/error.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -590,20 +590,13 @@ impl fmt::Display for ScanTxOutSetError {
590590
use ScanTxOutSetError::*;
591591

592592
match self {
593-
BestBlockHash(e) =>
594-
write_err!(f, "conversion of the `bestblock` field failed"; e),
595-
BlockHash(e) =>
596-
write_err!(f, "conversion of the `blockhash` field failed"; e),
597-
Txid(e) =>
598-
write_err!(f, "conversion of the `txid` field failed"; e),
599-
ScriptPubKey(e) =>
600-
write_err!(f, "conversion of the `scriptPubKey` field failed"; e),
601-
TotalAmount(e) =>
602-
write_err!(f, "conversion of the `total_amount` field failed"; e),
603-
Amount(e) =>
604-
write_err!(f, "conversion of the `amount` field failed"; e),
605-
Numeric(e) =>
606-
write_err!(f, "numeric"; e),
593+
BestBlockHash(e) => write_err!(f, "conversion of the `bestblock` field failed"; e),
594+
BlockHash(e) => write_err!(f, "conversion of the `blockhash` field failed"; e),
595+
Txid(e) => write_err!(f, "conversion of the `txid` field failed"; e),
596+
ScriptPubKey(e) => write_err!(f, "conversion of the `scriptPubKey` field failed"; e),
597+
TotalAmount(e) => write_err!(f, "conversion of the `total_amount` field failed"; e),
598+
Amount(e) => write_err!(f, "conversion of the `amount` field failed"; e),
599+
Numeric(e) => write_err!(f, "numeric"; e),
607600
}
608601
}
609602
}

types/src/v17/blockchain/into.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: CC0-1.0
22

33
use bitcoin::consensus::encode;
4-
use bitcoin::{block, hex, Block, BlockHash, CompactTarget, Txid, Weight, Work, ScriptBuf};
4+
use bitcoin::{block, hex, Block, BlockHash, CompactTarget, ScriptBuf, Txid, Weight, Work};
55

66
// TODO: Use explicit imports?
77
use super::*;
@@ -554,11 +554,8 @@ impl ScanTxOutSetStart {
554554
pub fn into_model(self) -> Result<model::ScanTxOutSetStart, ScanTxOutSetError> {
555555
use ScanTxOutSetError as E;
556556

557-
let unspents = self
558-
.unspents
559-
.into_iter()
560-
.map(|u| u.into_model())
561-
.collect::<Result<Vec<_>, _>>()?;
557+
let unspents =
558+
self.unspents.into_iter().map(|u| u.into_model()).collect::<Result<Vec<_>, _>>()?;
562559

563560
let total_amount = Amount::from_btc(self.total_amount).map_err(E::TotalAmount)?;
564561

types/src/v17/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ pub use self::{
243243
GetMempoolDescendantsVerbose, GetMempoolEntry, GetMempoolInfo, GetMempoolInfoError,
244244
GetRawMempool, GetRawMempoolVerbose, GetTxOut, GetTxOutError, GetTxOutSetInfo,
245245
GetTxOutSetInfoError, MapMempoolEntryError, MempoolEntry, MempoolEntryError,
246-
MempoolEntryFees, MempoolEntryFeesError, PruneBlockchain, ScanTxOutSetAbort, ScanTxOutSetError,
247-
ScanTxOutSetStart, ScanTxOutSetStatus, ScanTxOutSetUnspent, Softfork, SoftforkReject,
248-
VerifyChain, VerifyTxOutProof,
246+
MempoolEntryFees, MempoolEntryFeesError, PruneBlockchain, ScanTxOutSetAbort,
247+
ScanTxOutSetError, ScanTxOutSetStart, ScanTxOutSetStatus, ScanTxOutSetUnspent, Softfork,
248+
SoftforkReject, VerifyChain, VerifyTxOutProof,
249249
},
250250
control::{GetMemoryInfoStats, Locked, Logging},
251251
generating::{Generate, GenerateToAddress},

types/src/v18/blockchain/into.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
use bitcoin::{Amount, ScriptBuf, Txid, Wtxid};
44

55
use super::{
6-
GetMempoolEntry, MempoolEntry, MempoolEntryError, ScanTxOutSetError,
7-
ScanTxOutSetStart, ScanTxOutSetUnspent,
6+
GetMempoolEntry, MempoolEntry, MempoolEntryError, ScanTxOutSetError, ScanTxOutSetStart,
7+
ScanTxOutSetUnspent,
88
};
99
use crate::model;
1010

@@ -67,11 +67,8 @@ impl ScanTxOutSetStart {
6767
pub fn into_model(self) -> Result<model::ScanTxOutSetStart, ScanTxOutSetError> {
6868
use ScanTxOutSetError as E;
6969

70-
let unspents = self
71-
.unspents
72-
.into_iter()
73-
.map(|u| u.into_model())
74-
.collect::<Result<Vec<_>, _>>()?;
70+
let unspents =
71+
self.unspents.into_iter().map(|u| u.into_model()).collect::<Result<Vec<_>, _>>()?;
7572

7673
let total_amount = Amount::from_btc(self.total_amount).map_err(E::TotalAmount)?;
7774

types/src/v18/mod.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,7 @@ mod wallet;
233233

234234
#[doc(inline)]
235235
pub use self::{
236-
blockchain::{
237-
GetMempoolEntry, MempoolEntry, ScanTxOutSetStart,
238-
ScanTxOutSetUnspent,
239-
},
236+
blockchain::{GetMempoolEntry, MempoolEntry, ScanTxOutSetStart, ScanTxOutSetUnspent},
240237
control::{ActiveCommand, GetRpcInfo},
241238
network::{GetNodeAddresses, GetPeerInfo, NodeAddress, PeerInfo},
242239
raw_transactions::{
@@ -281,10 +278,10 @@ pub use crate::v17::{
281278
Logging, MapMempoolEntryError, MempoolAcceptance, MempoolEntryError, MempoolEntryFees,
282279
MempoolEntryFeesError, PruneBlockchain, PsbtInput, PsbtOutput, PsbtScript, RawTransaction,
283280
RawTransactionError, RawTransactionInput, RawTransactionOutput, RescanBlockchain,
284-
ScanTxOutSetError, SendMany, SendRawTransaction, SendToAddress, SetNetworkActive, SetTxFee,
285-
SignFail, SignFailError, SignMessage, SignMessageWithPrivKey, SignRawTransaction,
286-
SignRawTransactionError, Softfork, SoftforkReject, TestMempoolAccept, TransactionCategory,
287-
UploadTarget, ValidateAddress, ValidateAddressError, VerifyChain, VerifyMessage,
288-
VerifyTxOutProof, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt,
289-
WitnessUtxo, ScanTxOutSetAbort, ScanTxOutSetStatus,
281+
ScanTxOutSetAbort, ScanTxOutSetError, ScanTxOutSetStatus, SendMany, SendRawTransaction,
282+
SendToAddress, SetNetworkActive, SetTxFee, SignFail, SignFailError, SignMessage,
283+
SignMessageWithPrivKey, SignRawTransaction, SignRawTransactionError, Softfork, SoftforkReject,
284+
TestMempoolAccept, TransactionCategory, UploadTarget, ValidateAddress, ValidateAddressError,
285+
VerifyChain, VerifyMessage, VerifyTxOutProof, WalletCreateFundedPsbt,
286+
WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo,
290287
};

types/src/v19/blockchain/into.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,8 @@ impl ScanTxOutSetStart {
244244

245245
let bestblock = self.best_block.parse::<BlockHash>().map_err(E::BestBlockHash)?;
246246

247-
let unspents = self
248-
.unspents
249-
.into_iter()
250-
.map(|u| u.into_model())
251-
.collect::<Result<Vec<_>, _>>()?;
247+
let unspents =
248+
self.unspents.into_iter().map(|u| u.into_model()).collect::<Result<Vec<_>, _>>()?;
252249

253250
let total_amount = Amount::from_btc(self.total_amount).map_err(E::TotalAmount)?;
254251

types/src/v19/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,12 @@ pub use crate::v17::{
276276
ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions,
277277
ListTransactionsItem, ListTransactionsItemError, ListUnspentItemError, ListWallets, LoadWallet,
278278
LockUnspent, Locked, Logging, PruneBlockchain, RawTransactionError, RawTransactionInput,
279-
RawTransactionOutput, RescanBlockchain, ScanTxOutSetError, SendMany, SendRawTransaction,
280-
SendToAddress, SetNetworkActive, SetTxFee, SignMessage, SignMessageWithPrivKey,
281-
SignRawTransaction, SignRawTransactionError, SoftforkReject, TestMempoolAccept,
282-
TransactionCategory, UploadTarget, ValidateAddress, ValidateAddressError, VerifyChain,
283-
VerifyMessage, VerifyTxOutProof, WalletCreateFundedPsbt, WalletCreateFundedPsbtError,
284-
WalletProcessPsbt, WitnessUtxo, ScanTxOutSetAbort, ScanTxOutSetStatus,
279+
RawTransactionOutput, RescanBlockchain, ScanTxOutSetAbort, ScanTxOutSetError,
280+
ScanTxOutSetStatus, SendMany, SendRawTransaction, SendToAddress, SetNetworkActive, SetTxFee,
281+
SignMessage, SignMessageWithPrivKey, SignRawTransaction, SignRawTransactionError,
282+
SoftforkReject, TestMempoolAccept, TransactionCategory, UploadTarget, ValidateAddress,
283+
ValidateAddressError, VerifyChain, VerifyMessage, VerifyTxOutProof, WalletCreateFundedPsbt,
284+
WalletCreateFundedPsbtError, WalletProcessPsbt, WitnessUtxo,
285285
};
286286
#[doc(inline)]
287287
pub use crate::v18::{

0 commit comments

Comments
 (0)