forked from zcash/librustzcash
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add implementations of InputSource for MemoryWalletDB and Conditional…
…lySelectable for AccountId
- Loading branch information
1 parent
ce936d3
commit 144bfca
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use zcash_client_backend::data_api::InputSource; | ||
|
||
use crate::mem_wallet::{AccountId, MemoryWalletDb}; | ||
|
||
impl InputSource for MemoryWalletDb { | ||
type Error = crate::error::Error; | ||
type AccountId = crate::mem_wallet::AccountId; | ||
type NoteRef = crate::mem_wallet::NoteId; | ||
|
||
fn get_spendable_note( | ||
&self, | ||
txid: &zcash_primitives::transaction::TxId, | ||
protocol: zcash_protocol::ShieldedProtocol, | ||
index: u32, | ||
) -> Result< | ||
Option< | ||
zcash_client_backend::wallet::ReceivedNote< | ||
Self::NoteRef, | ||
zcash_client_backend::wallet::Note, | ||
>, | ||
>, | ||
Self::Error, | ||
> { | ||
todo!() | ||
} | ||
|
||
fn select_spendable_notes( | ||
&self, | ||
account: Self::AccountId, | ||
target_value: zcash_protocol::value::Zatoshis, | ||
sources: &[zcash_protocol::ShieldedProtocol], | ||
anchor_height: zcash_protocol::consensus::BlockHeight, | ||
exclude: &[Self::NoteRef], | ||
) -> Result<zcash_client_backend::data_api::SpendableNotes<Self::NoteRef>, Self::Error> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters