Commit graph

1282 commits

Author SHA1 Message Date
Wilmer Paulino
8e9e4d6926
chain: rename bitcoind.go to bitcoind_client.go 2018-07-26 16:38:38 -07:00
Olaoluwa Osuntokun
a4d9da433f
Merge pull request #509 from wpaulino/double-spend-bug-fix
wtxmgr: fix double spend bug
2018-07-23 20:28:34 -07:00
Olaoluwa Osuntokun
8b2629a935
Merge pull request #514 from vapopov/zerobalance
wallet: fix lost balance of unmined transaction for neutrino
2018-07-23 17:58:56 -07:00
Olaoluwa Osuntokun
eb5aba63a6
Merge pull request #522 from halseth/test-race-condition
waddrmgr test: fix test race condition
2018-07-20 17:14:06 -07:00
Johan T. Halseth
f243546c33
waddrmgr test: move t.Parallel to actual test 2018-07-20 11:13:27 +02:00
Olaoluwa Osuntokun
5b3d124de2 chain: also accept map[wire.OutPoint]btcutil.Address for bitcoind rescans
In this commit, we update bitcoind to also accept a mapping from
outpoint to address for its implementation of the recan RPC. We do this
as in the near future, when bitcoind implements BIP 158 indexing, then
we'll be able to utilize that to do rescans.
2018-07-17 19:05:17 -07:00
Olaoluwa Osuntokun
6a0e6da280 chain: continue to accept []wire.OutPoint for rescan updates for bitcoind
In this commit, we fix a recently introduced bug that would cause
callers that attempted to get a spend notifications for a particular
outpoint to no longer get that precise notification. In a prior commit,
in preparation for the new neutrino gcs filter format, we added a
mapping from script to outpoint that will be used by neutrino, and later
other backends as well. However, we still need to match on outpoint
slices for bitcoind today.
2018-07-17 19:05:17 -07:00
Olaoluwa Osuntokun
fdca047246 chain: update block filterer unit tests 2018-07-16 19:47:17 -07:00
Olaoluwa Osuntokun
dbb7ae6668 wallet: remove extraneous err check 2018-07-16 19:47:17 -07:00
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