Commit Graph

17 Commits

Author SHA1 Message Date
tomFlowee 47746e724d Follow upstream includes rename
The PublicKey. and PrivteKey.h used to be called different.
2023-11-24 18:20:41 +01:00
tomFlowee 73e10f8bef Fix reordering of finding transactions
In our wallet we very rarely end up in a situation where we have to ask
the same transactions twice from a peer due to us having generated a
bunch of new keys from a HD wallet in the middle of a series we asked
that peer. Making the filter we sent at the start of the series be
outdated halfway through.

This is now handled properly.

This adds a unit test which tests that we now reach the right balance
and can add the same block multiple times without it failing.

Fixes: #12
2023-04-04 13:36:07 +02:00
tomFlowee e120df9b71 Implement fully encrypting the wallet files.
For the 'fullyEncrypted' option we now simply fully
encrypt the entire blob of both the secrets file as well
as the wallet.dat (which transactions we own).
2022-05-17 22:26:48 +02:00
tomFlowee fe6fa98ff2 Make full-encrypted encrypt the transactions
This additionally makes the password get hashed more often and we create
an 'iv' from it as well.
2022-05-17 00:44:51 +02:00
tomFlowee 2accfa9700 Start wallet-encryption 2022-05-13 19:29:25 +02:00
tomFlowee 5edfbe7ca4 Add test for rejected transactions 2021-11-08 19:36:47 +01:00
tomFlowee 06b02db4dc Add new unittest and code for output locking 2021-11-08 15:24:48 +01:00
tomFlowee 5a245c8b17 Mark "spam" transactions as locked. 2021-11-01 16:33:53 +01:00
tomFlowee 35bd66297d Find in the transactions the signature type used.
As transactions are found on the blockchain we remember the signature
type used in order to avoid one private key to be used for both types of
signatures, which can cause compromised keys.
2021-10-31 16:56:03 +01:00
tomFlowee 1106937648 Make wallet able to be hierarchically deterministic 2021-10-14 14:42:27 +02:00
tomFlowee 596b246c0f Try to reproduce a bug. 2021-04-19 19:22:37 +02:00
tomFlowee 0e34e308db Add unit test for Wallet::findInputsFor() 2021-01-31 22:51:55 +01:00
tomFlowee 20690a24ce Update email 2021-01-05 14:04:10 +01:00
TomZ cb2b147096 Split 'balance' into 3 variables.
* confirmed
* unconfirmed
* immature
2020-11-06 22:54:39 +01:00
TomZ ae0c395d50 Make the wallet process mempool transactions
When a transaction is received by the p2pnet layer via a simple INV/
GetData we now process this and properly lock the outputs it spent to
avoid creating double spending transactions.

One task is left: properly recognize when a mined transaction
invalidates another transaction (like an unconfirmed one) and update the
datastructures.
2020-11-02 21:49:06 +01:00
TomZ 1c94c34582 Add copyright headers 2020-10-17 16:40:48 +02:00
TomZ 2c8954eafa Fix reorg-tx algo and add unit test for it.
The code to re-org all transactions in a block so transactions that
depend on others are processed after those they depend on had a silly
bug (missing line), fixed that but also made it unit-testable to
demonstrate the bug.
2020-10-17 16:38:37 +02:00