This pull request primarily focuses on improving the sn_client module in the Rust codebase. The changes include refactoring and renaming methods in the Client implementation, adding new methods to handle and resend unconfirmed transactions, and improving log messages for better debugging and user experience. Additionally, a new unit test has been added in the sn_transfers module to test the payment selection functionality.
Changes in sn_client module:
sn_client/src/api.rs:
The trace! log message in the Client implementation has been updated to include a pretty printed version of the record key for better debugging.
The RetryStrategy for GetRecordCfg in the Client implementation has been removed to avoid unnecessary retries.
The crawl_spend_from_network method has been renamed to peek_a_spend and its get_quorum value has been changed to Quorum::One to fetch a single copy of the spend.
The is_genesis_spend_present method now uses the peek_a_spend method to check for the presence of the Genesis spend.
sn_client/src/uploader/upload.rs:
The InnerUploader implementation now includes a call to resend_pending_transaction_blocking_loop method to handle any pending transactions.
sn_client/src/wallet.rs:
A new method resend_pending_transaction_blocking_loop has been added to the WalletClient implementation. This method continuously resends unconfirmed transactions until they are all uploaded or the user manually terminates the process. It also logs and prints helpful messages for the user to understand the state of unconfirmed transactions.
Changes in sn_transfers module:
sn_transfers/src/wallet/api.rs:
A new unit test payment_selective has been added to test the functionality of selecting a payment transaction.
This pull request primarily focuses on improving the
sn_client
module in the Rust codebase. The changes include refactoring and renaming methods in theClient
implementation, adding new methods to handle and resend unconfirmed transactions, and improving log messages for better debugging and user experience. Additionally, a new unit test has been added in thesn_transfers
module to test the payment selection functionality.Changes in
sn_client
module:sn_client/src/api.rs
:trace!
log message in theClient
implementation has been updated to include a pretty printed version of the record key for better debugging.RetryStrategy
forGetRecordCfg
in theClient
implementation has been removed to avoid unnecessary retries.crawl_spend_from_network
method has been renamed topeek_a_spend
and itsget_quorum
value has been changed toQuorum::One
to fetch a single copy of the spend.is_genesis_spend_present
method now uses thepeek_a_spend
method to check for the presence of the Genesis spend.sn_client/src/uploader/upload.rs
:InnerUploader
implementation now includes a call toresend_pending_transaction_blocking_loop
method to handle any pending transactions.sn_client/src/wallet.rs
:resend_pending_transaction_blocking_loop
has been added to theWalletClient
implementation. This method continuously resends unconfirmed transactions until they are all uploaded or the user manually terminates the process. It also logs and prints helpful messages for the user to understand the state of unconfirmed transactions.Changes in
sn_transfers
module:sn_transfers/src/wallet/api.rs
:payment_selective
has been added to test the functionality of selecting a payment transaction.