diff --git a/README.md b/README.md index 01f3e08..f160aa1 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ In order to run the available tests, execute: cargo test ``` -This command will run a [bitcoind] node, two [electrs] nodes and three [RGB +This command will run a [bitcoind] node, three [electrs] nodes and three [RGB proxy] instances, in order to perform integration tests in a regtest environment. diff --git a/src/wallet/mod.rs b/src/wallet/mod.rs index 4f7f781..e8f70d3 100644 --- a/src/wallet/mod.rs +++ b/src/wallet/mod.rs @@ -1438,7 +1438,7 @@ impl Wallet { }) } - fn _check_transport_endpoints(&self, transport_endpoints: &Vec) -> Result<(), Error> { + fn _check_transport_endpoints(&self, transport_endpoints: &[String]) -> Result<(), Error> { if transport_endpoints.is_empty() { return Err(Error::InvalidTransportEndpoints { details: s!("must provide at least a transport endpoint"), @@ -1606,7 +1606,7 @@ impl Wallet { .filter(|t| t.waiting_counterparty() && t.expiration.unwrap_or(now) < now) .collect(); for transfer in expired_transfers.iter() { - let updated_batch_transfer = self._refresh_transfer(transfer, db_data, &vec![])?; + let updated_batch_transfer = self._refresh_transfer(transfer, db_data, &[])?; if updated_batch_transfer.is_none() { let mut updated_batch_transfer: DbBatchTransferActMod = transfer.clone().into(); updated_batch_transfer.status = ActiveValue::Set(TransferStatus::Failed); @@ -2469,7 +2469,7 @@ impl Wallet { throw_err: bool, db_data: &mut DbData, ) -> Result<(), Error> { - let updated_batch_transfer = self._refresh_transfer(batch_transfer, db_data, &vec![])?; + let updated_batch_transfer = self._refresh_transfer(batch_transfer, db_data, &[])?; // fail transfer if the status didn't change after a refresh if updated_batch_transfer.is_none() { self._fail_batch_transfer(batch_transfer)?; @@ -3151,7 +3151,7 @@ impl Wallet { Ok(db_asset.try_into_model().unwrap()) } - fn _get_total_issue_amount(&self, amounts: &Vec) -> Result { + fn _get_total_issue_amount(&self, amounts: &[u64]) -> Result { if amounts.is_empty() { return Err(Error::NoIssuanceAmounts); } @@ -4171,7 +4171,7 @@ impl Wallet { fn _fail_batch_transfer_if_no_endpoints( &self, batch_transfer: &DbBatchTransfer, - transfer_transport_endpoints_data: &Vec<(DbTransferTransportEndpoint, DbTransportEndpoint)>, + transfer_transport_endpoints_data: &[(DbTransferTransportEndpoint, DbTransportEndpoint)], ) -> Result { if transfer_transport_endpoints_data.is_empty() { self._fail_batch_transfer(batch_transfer)?; @@ -4855,7 +4855,7 @@ impl Wallet { &self, transfer: &DbBatchTransfer, db_data: &mut DbData, - filter: &Vec, + filter: &[RefreshFilter], ) -> Result, Error> { debug!(self.logger, "Refreshing transfer: {:?}", transfer); let incoming = transfer.incoming(&db_data.asset_transfers, &db_data.transfers)?;