Commit graph

870 commits

Author SHA1 Message Date
Alex d7ad221ee0 chain: ensure clientMtx is never locked while waiting on channel 2018-05-23 19:38:56 -07:00
Alex 5c69110f47 wallet: ensure rescan is launched with all addresses
During the time of initial block hash catch-up, it is possible to
request an address be generated. This commit updates the active
addresses by calling `w.activeData` after the catch-up is complete.
2018-05-23 19:38:56 -07:00
Alex 5113a64617 wallet: fix nil dereference in rescanprogress ntfn handler 2018-05-23 19:38:56 -07:00
Alex 8e2c741f88 wallet: move DB access from rescan ntfns into correct goroutine 2018-05-23 19:38:56 -07:00
Alex 81a9bb67c1 wallet: set wallet birthday properly in rescans and manager 2018-05-23 19:38:56 -07:00
Alex 1b6d7a7ee3 chain: add GetBlockHeader support
This commit allows neutrino to simulate the GetBlockHeader RPC, and
allows chain client code to use the call with both btcd/RPC back end
and the neutrino back end.
2018-05-23 19:38:56 -07:00
Alex e06434ed75 chain: add StartTime support to neutrino client
This commit adds support for using StartTime in a rescan in
neutrino. The NeutrinoClient instance can have a birthday set
such that all underlying neutrino rescans are called with that
start time.
2018-05-23 19:38:56 -07:00
Alex 555bd5d583 waddrmgr: add support for wallet birthday for creating new wallet
TODO: support for wallet upgrades and key imports
2018-05-23 19:38:56 -07:00
Alex 44f94c4ca5 build: use neutrino with StartTime rescan option 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun 1897fa6517 build: update glides files to point to latest neutrino
In this commit we update the glide files to point to the latest version
of neutrino, as recently many bug fixes in the syncing logic have been
fixed.
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun 8d052d2844 build: update glide files to point to latest btcd+neutrino 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun 33b2be6798 build: update glide files to point to latest btcsuite/btcd commits 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun a0abd3632c multi: update to new upstream btcsuite/btcd API's 2018-05-23 19:38:56 -07:00
Alex 2a277a8994 build: update neutrino version 2018-05-23 19:38:56 -07:00
Alex e8b5091725 log: update to new logging API 2018-05-23 19:38:56 -07:00
Alex 081f7b0dce chain: fix issue where mutex can be unlocked twice 2018-05-23 19:38:56 -07:00
Alex 58f303b957 wallet: make initial sync play nicer with neutrino+bdb backends 2018-05-23 19:38:56 -07:00
Alex fbde9a97c8 wallet: eliminate some unneeded database transaction opens/commits 2018-05-23 19:38:56 -07:00
Alex 4fb78bca18 wallet: add logging when catching up block hashes on startup/rescan 2018-05-23 19:38:56 -07:00
Alex 3eb28d2d37 wallet: batch initial block hash catch-up process every 10K blocks 2018-05-23 19:38:56 -07:00
Alex Akselrod c85893de1a chain+waddrmgr+wallet: store all hashes for better reorg handling (#5) 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun 4ac75773d7 chain: wait for rescan exit before re-creating, ensure thread safety 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun dcc7bbc14d build: update to latest build of neutrino 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun 3567ae87f4 wallet: avoid double-writing block stamps in onFilteredBlockConnected 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun 598394c51a build: update glide files to point to roasbeef+neutrino proper 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun 3dc7a8529c multi: switch all imports to roasbeef's forks 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun d9defda7ff build: update neutrino hash in latest glide file 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun efbe0c8ef4 build: update commit hash for neutrino 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun 7acc49dddb chain: also register blockConnected for NotigyReceived calls 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun 772fbd4726 chain: dispatch BlockConnected notifications for NeutrinoClient 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun dbe472edd6 build: update neutrino glide.lock hash, API usage 2018-05-23 19:38:56 -07:00
Alex 3f12fa3c6c chain+wallet: rename SPVChain to NeutrinoClient 2018-05-23 19:38:56 -07:00
Alex 578e95c4ec glide: Update glide.lock for neutrino 2018-05-23 19:38:56 -07:00
Alex ed58fa8f80 Update glide.lock for new Neutrino commit 2018-05-23 19:38:56 -07:00
Alex 4598742465 chain: stop SPV rescan immediately when wallet is already caught up 2018-05-23 19:38:56 -07:00
Alex 3601b2fa14 chain: fix RescanFinished notification 2018-05-23 19:38:56 -07:00
Alex d6bcab4912 chain: make ChainService public member of SPVChain struct 2018-05-23 19:38:56 -07:00
Alex 0e7e8404e5 chain: fix Neutrino driver bugs 2018-05-23 19:38:56 -07:00
Alex 4a25ae194a Fix Neutrino instantiation. 2018-05-23 19:38:56 -07:00
Alex b5873a5b2c Finish integration of Neutrino; still untested. 2018-05-23 19:38:56 -07:00
Alex 9e5250e6d7 More neutrino integration into btcwallet. 2018-05-23 19:38:56 -07:00
Alex 3d81f856fd Move spvchain into neutrino and start integration w/btcwallet 2018-05-23 19:38:56 -07:00
Alex 32adc3c43f Make rescan a struct, add spending tx to GetUtxo, start integration. 2018-05-23 19:38:56 -07:00
Alex 8b734ce696 Fix bugs and add SendTransaction, which isn't that great. 2018-05-23 19:38:56 -07:00
Alex 59f3db7a1b Reduce numQueryThreads to 20 and re-enable testRandomBlocks. Works! 2018-05-23 19:38:56 -07:00
Alex 7c23cf13b3 GetUtxo fixed. 2018-05-23 19:38:56 -07:00
Alex b549587296 Add GetUtxo. Mostly works. 2018-05-23 19:38:56 -07:00
Alex ddc841924b Add TXIDs to rescan. Fix/finish EndBlock. Disable testRandomBlocks. 2018-05-23 19:38:56 -07:00
Alex e7bae84662 Rescan works and tests pass. 2018-05-23 19:38:56 -07:00
Alex bebe29012e Rescan tests pass except an intermittent close of closed channel. 2018-05-23 19:38:56 -07:00