Jack Grigg
a581fe2aae
Only ignore runtime errors caused by failed note decryption
2016-10-14 17:16:09 -05:00
Jack Grigg
1a62587e9a
Delay caching of nullifiers when wallet is locked
...
Closes #1502
2016-10-14 17:16:09 -05:00
zkbot
cc10005247
Auto merge of #1486 - str4d:1456-writewitnesscache-exception-safety, r=bitcartel
...
WriteWitnessCache: Catch errors and abort transaction
Closes #1452
2016-10-14 17:37:53 -04:00
zkbot
bb25bd4bc1
Auto merge of #1533 - bitcartel:master_1447_document_getfilterednotes, r=bitcartel
...
Document CWallet::GetFilteredNotes
Also fixes return type of method which should be void.
Part of #1447
2016-10-13 20:25:19 -04:00
Simon
cb0d208f6b
Document CWallet::GetFilteredNotes and fix return type which should be
...
void.
2016-10-13 17:01:54 -07:00
Jack Grigg
e492d98632
Document CWalletTx::FindMyNotes
...
Part of #1447
2016-10-13 18:27:58 -05:00
Jack Grigg
82c2d97c60
Add unit tests for WriteWitnessCache
...
Requires moving implementation into header
2016-10-11 09:33:47 -05:00
Sean Bowe
74f15a73a1
Make 100KB transaction size limit a consensus rule, rather than a standard rule.
2016-10-08 00:00:23 -06:00
Jack Grigg
6216b4b2dc
WriteWitnessCache: Catch errors and abort transaction
...
Closes #1456
2016-10-05 09:49:43 -05:00
zkbot
4f49d32a28
Auto merge of #1427 - bitcartel:master_1345_getbalance, r=bitcartel
...
Fixes #1345 so that RPC getbalance star calculates balance of UTXOs correctly.
2016-10-04 01:20:12 -04:00
Simon
86cf60b5c8
Fixes #1345 so that UTXO debit and credits are computed correctly for a transaction.
2016-10-03 11:06:43 -07:00
zkbot
d5dce9342b
Auto merge of #1444 - str4d:1394-reindex-clear-witness-caches, r=str4d
...
Clear note witness caches on reindexing
This PR also fixes a test that was passing arguments in the wrong order.
Closes #1394
2016-09-30 02:30:01 -04:00
Simon
82bd9ee81b
Fix comment and formatting per review
2016-09-29 22:07:38 -07:00
Simon
2aa9c0253a
Update to use new API in CCryptoKeyStore and store a viewing key in walletdb.
2016-09-29 20:17:30 -07:00
Simon
73699ceaf6
Add support for spending keys to the encrypted wallet.
2016-09-29 20:17:30 -07:00
Jack Grigg
40600f5089
Simplify ClearNoteWitnessCache()
2016-09-30 15:00:16 +13:00
zkbot
42941c9fd4
Auto merge of #1445 - bitcartel:master_fix_filtered_notes, r=str4d
...
Fix casting error in GetFilteredNotes
Use int for minDepth like upstream instead of size_t which can lead to casting problems if a wallet tx has a depth of -1.
Also don't use FindMyNotes as mapNoteData has already been set on wallet tx.
@str4d As dicussed. This should be merged before other PRs related to wallet.
2016-09-29 05:33:11 -04:00
Jack Grigg
56fb1bb8e4
Write note witness cache atomically to disk to avoid corruption
...
Closes #1378
2016-09-28 11:51:42 +13:00
Simon
dec49d1f82
Fix GetFilteredNotes to use int for minDepth like upstream and avoid casting problems. Don't use FindMyNotes as mapNoteData has already been set on wallet tx.
2016-09-27 11:14:49 -07:00
Jack Grigg
76b226586e
Add wallet method to clear the note witness cache
2016-09-27 14:55:05 +13:00
Simon
1b141933e5
Rename GetUnspentNotes to GetFilteredNotes
...
Added parameter to ignore spent notes, which is true by default.
2016-09-08 21:46:15 -07:00
Simon
a5ac2e25a0
Add GetUnspentNotes to wallet.
2016-09-08 21:46:14 -07:00
Simon
97b6f365a1
Fix bug where wallet was not persisting witnesses to disk.
...
Author: str4d
2016-09-08 21:46:14 -07:00
Jack Grigg
ac1c94350d
Refactor wallet note code for testing
2016-09-08 17:17:35 +12:00
Simon
fa511e1084
Replace GetTxid() with GetHash() after rebase on latest.
2016-09-07 15:12:20 -07:00
Simon
805344dcf4
Refactor: replace calls to GetTxid() with GetHash()
2016-09-07 15:12:09 -07:00
Jack Grigg
32a103aab7
Changes after review
2016-09-01 11:48:15 +12:00
Jack Grigg
0736fa14fc
Keep any existing cached witnesses when updating transactions
2016-08-31 21:16:59 +12:00
Jack Grigg
1551db870a
Add transactions to wallet if we spend notes in them
2016-08-31 18:28:00 +12:00
Jack Grigg
38a6e7a74d
Set witness cache size equal to coinbase maturity duration
...
Both constants have the same implicit assumption: that the blockchain will very
rarely undergo a reorganisation of that size.
2016-08-31 15:26:49 +12:00
Jack Grigg
ad20f2149a
mapNullifiers -> mapNullifiersToNotes for clarity
2016-08-31 15:11:35 +12:00
Jack Grigg
4086e5ce98
Replace vAnchorCache with a cache size counter
...
The anchor is obtained from the returned witnesses; since all witnesses are to
the same point (the latest blockchain tip), they all have the same root.
2016-08-31 15:03:42 +12:00
Jack Grigg
3fac1020e7
Remove GetNoteDecryptors(), lock inside FindMyNotes() instead
2016-08-31 02:09:17 +12:00
Jack Grigg
de42390f90
Pass ZCIncrementalMerkleTree to wallet to prevent race conditions
2016-08-31 02:00:11 +12:00
Jack Grigg
769e031c1a
Update cached incremental witnesses when the active block chain tip changes
2016-08-30 00:29:49 +12:00
Jack Grigg
be74c80deb
Add caching of incremental witnesses for spendable notes
2016-08-30 00:29:49 +12:00
Jack Grigg
8db7e25c3f
Create mapping from nullifiers to received notes
...
This is used in the same way as CTxIn.prevout (e.g. to mark transactions dirty).
2016-08-30 00:29:49 +12:00
Jack Grigg
0f1060478f
Keep track of spent notes, and detect and report conflicts
2016-08-30 00:29:49 +12:00
Jack Grigg
c3a7307a69
Store mapping between notes and PaymentAddresses in CWalletTx
2016-08-30 00:29:49 +12:00
Jack Grigg
02e674555e
Add wallet method for finding spendable notes in a CTransaction
2016-08-30 00:29:49 +12:00
Simon
0feffd1424
Don't mark wallet as dirty if key already exists.
...
Fix incorrect method name used in error message.
2016-08-24 11:19:33 -07:00
Simon
c1c4594371
Implemented RPC calls z_importkey, z_exportkey, z_getnewaddress.
...
Modified RPC calls dumpwallet and importwallet to include spending keys.
2016-08-24 11:19:33 -07:00
Simon
10d2c57c0d
Replace calls to GetHash() with GetTxid() for transaction objects.
...
Where the caller intends to receive a transaction id and not a double
SHA256 hash.
2016-07-26 17:13:03 -07:00
Sean Bowe
22de160219
Fixes for indentation and local variable names.
2016-07-18 10:07:29 -06:00
Daira Hopwood
4bc00dc141
Bucket -> note.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org >
2016-07-18 10:06:18 -06:00
Sean Bowe
8675d94b63
Rename vpour to vjoinsplit.
2016-07-18 10:06:18 -06:00
Sean Bowe
a8c68ffe99
Rename CPourTx to JSDescription.
2016-07-18 10:06:18 -06:00
Sean Bowe
ccb439c510
Protect-style joinsplits should anchor to the latest root for now, until #604 is resolved.
2016-05-12 16:44:49 -06:00
Sean Bowe
2dc3599271
Transplant of libzcash.
2016-05-12 16:44:47 -06:00
Sean Bowe
1760b3cd88
Deprecate the old tree and remove old tree tests from the test suite.
2016-04-28 16:07:52 -06:00