Browse Source

Merge pull request #38 from DenioD/dev

Set confirmations to 2
checkpoints
Denio 5 years ago
committed by GitHub
parent
commit
58839270ac
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 2
      lib/src/lib.rs
  3. 4
      lib/src/lightwallet.rs

2
README.md

@ -21,7 +21,7 @@ Run `silentdragonlite-cli help` to see a list of all commands.
### Note Management
silentdragonlite does automatic note and utxo management, which means it doesn't allow you to manually select which address to send outgoing transactions from. It follows these principles:
* Defaults to sending shielded transactions, even if you're sending to a transparent address
* Sapling funds need at least 5 confirmations before they can be spent
* Sapling funds need at least 2 confirmations before they can be spent
* Can select funds from multiple shielded addresses in the same transaction
* Will automatically shield your transparent funds at the first opportunity
* When sending an outgoing transaction to a shielded address, silentdragonlite can decide to use the transaction to additionally shield your transparent funds (i.e., send your transparent funds to your own shielded address in the same transaction)

2
lib/src/lib.rs

@ -11,7 +11,7 @@ pub mod commands;
#[folder = "zcash-params/"]
pub struct SaplingParams;
pub const ANCHOR_OFFSET: u32 = 4;
pub const ANCHOR_OFFSET: u32 = 2;
pub mod grpc_client {

4
lib/src/lightwallet.rs

@ -802,7 +802,7 @@ impl LightWallet {
pub fn verified_zbalance(&self, addr: Option<String>) -> u64 {
let anchor_height = match self.get_target_height_and_anchor_offset() {
Some((height, anchor_offset)) => height - anchor_offset as u32 - 1,
Some((height, anchor_offset)) => height - anchor_offset as u32 ,
None => return 0,
};
@ -1471,7 +1471,7 @@ impl LightWallet {
if selected_value < u64::from(target_value) {
let e = format!(
"Insufficient verified funds (have {}, need {:?}). NOTE: funds need {} confirmations before they can be spent.",
selected_value, target_value, self.config.anchor_offset - 2
selected_value, target_value, self.config.anchor_offset
);
error!("{}", e);
return Err(e);

Loading…
Cancel
Save