Merge pull request #1421 from nuttycom/zero_conf_shielding

Allow shielding with one confirmation for incoming transparent funds.
This commit is contained in:
Lukas Korba 2024-05-16 14:50:42 +02:00 committed by GitHub
commit 5570fc6b9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import libzcashlc
struct ZcashRustBackend: ZcashRustBackendWelding { struct ZcashRustBackend: ZcashRustBackendWelding {
let minimumConfirmations: UInt32 = 10 let minimumConfirmations: UInt32 = 10
let minimumShieldingConfirmations: UInt32 = 1
let useZIP317Fees = true let useZIP317Fees = true
let dbData: (String, UInt) let dbData: (String, UInt)
@ -306,7 +307,7 @@ struct ZcashRustBackend: ZcashRustBackendWelding {
dbData.1, dbData.1,
networkType.networkId, networkType.networkId,
account, account,
minimumConfirmations minimumShieldingConfirmations
) )
guard balance >= 0 else { guard balance >= 0 else {
@ -747,7 +748,7 @@ struct ZcashRustBackend: ZcashRustBackendWelding {
UInt64(shieldingThreshold.amount), UInt64(shieldingThreshold.amount),
transparentReceiver.map { [CChar]($0.utf8CString) }, transparentReceiver.map { [CChar]($0.utf8CString) },
networkType.networkId, networkType.networkId,
minimumConfirmations, minimumShieldingConfirmations,
useZIP317Fees useZIP317Fees
) )