Commit Graph

32 Commits

Author SHA1 Message Date
tomFlowee 4a184fc5c2 Make a static lib pay_lib
To avoid recompiles and such generally to simplify stuff, this
moves all the code into a static lib that is then linked with
by the various apps (including tests).
2021-11-20 22:20:08 +01:00
tomFlowee 89dfd87a44 remove unused include 2021-11-08 20:04:37 +01: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 351283e6bf Fix typo in methodname. 2021-11-08 15:21:53 +01:00
tomFlowee 5a245c8b17 Mark "spam" transactions as locked. 2021-11-01 16:33:53 +01:00
tomFlowee e39c8233d6 Fix returning a bad value sometimes. 2021-11-01 14:14:00 +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 d005a2cd7e Refactor; move code. 2021-10-29 12:48:12 +02:00
tomFlowee b63ba4e9b0 Make test more stable. 2021-10-27 19:44:19 +02:00
tomFlowee 80d7456898 Make new-wallet pane functional.
This changes the default generated wallet to be a HD wallet.
We also add a helper class to configure newly created wallets from QML.
This finishes up the new wallet panel to have all the visible features
actually do something.
2021-10-27 19:11:00 +02:00
tomFlowee d839e18ed2 Add to wallet ability to sync a HD path 2021-10-21 14:57:20 +02:00
tomFlowee f61daf7cb9 Shape the 'import' screen to be much more useful. 2021-10-18 22:26:53 +02:00
tomFlowee 1106937648 Make wallet able to be hierarchically deterministic 2021-10-14 14:42:27 +02:00
tomFlowee 87c8ba701f [Unit test] Avoid compiler warning.
We read 20 bytes where only 4 were provided, so lets provide 20 bytes.
2021-08-09 22:08:04 +02:00
tomFlowee dc48600ff4 Make Schnorr signing default. 2021-05-04 17:41:49 +02:00
tomFlowee 596b246c0f Try to reproduce a bug. 2021-04-19 19:22:37 +02:00
tomFlowee fb598c8c8f Add notification manager. 2021-02-05 16:56:02 +01:00
tomFlowee 0e34e308db Add unit test for Wallet::findInputsFor() 2021-01-31 22:51:55 +01:00
tomFlowee dc94c068f6 Remove unneeded debugging output 2021-01-29 22:01:40 +01:00
tomFlowee 5726849a91 Make remembering a payment request possible
Should a user want to move to other tasks they can store the payment
request backgrounding the processing of said incoming request.
2021-01-06 23:15:54 +01:00
tomFlowee 1262733154 Make bip21 payment request minimal functional 2021-01-06 15:26:46 +01:00
tomFlowee 20690a24ce Update email 2021-01-05 14:04:10 +01:00
tomFlowee c075a80a9b Make a valiant effort to start PaymentRequests 2021-01-05 00:25:23 +01:00
tomFlowee 3b20226fce Expose details of a transaction for QML
For each transaction allow to click on it and show lots of further
details about it.

This also fixes various bugs and adds some basic helper methods in
various places.

The QML is barely functional, getting the right data exposed was the
only goal today.
2020-12-17 23:12:39 +01:00
TomZ cb2b147096 Split 'balance' into 3 variables.
* confirmed
* unconfirmed
* immature
2020-11-06 22:54:39 +01:00
TomZ 0dbf1010af Split the growing Wallet.cpp into multiple files. 2020-11-06 18:25:48 +01:00
TomZ f24a6e0f84 Implement replacing transaction
When a unconfirmed transaction gets made invalid by a mined one spending
the same output, this updates the wallet balance and UTXO state
properly.
2020-11-03 20:16:36 +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 0cd48d8809 Version 2 of UTXO selection algo
This avoids the far to CPU intensive perfect solution and instead does a
best effort comparisn between various semi-random selections of inputs.
2020-10-23 19:45:08 +02: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