Skip to content

Fix XChaCha test bug

Marcin Jachymiak requested to merge 2020-03-fix-xchacha-test into master

MERGE REQUEST

Overview

Fixes bug in test. If the random index is zero then the equality check (that's supposed to fail) ends up checking if an empty slice is equal to an empty slice.

Example for Visual changes (ie Screenshot)

Issues Closed

574 ok      gitlab.com/NebulousLabs/Sia/cmd/siad    0.005s
575 ok      gitlab.com/NebulousLabs/Sia/compatibility    0.003s
576 --- FAIL: TestXChaCha20DecryptInPlace (0.00s)
577     xchacha20_test.go:89: Partially decrypted plaintext prefix should not match
578 FAIL
579 FAIL    gitlab.com/NebulousLabs/Sia/crypto    0.193s
580 ok      gitlab.com/NebulousLabs/Sia/encoding    0.004s

Checklist

Review and complete the checklist to ensure that the MR is complete before assigned to an approver.

  • All new methods, or updating methods have clear docstrings
  • Testing added or updated for new methods
  • Any new packages are added to Makefile and .gitlab-ci.yml
  • API documentation updated for API updates
  • Module README.md updated for changes to work flow
  • Issue added to Sia-UI repo for new supporting features
  • [] Changelog updated
Edited by Marcin Jachymiak

Merge request reports