clifordsymack / Electron-Cash

Electrum; Bitcoin thin client
MIT License
6 stars 3 forks source link

still re-uses addresses sometimes #34

Closed markblundeberg closed 5 years ago

markblundeberg commented 5 years ago

screenshot from 2018-12-12 09-30-26

cculianu commented 5 years ago

I R SO SAD. :(

I will fix. Yeah the logic for testing an address is new or not is not immune to race conditions, currently, apparently.

Is that a "change" address or a receiving address? (I presume receiving since it has the shuffled outputs)

markblundeberg commented 5 years ago

Yep it was receiving address. But funny, I just noticed it ALSO reused the same change addresses. That was very rare -- the only time I saw change address being reused since the first cashshuffle tests.

screenshot from 2018-12-12 14-55-32

e4afca2dae29e72d76a93347ffc41d407610c5f44fb941d5007f55a4236b6189

bae26a7bd5387d10a40b6b0effc1b5e1f1db5008206eb78f9fe40603419459b4

cculianu commented 5 years ago

Awqesome. Thanks for the info.

Yeah this was crufty code that had race conditions under heavy use. I didn't write this code.

I have rewritten it now to be rock-solid and for race conditions to be impossible.

Fixed in commit 1d6003a32fbb1931be3deffb92b48896c825a32e

Closing issue. If you EVER observe this again on the next test smack me in the face!