From 7984b8223e13c567f91b0a492da814ad205295fa Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Wed, 4 Oct 2023 19:19:41 -0400 Subject: [PATCH] Update monero-wallet-rpc to 0.18.3.1 to enable further testing of fee code 0.18.3.1 includes https://github.com/monero-project/monero/pull/8882, a necessary requirement. Doesn't bump any of the nodes due to 0.18.3.0 being recently released, without clear reason to update. --- .github/actions/monero-wallet-rpc/action.yml | 2 +- coins/monero/tests/wallet2_compatibility.rs | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/actions/monero-wallet-rpc/action.yml b/.github/actions/monero-wallet-rpc/action.yml index 4a5b48fd5..ac9e7a1bc 100644 --- a/.github/actions/monero-wallet-rpc/action.yml +++ b/.github/actions/monero-wallet-rpc/action.yml @@ -5,7 +5,7 @@ inputs: version: description: "Version to download and run" required: false - default: v0.18.2.0 + default: v0.18.3.1 runs: using: "composite" diff --git a/coins/monero/tests/wallet2_compatibility.rs b/coins/monero/tests/wallet2_compatibility.rs index 592a4d92c..5a5c0d2a0 100644 --- a/coins/monero/tests/wallet2_compatibility.rs +++ b/coins/monero/tests/wallet2_compatibility.rs @@ -11,7 +11,7 @@ use monero_serai::{ wallet::{ address::{Network, AddressSpec, SubaddressIndex, MoneroAddress}, extra::{MAX_TX_EXTRA_NONCE_SIZE, Extra}, - Scanner, + Scanner, FeePriority, }, }; @@ -88,13 +88,12 @@ async fn from_wallet_rpc_to_self(spec: AddressSpec) { .unwrap(); let tx_hash = hex::decode(tx.tx_hash).unwrap().try_into().unwrap(); - // TODO: Needs https://github.com/monero-project/monero/pull/8882 - // let fee_rate = daemon_rpc - // // Uses `FeePriority::Low` instead of `FeePriority::Lowest` because wallet RPC - // // adjusts `monero_rpc::TransferPriority::Default` up by 1 - // .get_fee(daemon_rpc.get_protocol().await.unwrap(), FeePriority::Low) - // .await - // .unwrap(); + let fee_rate = daemon_rpc + // Uses `FeePriority::Low` instead of `FeePriority::Lowest` because wallet RPC + // adjusts `monero_rpc::TransferPriority::Default` up by 1 + .get_fee(daemon_rpc.get_protocol().await.unwrap(), FeePriority::Low) + .await + .unwrap(); // unlock it runner::mine_until_unlocked(&daemon_rpc, &wallet_rpc_addr, tx_hash).await; @@ -109,8 +108,7 @@ async fn from_wallet_rpc_to_self(spec: AddressSpec) { let tx = daemon_rpc.get_transaction(tx_hash).await.unwrap(); let output = scanner.scan_transaction(&tx).not_locked().swap_remove(0); - // TODO: Needs https://github.com/monero-project/monero/pull/8882 - // runner::check_weight_and_fee(&tx, fee_rate); + runner::check_weight_and_fee(&tx, fee_rate); match spec { AddressSpec::Subaddress(index) => assert_eq!(output.metadata.subaddress, Some(index)),