Merge upstream staging (#755 multi-LMDB backend) into contracts

Reconcile the contract feature with #755, which replaced the WalletBackend
trait with a concrete WalletBackend<C,K> struct (libwallet/src/backend.rs) and
removed impls/src/backends/lmdb.rs.

- Port the contract module and contract API entry points from the trait form
  (T: WalletBackend<'a,C,K>) to the concrete struct.
- Re-home next_child_for and a parent_id+log_id get_tx_log_entry onto backend.rs.
- Re-apply the self-spend tx-log filters, cancel-loop, v5 payment-proof fields,
  and Context contract fields onto staging's rewritten files.
- Adapt to fallible iter()/tx_log_iter() and self-consuming batch commit.

Full suite green (53 binaries / 191 tests).
This commit is contained in:
jwinterm
2026-06-10 13:48:34 -04:00
50 changed files with 2937 additions and 2785 deletions
+6 -6
View File
@@ -104,7 +104,7 @@ pub fn create_wallet_proxy(
test_dir: &str,
) -> WalletProxy<
'_,
DefaultLCProvider<'_, LocalWalletClient, ExtKeychain>,
DefaultLCProvider<LocalWalletClient, ExtKeychain>,
LocalWalletClient,
ExtKeychain,
> {
@@ -123,7 +123,7 @@ pub fn create_local_wallet(
Box<
dyn WalletInst<
'static,
DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
DefaultLCProvider<LocalWalletClient, ExtKeychain>,
LocalWalletClient,
ExtKeychain,
>,
@@ -135,7 +135,7 @@ pub fn create_local_wallet(
let mut wallet = Box::new(DefaultWalletImpl::<LocalWalletClient>::new(client).unwrap())
as Box<
dyn WalletInst<
DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
DefaultLCProvider<LocalWalletClient, ExtKeychain>,
LocalWalletClient,
ExtKeychain,
>,
@@ -162,7 +162,7 @@ pub fn open_local_wallet(
Box<
dyn WalletInst<
'static,
DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
DefaultLCProvider<LocalWalletClient, ExtKeychain>,
LocalWalletClient,
ExtKeychain,
>,
@@ -174,7 +174,7 @@ pub fn open_local_wallet(
let mut wallet = Box::new(DefaultWalletImpl::<LocalWalletClient>::new(client).unwrap())
as Box<
dyn WalletInst<
DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
DefaultLCProvider<LocalWalletClient, ExtKeychain>,
LocalWalletClient,
ExtKeychain,
>,
@@ -200,7 +200,7 @@ pub fn create_wallets(
Box<
dyn WalletInst<
'static,
DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
DefaultLCProvider<LocalWalletClient, ExtKeychain>,
LocalWalletClient,
ExtKeychain,
>,
+3 -3
View File
@@ -53,7 +53,7 @@ pub fn create_wallets(
Box<
dyn WalletInst<
'static,
DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
DefaultLCProvider<LocalWalletClient, ExtKeychain>,
LocalWalletClient,
ExtKeychain,
>,
@@ -187,7 +187,7 @@ pub fn create_wallets(
// test_dir: &'static str,
// // wallet_proxy: WalletProxy<
// // 'static,
// // DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
// // DefaultLCProvider<LocalWalletClient, ExtKeychain>,
// // LocalWalletClient,
// // ExtKeychain,
// // >,
@@ -197,7 +197,7 @@ pub fn create_wallets(
// Box<
// dyn WalletInst<
// 'static,
// DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
// DefaultLCProvider<LocalWalletClient, ExtKeychain>,
// LocalWalletClient,
// ExtKeychain,
// >,
+1 -1
View File
@@ -41,7 +41,7 @@ type Wallet = Arc<
Box<
dyn WalletInst<
'static,
DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
DefaultLCProvider<LocalWalletClient, ExtKeychain>,
LocalWalletClient,
ExtKeychain,
>,
+1 -1
View File
@@ -45,7 +45,7 @@ fn test_wallet_tx_filtering(
Box<
dyn WalletInst<
'static,
DefaultLCProvider<'static, LocalWalletClient, ExtKeychain>,
DefaultLCProvider<LocalWalletClient, ExtKeychain>,
LocalWalletClient,
ExtKeychain,
>,