ca333
9d36579649
uni3
7 years ago
jl777
45a93b635e
Test
7 years ago
jl777
59e66272c8
Test
7 years ago
jl777
e9e7e410ef
Test
7 years ago
jl777
bfb634f223
Increment number of note witness cache
7 years ago
Philip Kaufmann
db954a65ac
use const references where appropriate
9 years ago
Matt Corallo
aa30f65502
Add FundTransaction method to wallet
Some code stolen from Jonas Schnelli <jonas.schnelli@include7.ch>
9 years ago
Jack Grigg
8e8b6d701b
Switch miner to P2PKH, add -mineraddress option
Closes #945 and #1955 .
8 years ago
jl777
7e2cbee181
test
7 years ago
jl777
997c2e88c1
test
7 years ago
jl777
7a90b9dd6b
maturity
7 years ago
Jack Grigg
d85758f5cc
Document behaviour of CWallet::SetBestChain
8 years ago
Jack Grigg
03f83b9b0d
Write witness caches when writing the best block
For steady-state operation, this reduces the average time between wallet disk
writes from once per block to once per hour.
On -rescan, witness caches are only written out at the end along with the best
block, increasing speed while ensuring that on-disk state is kept consistent.
Witness caches are now never recreated during a -reindex, on the assumption that
the blocks themselves are not changing (the chain is just being reconstructed),
and so the witnesses will remain valid.
Part of #1749 .
8 years ago
jl777
b82f1051b5
test
8 years ago
jl777
758197cea0
test
8 years ago
jl777
897d3273d5
test
8 years ago
jl777
2f0645568b
test
8 years ago
jl777
e9e8044e66
test
8 years ago
jl777
be4f847b2e
test
8 years ago
jl777
0a72b10ad5
test
8 years ago
jl777
0ad6a46368
test
8 years ago
Jack Grigg
ccfd8aae1d
Add code comments about CNoteData::witnessHeight
8 years ago
Jack Grigg
40ef121e6a
Correctly set CNoteData::witnessHeight when decrementing witness caches
Closes #1715
8 years ago
jl777
94eb04d704
osx compatibility
8 years ago
jl777
0ae2af2b59
test
8 years ago
Jack Grigg
b6961fc112
Increment witnesses for new transactions on rescan
Closes #1400
8 years ago
Simon
2b1cda3b6a
Return improved error message when trying to spend Coinbase coins ( #1373 ).
Extra parameter added to AvailableCoins to include or exclude Coinbase coins.
SelectCoins, used for sending taddr->taddr, will exclude Coinbase coins.
Added qa rpc test and a runtime parameter -regtestprotectcoinbase to enforce
the coinbase->zaddr consensus rule in regtest mode.
8 years ago
Jack Grigg
6e263a5fd3
Address review comments
8 years ago
Jack Grigg
ddea44a27e
Update comments
8 years ago
Jack Grigg
1a62587e9a
Delay caching of nullifiers when wallet is locked
Closes #1502
8 years ago
Simon
cb0d208f6b
Document CWallet::GetFilteredNotes and fix return type which should be
void.
8 years ago
Jack Grigg
82c2d97c60
Add unit tests for WriteWitnessCache
Requires moving implementation into header
8 years ago
Simon
2aa9c0253a
Update to use new API in CCryptoKeyStore and store a viewing key in walletdb.
8 years ago
Simon
73699ceaf6
Add support for spending keys to the encrypted wallet.
8 years ago
Jack Grigg
56fb1bb8e4
Write note witness cache atomically to disk to avoid corruption
Closes #1378
8 years ago
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.
8 years ago
Jack Grigg
76b226586e
Add wallet method to clear the note witness cache
8 years ago
Simon
03812fefe4
Fix incorrect default value for argument of GetFilteredNotes.
8 years ago
Simon
1b141933e5
Rename GetUnspentNotes to GetFilteredNotes
Added parameter to ignore spent notes, which is true by default.
8 years ago
Simon
a5ac2e25a0
Add GetUnspentNotes to wallet.
8 years ago
Jack Grigg
ac1c94350d
Refactor wallet note code for testing
8 years ago
Jack Grigg
f7d78fdde1
Fix failing test
8 years ago
Jack Grigg
5abaca1af6
Fix the failing test!
8 years ago
Jack Grigg
32a103aab7
Changes after review
8 years ago
Jack Grigg
1551db870a
Add transactions to wallet if we spend notes in them
8 years ago
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.
8 years ago
Jack Grigg
ad20f2149a
mapNullifiers -> mapNullifiersToNotes for clarity
8 years ago
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.
8 years ago
Jack Grigg
de42390f90
Pass ZCIncrementalMerkleTree to wallet to prevent race conditions
8 years ago
Jack Grigg
769e031c1a
Update cached incremental witnesses when the active block chain tip changes
8 years ago