Closed lnsiegel closed 4 months ago
Attention: Patch coverage is 93.75000%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 55.64%. Comparing base (
ab2af32
) to head (8588da8
). Report is 204 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
full-service/src/db/transaction_log.rs | 93.75% | 0 Missing and 2 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Motivation
Added rust unit tests to confirm the new method of
transaction_log_id
generation for vectors ofOutputTxos
passed to theTryFrom<Vec<OutputTxo>>
implementation forTransactionId
.In this PR
There are two new unit tests added:
test_try_from_vec_output_txo_for_transaction_id
test_try_from_empty_vec_output_txo_for_transaction_id
The first test creates different sized vectors of
OutputTxo
structures. The vectors are of size 1 through 10. The embeddedTxOut
structs are initialized from entropy, so the public keys are unique on each run. Each vector is first scanned for its minimum public key. The vector is then passed toTransactionId::try_from()
and the resultingtransaction_log_id
is asserted to be equal to the vector's minimum public key.The second test checks that the expected error message is returned when an empty vector is passed to
TransactionId::try_from()