Commit graph

1451 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
5f2c12c1cc
Merge pull request #766 from LN-Zap/fix/fundpsbt-minconfs
wallet: add minimum confirmation parameter to FundPsbt
2021-10-07 16:59:40 -07:00
Olaoluwa Osuntokun
d706594fc9
Merge pull request #767 from Roasbeef/tx-module-updates
build: update to latest versions of txauthor, txrules, and txsize
2021-09-23 14:50:16 -07:00
Olaoluwa Osuntokun
acd8435ef6
build: update to latest versions of txauthor, txrules, and txsize 2021-09-23 14:38:30 -07:00
Olaoluwa Osuntokun
39e7ed142d
Merge pull request #765 from Crypt-iQ/dust_changes
wallet/txauthor+txrules: update go mod to include btcd changes
2021-09-23 14:23:51 -07:00
Bjarne Magnussen
429ee21dfb
wallet: add minimum confirmation parameter to FundPsbt
Setting the minimum confirmation is used for the coin selection when no inputs are provided.
2021-09-23 13:40:06 +02:00
eugene
da541d446c
wallet/txauthor+txrules: update go mod to include btcd changes 2021-09-22 13:19:33 -04:00
Olaoluwa Osuntokun
d0868cb9dd
Merge pull request #764 from guggero/import-key-scope
wallet: watch-only account import improvements
2021-09-16 14:30:31 -07:00
Oliver Gugger
21eec96266
wallet: add ImportAccountWithScope
When creating a fully watch-only wallet, we know exactly what accounts
we are importing and what scope should be used for them.
2021-09-08 13:52:08 +02:00
Oliver Gugger
73987178ac
wallet: don't hold unlock in watch-only mode
If we're running in watch-only mode, there is no unlock possible.
Therefore, we also don't need to prevent any unlocks from happening when
doing coin selection in that mode.
2021-09-08 13:52:06 +02:00
Olaoluwa Osuntokun
0230b97a7b
Merge pull request #763 from Roasbeef/min-go-version
build: pin mid Go version to 1.16, run new go mod tidy
2021-09-01 16:06:41 -07:00
Olaoluwa Osuntokun
b1697c8ff2
build: pin mid Go version to 1.16, run new go mod tidy
By running `go mod tidy -go=1.16`, we also automatically convert the
"legacy" build tag syntax to use the new Go 1.17 compatible variant.
2021-09-01 15:37:42 -07:00
Olaoluwa Osuntokun
f1491a24ef
Merge pull request #761 from guggero/github-ci
CI: switch from Travis to GitHub actions
2021-09-01 15:34:51 -07:00
Oliver Gugger
50436a4822
Travis+GitHub: switch CI from Travis to GitHub actions 2021-08-26 10:15:28 +02:00
Oliver Gugger
a63c69d618
waddrmgr: fix test compilation 2021-08-26 10:09:08 +02:00
Olaoluwa Osuntokun
4ef582f76b
Merge pull request #759 from Roasbeef/priv-key-caching
waddrmgr: add new DeriveFromKeyPathCache method for faster key retrieval
2021-08-25 17:44:15 -07:00
Olaoluwa Osuntokun
690ab16488
waddrmgr: add new DeriveFromKeyPathCache method for faster key retrieval
In this commit, we add a new method `DeriveFromKeyPathCache` that gives
callers a way to more quickly obtain a private key they know they'll be
using frequently. This method lets a caller avoid the write database
transaction as well as the EC operations to derive the key itself (BIP
32).
2021-08-25 17:14:44 -07:00
Olaoluwa Osuntokun
9b5a201c34
Merge pull request #720 from guggero/xprv-wallet-init
wallet: allow wallet to be created from extended master root key directly
2021-08-22 15:29:49 -07:00
Olaoluwa Osuntokun
6f4c9ce731
Merge pull request #758 from Crypt-iQ/btcd_isdust_08032021
mod+wallet: use btcd/mempool IsDust for calculating mempool dust
2021-08-10 16:44:39 -07:00
eugene
3cb2c46b02
mod+wallet: use btcd/mempool IsDust for calculating mempool dust
We can now get rid of our incorrect dust calculation which did not
give exact values for segwit outputs as it was based on spending a
P2PKH output instead.
2021-08-03 16:42:20 -04:00
Olaoluwa Osuntokun
eebed51155
Merge pull request #757 from guggero/wallet-db-tx
wallet+walletdb: remove manual DB transactions, use custom `View/Update` implementation when provided
2021-08-02 17:40:36 -07:00
Oliver Gugger
18c4c36aae
wallet+waddrmgr: refactor to use extended key instead of seed
To allow a wallet to be created directly from an extended master root
key (xprv), we move the derivation from seed to extended key to the
loader instead of the address manager itself.
2021-07-30 10:44:45 +02:00
Oliver Gugger
a27bab6eb9
walletdb: add View and Update to DB interface
We want to make sure that every database backend has their own
implementation of the View() and Update() methods to make sure any
custom retry/commit/rollback strategies are used even when invoked
through the package-provided View() and Update() functions.
2021-07-29 16:53:09 +02:00
Oliver Gugger
f07fdfb6b9
wallet: refactor txToOutputs to use walletdb.Update
To make sure we don't create any manual DB transactions, we refactor the
txToOutputs method to use walletdb.Update and the new
walletdb.ErrDryRunRollBack error for making sure a rollback is issued.
2021-07-23 12:49:38 +02:00
Oliver Gugger
178152bcd0
wallet: refactor ImportAccountDryRun to use walletdb.Update
To make sure we don't create any manual DB transactions, we refactor the
ImportAccountDryRun method to use walletdb.Update and the new
walletdb.ErrDryRunRollBack error for making sure a rollback is issued.
2021-07-23 12:49:37 +02:00
Oliver Gugger
9c839caddf
walletdb: add new ErrDryRunRollBack error
We need a way to signal that a DB transaction should be rolled back
because its changes were a dry-run only. We add a new specific error for
that case so the automatic rollback on error in the walletdb.View and
walletdb.Update comes to play. But we can still return the result of a
dry-run where we need to by inspecting for this specific error.
2021-07-23 12:49:37 +02:00
Oliver Gugger
33a0a065f9
wallet: use walletdb.Update in FundPsbt
To make sure we don't create any manual DB transactions, we refactor
FundPsbt to use walletdb.Update instead.
2021-07-23 12:49:37 +02:00
Oliver Gugger
60a04006d6
wtxmgr: remove unused functions 2021-07-23 12:49:36 +02:00
Olaoluwa Osuntokun
5e96a26171
Merge pull request #752 from guggero/go-mod-fix
mod: fix submodule versions
2021-07-13 16:08:50 -07:00
Olaoluwa Osuntokun
5649a66307
Merge pull request #751 from LN-Zap/fix-2398
Prevent duplicate notifications for (un)confirmed transactions
2021-07-13 16:05:48 -07:00
Bjarne Magnussen
419381b749
wallet: call InsertTxCheckIfExists to add a relevant tx
Let the method `addRelevantTx` use `InsertTxCheckIfExists` to insert a relevant 
transaction. If the transaction has already been recorded, the method call 
`addRelevantTx` will return early and not proceed with duplicating work of 
checking every output and duplicating the tx notification to the notification 
server.
2021-07-13 09:24:53 +02:00
Olaoluwa Osuntokun
8e18674563
Merge pull request #753 from joostjager/zero-output-psbt
wallet: allow zero output psbt funding
2021-07-12 17:00:24 -07:00
Olaoluwa Osuntokun
aaf03fee73
Merge pull request #754 from joostjager/filter-leases
wtxmgr: filter out expired leases
2021-07-06 16:48:07 -07:00
Joost Jager
5b1e64abde
wtxmgr: filter out expired leases
Expired leases are kept in the database until the next cleaning round.
This commit makes sure that expired leases look like they do not exist
to outside callers.
2021-07-05 08:57:33 +02:00
Joost Jager
9f1d73d6d3
wallet: allow zero output psbt funding
To support the cpfp fee bump use case where no external outputs are
required.
2021-06-28 12:06:36 +02:00
Oliver Gugger
6a822c2bf2
mod: fix submodule versions
The submodules wallet/txauthor and wallet/txsizes were updated without a
new tag being created. This works fine when compiling btcwallet from
source but fails when using "go get" as that ignores the replace
directives.
2021-05-31 09:18:27 +02:00
Bjarne Magnussen
0066eee3ea
wtxmgr: add InsertTxCheckIfExsists to check if a tx already recorded
Adds new error `ErrDuplicateTx` and method `InserTxCheckIfExists` to check if a transaction to be inserted was already recorded.
2021-05-28 14:29:48 +02:00
Olaoluwa Osuntokun
6ab9b61557
Merge pull request #740 from bottlepay/random-coins
wallet: add random coin selection
2021-05-19 15:53:59 -07:00
Joost Jager
0efc499b8c build: extend unit-race timeout 2021-05-19 09:11:31 +02:00
Joost Jager
4d2665ee3a
wallet: add random coin selection 2021-05-19 08:34:55 +02:00
Olaoluwa Osuntokun
c31e149775
Merge pull request #749 from guggero/wasm
internal/prompt: allow compilation in js/wasm environment
2021-05-18 16:50:50 -07:00
Oliver Gugger
825ff779a1
make: increase test timeout to 20 minutes 2021-05-18 13:26:45 +02:00
Oliver Gugger
b5fd915162
internal/prompt: allow compilation in js/wasm environment
The wallet loader has a dependency to the internal/prompt package for
prompting the user for certain inputs (e.g. wallet password or new
seed).
This makes it impossible for projects that use the wallet as a
dependency and always provide those inputs as parameters to compile for
JavaScript/WebAssembly targets because the prompt code uses some
terminal functionality that is not available in JS syscalls.
By providing a JS specific implementation that just returns an error we
can compile the dependent projects.
Adding acutal support for prompting the user in the browser is currently
not planned as that can easily be circumvented by providing all inputs
as parameters.
2021-05-14 12:41:35 +02:00
Olaoluwa Osuntokun
36f4c930d7
Merge pull request #748 from lightninglabs-deploy/go-mod-update-2021-5
build: update pinned modules to latest versions
2021-05-13 17:12:18 -07:00
Olaoluwa Osuntokun
47e0edadcd
build: update pinned modules to latest versions 2021-05-13 16:36:34 -07:00
Olaoluwa Osuntokun
3a2f12e3a9
Merge pull request #745 from bhandras/walletdb_foreach
walletdb: add ForEachBucket to the ReadTx with bbolt implementation
2021-05-12 21:38:50 -07:00
Olaoluwa Osuntokun
82fa030bda
Merge pull request #746 from wpaulino/import-dry-run
wallet: add dry run implementation of ImportAccount
2021-05-06 18:27:17 -07:00
Wilmer Paulino
5053325946
wallet: add dry run implementation of ImportAccount
This method returns the first N external and internal addresses, which
can be presented to users to confirm whether the account has been
imported correctly.
2021-05-06 16:32:58 -07:00
Olaoluwa Osuntokun
a7a9234968
Merge pull request #734 from bhandras/external_db
wallet: allow using external wallet db
2021-04-29 15:48:04 -07:00
Andras Banki-Horvath
13966db554
waddrmgr: test flake fix 2021-04-29 11:31:04 +02:00
Andras Banki-Horvath
98ba16748e
loader: add txn callback when wallet is created 2021-04-28 17:44:11 +02:00