Olaoluwa Osuntokun
255063b1b2
build: update glide to point to latest btcd+btcutil
2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
fb511876c5
wallet: update to use new recovery manager API
2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
49e46f3232
wallet: update rescan to take addrs along with their outpoints
2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
d6ee9fd0e4
wallet: update HD recovery logic to map outpoints to addresses
2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
b29e917a24
chain: update Rescan method for bitcoind to adhere to new interface
2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
bc47007c50
chain: update block filterer to map outpoints to addrs
2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
714ac383cb
chain: update watched/found outpoints to map to addrs
2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
2d600fe6ab
chain: create new Rescan wrapper for btcd to comply w/ future BIP 158 usage
2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
b24714270a
chain: update neutrino interface impl to use new InputWithScript
2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
87d91316cd
chain: update interface to map outpoints to their addresses
...
In this commit, we update the Rescan call in the interface to map the
outpoint to the address that the outpoint holds. We do this as BIP 158
has recently been updated to match on the prev output script rather than
the outpoint itself. Additionally, in the near future, btcd (then
bitcoind), will switch over to using the BIP 158 filters internally,
which will also match on the output scripts.
2018-07-16 19:47:17 -07:00
Wilmer Paulino
aa826c64cf
wtxmgr: store multiple spending tx hashes for outpoints
...
In this commit, we modify the way we store spending transaction hashes
for unconfirmed spends. Now, rather than only keeping track of one
possible unconfirmed spend, we track multiple in order to ensure we
properly handle transaction replacements, like in the case of RBF,
double spends, etc. With this in, the double spent tests recently added
should now pass.
2018-07-16 13:39:53 -07:00
Wilmer Paulino
ff646086b7
wtxmgr: split moveMinedTx into deleteUnminedTx and updateMinedBalance
...
In this commit, we slightly refactor the existing moveMinedTx method
and split it into two: deleteUnminedTx and updateMinedBalance. We do
this as moveMinedTx is no longer moving the transaction from the unmined
bucket to the mined, instead it just removes it from the unmined bucket.
2018-07-16 13:39:52 -07:00
Wilmer Paulino
6340c65d14
wtxmgr: refactor common code within insertMinedTx
...
In this commit, we remove most of the common code between insertMinedTx
and moveMinedTx. Now, all the common logic is handled within
insertMinedTx, and moveMinedTx only contains its unique logic.
2018-07-16 13:39:50 -07:00
Wilmer Paulino
15cec7d90d
wtxmgr: add transaction replacement and double spend tests
...
In this commit, we add a set of double spend tests to ensure that we can
properly detect and handle them. At this point, we do not do this, but a
follow up commit will address this.
2018-07-16 13:39:49 -07:00
Olaoluwa Osuntokun
64b5b448f5
chain: update neutrino API usage
2018-07-13 16:53:17 -07:00
Olaoluwa Osuntokun
43244ccc61
build: update glide to point to latest neutrino
2018-07-13 16:53:17 -07:00
Vadym Popov
40ba75dd9d
wallet: fix lost balance of unmined transaction for neutrino
2018-07-13 12:41:02 +03:00
Conner Fromknecht
78ea2cdc9c
wallet/chainntfns: ensure safe shutdown during sync
2018-07-12 18:00:07 -07:00
Conner Fromknecht
74a7124666
glide: update to latest btcutil
2018-05-23 21:12:21 -07:00
Conner Fromknecht
bae9c4911e
cmd/sweepaccount/sweepaccount: remove binary
2018-05-23 21:12:21 -07:00
Olaoluwa Osuntokun
56fac5572c
goclean: increase history size for race cond detector
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
2b856b5200
multi: fix linter errors
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
e9b145c524
multi: run goimports
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
b0b64d3bbd
multi: update due to latest API changes
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
e22bcf88df
wtxmgr: use proper updated API for msgtx
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
8d10315c0c
cmd/sweepaccount: fix build errors
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
04036f1c91
build: build against go 1.9.4 and 1.10
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
4245295ad5
build: update glide files to point to latest btcd+btcutil
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
ccb49eaf2a
waddrmgr: fix botched merge
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
7770cac383
multi: switch import paths back to upstream
2018-05-23 19:38:56 -07:00
Conner Fromknecht
4c6b9053b8
wallet/wallet: adds recovery for default scopes
2018-05-23 19:38:56 -07:00
Conner Fromknecht
71ce1d5474
wallet/recovery_test: adds test for 1-in-1-out spend
2018-05-23 19:38:56 -07:00
Conner Fromknecht
e4124d8e8b
wallet/recovery: adds wallet recovery manager
2018-05-23 19:38:56 -07:00
Conner Fromknecht
d26cf062fe
wallet/loader: feed birthday+recovery window to wallet
2018-05-23 19:38:56 -07:00
Conner Fromknecht
d652e7dd04
waddrmgr/manager_test: use new wallet Create api with birthday
2018-05-23 19:38:56 -07:00
Conner Fromknecht
0968cfdabc
waddrmgr/common_test: use new wallet Create api with birthday
2018-05-23 19:38:56 -07:00
Conner Fromknecht
57b37d38f6
waddrmgr/scoped_manager: adds extend in/ex ternal addrs
2018-05-23 19:38:56 -07:00
Conner Fromknecht
5e07326784
waddrmgr/manager: feed birthday to waddrmgr
2018-05-23 19:38:56 -07:00
Conner Fromknecht
65a276bd7b
waddrmgr/db: internalBranch -> InternalBranch
2018-05-23 19:38:56 -07:00
Conner Fromknecht
549eca51de
chain/block_filterer_test: adds test for 1-in-1-out txns
2018-05-23 19:38:56 -07:00
Conner Fromknecht
9437c3784a
chain/rpc: impl FilterBlocks using gc filter rescan
2018-05-23 19:38:56 -07:00
Conner Fromknecht
9b0831cd65
chain/neutrino: impl FilterBlocks via filters + rescan
2018-05-23 19:38:56 -07:00
Conner Fromknecht
5278cd3de8
chain/interface: add FilterBlocks query
2018-05-23 19:38:56 -07:00
Conner Fromknecht
2ff809fd78
chain/block_filterer: adds BlockFilterer for scanning during recovery
2018-05-23 19:38:56 -07:00
Conner Fromknecht
93d73bf06c
chain/bitcoind: impl FilterBlocks via rescan
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
620be5821f
wallet: ensure PublishTransaction handles nil error case
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
fbfca5f4ae
wallet: in PublishTransaction if tx is rejected, remove it from the txstore
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
921dae5d5e
wallet: catch remaining bitcoind errors, and generic RPC errors resendUnminedTxs
...
In this commit, ensure that upon restart, if any of the full-node based
backends we support reject the transaction, then we'll properly remove
the now invalid transaction from the tx store. Before this commit, we
could miss a few errors from bitcoind. To remedy this, we explicitly
catch those errors, but then also attempt to precisely catch the set of
generic json RPC errors that can be returned.
2018-05-23 19:38:56 -07:00
Wilmer Paulino
8b2aebe89e
wallet: add call to modify both public and private passphrases atomically
2018-05-23 19:38:56 -07:00
Kenneth Perry (thothonegan)
0547e5a313
When determining whether to rollback, ask the chain using the chainhash instead of the possibly invalid local hash
2018-05-23 19:38:56 -07:00