23 Commits

Author SHA1 Message Date
tomFlowee ced4f98beb Add token support to the Tx object
We add a Token class to Tx, which adds an easy to use API when compared
to the plain iterator. The main point of the API chosen is to make sure
we don't do unneeded parsing or copying for tokens unless needed.

Additionally refactor the ValidationPrivate::UnspentOutput class to
inherit from the Tx::Output class in order to avoid lots of duplicated
logic on handling the data.
2026-05-13 17:20:32 +02:00
tomFlowee 29069b5aa3 Fix error in tests. 2026-04-09 20:01:58 +02:00
tomFlowee 1dc2656bef Follow ASIO porting for apps too. 2025-02-11 19:41:22 +01:00
tomFlowee 05bbba3cb3 Rename class CKey -> PrivateKey 2022-07-06 22:12:33 +02:00
tomFlowee c33d54ed7d Rename class CKeyID -> KeyId 2022-07-06 21:52:47 +02:00
tomFlowee cca8a885bc Fix coding style issues
Follow the coding styleguide and make the methods lowercase on CKey
2022-05-11 13:46:15 +02:00
tomFlowee 6ff0e7c0de [Refactor] FastBlock -> Block 2021-11-02 10:18:24 +01:00
tomFlowee 4689cc6a92 [Refactor] CBlock -> MutableBlock 2021-11-02 09:36:09 +01:00
tomFlowee ae78dd0bb8 Update email address 2021-06-20 22:44:44 +02:00
tomFlowee f9a0050220 Update TransactionBuilder / signature type handling
The choice between Schnorr and ECDSA signatures is now per input instead
of once choice for the entire transaction.
2021-05-04 16:57:55 +02:00
tomFlowee 6682a4a5b2 Rename CKey::Sign() -> signECDSA() 2021-04-19 15:45:02 +02:00
tomFlowee fcb648916d Make pubkey follow coding styleguide 2021-04-19 14:48:18 +02:00
tomFlowee c114c9dc74 Add an extra unit test. Tests CBlockIndex 2021-02-19 13:43:56 +01:00
tomFlowee 94ae61132b Promote 'interpreter' to the utils lib.
Being able to parse bitcoin-script is useful for users other than
the hub, using the flowee shared libraries they can now do so.
2021-01-21 15:47:46 +01:00
TomZ 27e507cba0 Test and fix reconsiderBlock
This adds a unit test to see if the combination of invalidateBlock and
reconsiderBlock do what we expect to do.

The main issue was that we store an invalidated block in the UTXO and we
forgot to re-validate that on reconsider.

Additionally I avoid writing a lot of unchanged data to the block-index.
2020-11-18 22:08:00 +01:00
TomZ bab87a9900 Sync usage of random engine 2020-06-05 15:32:30 +02:00
TomZ a69ab412f5 Add unit test to test the minimalPush consensus change. 2019-10-09 19:36:48 +02:00
TomZ df7de2ecd2 Clean up the hairy ball of util.cpp
Move some globals and all stuff pulling in crypto to the
server/serverutil.cpp file

Remove dead code.

Move several items that were used in only one place to the respective
files using them.

Move the class WaitUntilFinishedHelper into its own file.

Made sure no header includes utils.h
remove a handfull of files including utils.h for nothing.
2019-08-24 22:25:09 +02:00
TomZ 412f8b2ecf Fix possible corruption on reorgs 2019-06-12 21:02:56 +02:00
TomZ 5fae218cb6 Fix test being unstable on CI
The test assumed at least 2 cores, if you go below that (as the CI
dockers did) then we need to be aware of race-conditions when checking
on the status of the validation.
2019-04-29 10:25:29 +02:00
TomZ 31c0b25fb6 Fix synchronisation issues in test 2019-04-23 13:11:51 +02:00
TomZ eca66d8734 Add 'rollback' unit test and make it pass 2019-04-22 12:50:09 +02:00
TomZ 5dcc687273 Promote BlockValidation test
This includes a little refactor to make the test init and cleanup
after each individual unit.
2019-04-22 12:49:53 +02:00