Commit graph

1345 commits

Author SHA1 Message Date
Joost Jager
ff2577a0e7 wtxmgr: add ListLeases 2021-03-12 12:51:15 +01:00
Olaoluwa Osuntokun
39cbb7bdd9
Merge pull request #731 from wpaulino/wtxmgr-migration-delete-bucket-fix
wtxmgr: ignore ErrBucketNotFound error upon locked outputs bucket deletion
2021-02-17 15:06:27 -08:00
Wilmer Paulino
690a12fa8b
wtxmgr: ignore ErrBucketNotFound error upon locked outputs bucket deletion
This error would be seen when an old wallet that has yet to update is
performing the latest wtxmgr migration. It's possible for the locked
outputs bucket to not exist if outputs haven't been locked before, so we
should its deletion correctly.
2021-02-15 14:40:34 -08:00
Olaoluwa Osuntokun
415f37ff11
Merge pull request #726 from wpaulino/wallet-db-go-mod-updates
wtxmgr+btcwallet: update to latest walletdb version
2020-12-07 15:33:35 -08:00
Olaoluwa Osuntokun
12a2c88b26
btcwallet: update to walletdb v1.3.4 2020-12-01 19:13:04 -08:00
Olaoluwa Osuntokun
526c9a6103
wtxmgr: update to walletdb v1.3.4 2020-12-01 19:12:58 -08:00
Olaoluwa Osuntokun
664f77ded1
Merge pull request #714 from yyforyongyu/add-bdb-timeout
bdb: Add timeout options for bbolt
2020-11-18 18:28:10 -08:00
Olaoluwa Osuntokun
5ee84d89ca
Merge pull request #724 from guggero/namespace-fix
wallet: fix incorrect namespace name
2020-11-18 11:51:56 -08:00
Oliver Gugger
be57c71c9c
wallet: fix incorrect namespace name
This commit fixes a panic introduced with #718 that was caused by
looking up addresses in the wrong namespace.
2020-11-18 19:42:12 +01:00
yyforyongyu
e34b43b938
multi: unify WalletDBName and DefaultDBTimeout in loader 2020-11-07 22:01:51 +08:00
yyforyongyu
1cacaac9ea
btcwallet: use db timeout param 2020-11-07 22:01:51 +08:00
yyforyongyu
86bc349c6e
wallet: use db timeout in loader 2020-11-07 22:01:35 +08:00
yyforyongyu
368301866e
wtxmgr: update tests to use db timeout param 2020-11-06 23:58:09 +08:00
yyforyongyu
f6ea9d4d7b
waddrmgr: update tests to use db timeout param 2020-11-06 23:58:09 +08:00
yyforyongyu
08308c81ed
walletdb: update tests to use db timeout param 2020-11-06 23:57:05 +08:00
yyforyongyu
28c804ccc8
bdb: add timeout option in bbolt 2020-11-06 23:48:34 +08:00
Olaoluwa Osuntokun
9bd6d26f83
Merge pull request #718 from wpaulino/relevant-addr-spend
wallet: only request spend notification for our outputs
2020-11-05 16:52:34 -08:00
Olaoluwa Osuntokun
a6f3888450
Merge pull request #723 from guggero/drop-history
Export dropwtxmgr functionality as utility function
2020-11-03 18:21:05 -08:00
Oliver Gugger
fa26b1f022
cmd/dropwtxmgr: use DropTransactionHistory from wallet package
Now that the function to remove the wallet's transaction history is
exported as a utility function, we can use that in the dropwtxmgr
command.
2020-10-24 16:39:41 +02:00
Oliver Gugger
38fbfe36c5
wallet: add DropTransactionHistory function
We create a more generic copy of the dropwtxmgr command's functionality
and export it as the DropTransactionHistory function.
It removes all transaction history from the given wallet to force a
full chain rescan. Optionally the user-defined transaction labels can be
preserved.
2020-10-24 16:39:41 +02:00
Olaoluwa Osuntokun
a7f551a630
Merge pull request #722 from guggero/psbt-script-sig-fix
psbt: don't add scriptSig to txIn
2020-10-05 11:48:31 -07:00
Oliver Gugger
3252f9fc11
psbt: don't add scriptSig to txIn
Because of an incorrect test, it wasn't discovered that the scriptSig
field was being set on the unsigned TX inputs for a nested SegWit input.
This commit fixes the bug and also refactors the test so it would have
caught this specific bug.
2020-10-05 11:33:51 +02:00
Olaoluwa Osuntokun
e6d01202cb
Merge pull request #721 from guggero/psbt-change-fix
wallet: use constant input source for change calculation
2020-10-01 17:39:44 -07:00
Oliver Gugger
98e779a102
wallet: use constant input source for change calculation
To fix a bug where specifying multiple UTXOs that are by themselves
large enough to satisfy the output amount would lead to the rest of them
being added to fees, we need to provide the transaction author with a
constant list of UTXOs. If we didn't, the author would only consider one
input and calculate the change based on that alone. But since we'd add
all inputs to the PSBT, the rest of the amounts would go to fees.
2020-10-01 15:19:13 +02:00
Oliver Gugger
34bfc5efb9
wallet: return change index from FundPsbt
To make it easy to show the user what change output was created (if any)
during the funding process, we return its index (or -1 if no change
output was created).
2020-10-01 14:57:05 +02:00
Olaoluwa Osuntokun
9d8d984207
Merge pull request #713 from yyforyongyu/fix-walletdb-param
btcwallet: add missing noFreelistSync in spv mode and temp wallet
2020-09-15 17:13:06 -07:00
Olaoluwa Osuntokun
2c5947a452
Merge pull request #711 from guggero/psbt-signing
wallet: add new PSBT funding and finalizing methods
2020-09-03 19:27:54 -07:00
Oliver Gugger
c4c2a9052e
wallet: add PSBT funding+finalizing methods 2020-08-27 21:15:00 +02:00
Oliver Gugger
78d8c81e0a
wallet: add ComputeInputScript 2020-08-27 21:14:59 +02:00
Oliver Gugger
1f2ed87055
wallet: add FetchInputInfo 2020-08-27 21:14:57 +02:00
Oliver Gugger
4aa36af74c
wallet: extract addrMgrWithChangeSource 2020-08-27 21:14:56 +02:00
Oliver Gugger
314cd98152
wallet: extract addUtxo in create TX test 2020-08-27 21:14:55 +02:00
Oliver Gugger
66edcae704
mod: update psbt library version 2020-08-27 21:14:53 +02:00
Wilmer Paulino
682bd8d33e
wallet: only request spend notification for our outputs
We would previously request spend notifications for all transaction
outputs, leading to irrelevant transactions being found in the wallet's
transaction store.
2020-08-25 11:35:49 -07:00
Olaoluwa Osuntokun
1d31f4ea6f
Merge pull request #717 from cfromknecht/fix-dust-calc
wallet/txauthor: fix bug in dust calculation
2020-08-13 17:14:39 -07:00
Olaoluwa Osuntokun
cde4b5dca4
wallet/txauthor: rename relayFeePerKb to feeRatePerKb
The new name more accurately reflects the usage of the value. This is
the target fee rate that the constructed transaction should aim to meet.
2020-08-13 16:57:32 -07:00
Olaoluwa Osuntokun
fbb3bc184d
wallet/txauthor: fix bug in dust calculation
In this commit, we fix a 3 year old bug in dust calculation. Before this
commit, the target fee of the transaction to be crafted would be used to
determine dust. If the target fee is very high, then this would cause
over all higher fees, as we'd base that dust computation off of that fee
rate, rather than the min relay fee.

