refactor(chain)!: update KeychainTxOutIndex methods to use owned ScriptBuf

This commit is contained in:
Steve Myers
2024-07-09 16:51:12 -05:00
parent 7c07b9de02
commit 79262185d5
9 changed files with 55 additions and 53 deletions

View File

@@ -4023,7 +4023,7 @@ fn test_tx_cancellation() {
.unsigned_tx
.output
.iter()
.find_map(|txout| wallet.derivation_of_spk(&txout.script_pubkey))
.find_map(|txout| wallet.derivation_of_spk(txout.script_pubkey.clone()))
.unwrap();
assert_eq!(change_derivation_1, (KeychainKind::Internal, 0));
@@ -4033,7 +4033,7 @@ fn test_tx_cancellation() {
.unsigned_tx
.output
.iter()
.find_map(|txout| wallet.derivation_of_spk(&txout.script_pubkey))
.find_map(|txout| wallet.derivation_of_spk(txout.script_pubkey.clone()))
.unwrap();
assert_eq!(change_derivation_2, (KeychainKind::Internal, 1));
@@ -4044,7 +4044,7 @@ fn test_tx_cancellation() {
.unsigned_tx
.output
.iter()
.find_map(|txout| wallet.derivation_of_spk(&txout.script_pubkey))
.find_map(|txout| wallet.derivation_of_spk(txout.script_pubkey.clone()))
.unwrap();
assert_eq!(change_derivation_3, (KeychainKind::Internal, 0));
@@ -4053,7 +4053,7 @@ fn test_tx_cancellation() {
.unsigned_tx
.output
.iter()
.find_map(|txout| wallet.derivation_of_spk(&txout.script_pubkey))
.find_map(|txout| wallet.derivation_of_spk(txout.script_pubkey.clone()))
.unwrap();
assert_eq!(change_derivation_3, (KeychainKind::Internal, 2));
@@ -4064,7 +4064,7 @@ fn test_tx_cancellation() {
.unsigned_tx
.output
.iter()
.find_map(|txout| wallet.derivation_of_spk(&txout.script_pubkey))
.find_map(|txout| wallet.derivation_of_spk(txout.script_pubkey.clone()))
.unwrap();
assert_eq!(change_derivation_4, (KeychainKind::Internal, 2));
}