Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions packages/rs-platform-wallet/src/test_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;

use async_trait::async_trait;
use dashcore::hashes::Hash;
use dashcore::secp256k1::{ecdsa, Message, PublicKey, Secp256k1};
use dashcore::BlockHash;
use dashcore::{Network, Transaction, Txid};
use key_wallet::account::account_type::StandardAccountType;
use key_wallet::signer::{Signer, SignerMethod};
use key_wallet::test_utils::TestWalletContext;
use key_wallet::transaction_checking::TransactionContext;
use key_wallet::transaction_checking::{BlockInfo, TransactionContext};
use key_wallet::{DerivationPath, Wallet};
use key_wallet_manager::WalletManager;
use tokio::sync::RwLock;
Expand Down Expand Up @@ -155,8 +157,19 @@ pub(crate) async fn funded_wallet_manager(
};

let funding_tx = Transaction::dummy(&receive_address, 0..1, &[10_000_000]);
// Chain-locked funding, not `Mempool`: asset-lock builders only
// select final (confirmed / InstantSend-locked) inputs since
// rust-dashcore#836, so a mempool-funded fixture leaves the
// asset-lock tests with no eligible UTXO.
let result = ctx
.check_transaction(&funding_tx, TransactionContext::Mempool)
.check_transaction(
&funding_tx,
TransactionContext::InChainLockedBlock(BlockInfo::new(
1,
BlockHash::all_zeros(),
1_700_000_000,
)),
)
.await;
assert!(
result.is_relevant,
Expand Down
Loading