To fix this, we always use the min relay fee at all times when computing
dust.
2020-08-13 16:43:00 -07:00
Olaoluwa Osuntokun
eb8bb02086
Merge pull request #715 from guggero/locked-outpoints-mutex
wallet: add mutex for locked outpoints
2020-08-13 12:08:07 -07:00
Oliver Gugger
f8cc233758
wallet: add mutex for locked outpoints 2020-08-13 20:33:31 +02:00
yyforyongyu
8e2b9db6f2
btcwallet: add missing noFreelistSync option in wallet.Create 2020-08-12 03:13:18 +08:00
Olaoluwa Osuntokun
ca24ed58cf
Merge pull request #710 from cfromknecht/update-root-module-walletdb
build: update to latest walletdb and wtxmgr versions
2020-06-15 17:46:19 -07:00
Olaoluwa Osuntokun
1edb2b51c3
build: update to latest walletdb and wtxmgr versions 2020-06-15 16:20:30 -07:00
Olaoluwa Osuntokun
d68942b7f3
Merge pull request #709 from cfromknecht/bbolt-import-path
walletdb: eliminate old bbolt ref by using uniform import path
2020-06-15 16:16:57 -07:00
Olaoluwa Osuntokun
79727f4e6f
walletdb: eliminate old bbolt ref by using uniform import path 2020-06-15 14:24:49 -07:00
Olaoluwa Osuntokun
bf76ca145a
Merge pull request #708 from cfromknecht/fin-wallet-db-update
wtxmgr: update to walletdb v1.3.2
2020-06-15 14:16:54 -07:00
Olaoluwa Osuntokun
186417b824
wtxmgr: update to walletdb v1.3.2 2020-06-15 12:08:53 -07:00
Olaoluwa Osuntokun
3502b46b2d
Merge pull request #707 from cfromknecht/wallet-db-update
build: update to walletdb v1.3.2
2020-06-15 11:45:02 -07:00
Olaoluwa Osuntokun
6dd0b0d376
build: update to walletdb v1.3.2
In this commit, we update `walletdb` to the latest version which makes
it compatible with Go 1.14.
2020-06-15 11:29:28 -07:00
Olaoluwa Osuntokun
ea0fb843a0
Merge pull request #706 from cfromknecht/bbolt-bug-fix
walletdb: update to latest bbolt version w/ Go 1.14 bug fix
2020-06-15 11:27:18 -07:00
Olaoluwa Osuntokun
727ca139b8
walletdb: update to latest bbolt version w/ Go 1.14 bug fix 2020-06-15 11:17:46 -07:00