gcash / bchwallet

A secure bitcoin cash wallet daemon written in Go (golang)
ISC License
43 stars 29 forks source link

[Chore] Remove SecretKeyGenerator and improve test suite reliability #57

Closed zquestz closed 4 years ago

zquestz commented 4 years ago

The secret key generator swapping code never worked reliably. We have seen numerous errors in the test suite from using this pattern. The problem is when running tests in parallel there is no way to guarantee only 1 test gets the swapped out key generator.

After looking at the test causing the issue, I don't think it is worth keeping. All it checks is that the SecretKeyGen method bubbles up its errors correctly, and there are other tests that check bubbled up errors from ChangePassphrase, and I think those are reasonable enough.

I ripped out the offending code and removed that one test. Now the test suite should be stable.