Zebra/zebrad/src
Janito Vaqueiro Ferreira Filho 11b77afec7
Refactor mempool tests (#2771)
* Remove return of redundant vector length

An attempt to improve readability a bit by not returning a tuple with a
value that can be obtained from a single return type.

* Refactor `unmined_transactions_in_blocks`

Use a more functional style to try to make it a bit clearer.

* Use ranges in `unmined_transactions_in_blocks`

Allow a finer control over the block range to extract the transactions
from.

* Refactor mempool test code to improve clarity

It was previously not clear that only the first genesis transaction was
being used. The remaining transactions in the genesis block were
discarded and then readded later.

* Replace `oneshot` with `call`

Remove a redundant internal `ready_and` call.

* Return an `impl Iterator` instead of a `Vec<_>`

Remove unnecessary deserializations and heap allocations.

* Refactor `mempool_storage_basic_for_network` test

Make the separation between the transactions expected to be in the
mempool and those expected to be rejected clearer.

* Replace `Iterator` with `DoubleEndedIterator`

Allow getting the last transaction more easily.

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2021-09-23 13:54:14 +00:00
..
bin/zebrad Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00
commands Sneak chain_tip_change into mempool (#2785) 2021-09-21 17:06:52 +00:00
components Refactor mempool tests (#2771) 2021-09-23 13:54:14 +00:00
application.rs Allow deliberate instances of the clippy::derivable_impls lint (#2788) 2021-09-22 10:43:27 -03:00
commands.rs Log configured network in every log message (#1568) 2021-01-12 07:46:56 +10:00
components.rs Replace `mock_peer_set` function with `MockService` (#2790) 2021-09-22 15:44:13 +00:00
config.rs Allow deliberate instances of the clippy::derivable_impls lint (#2788) 2021-09-22 10:43:27 -03:00
lib.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00
prelude.rs Fix a deadlock in TokioComponent. 2020-01-15 12:06:31 -08:00
sentry.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00