Re: Linux build

It works reliably on Linux now, except if it uses wxMessageBox() outside the GUI thread, it’ll crash because non-GUI threads can’t open a window on Linux. I haven’t got to fixing that yet. I’ve been running my stress test on it and it’s functioning normally.

Most of wxWidgets is not thread-safe to use in threads other than the UI thread, but as a rule of thumb on Windows anything not UI related is OK. It turns out its more thread-unsafe on GTK. I replaced a bunch of stuff at once so I don’t know if it was just one thing (probably Repaint), but I have to assume even any wx function that uses wxString is not safe to use outside the UI thread. So dang, there goes all the nice wxWidgets portability support functions. I left a few simple things like wxThread::GetCPUCount() that I checked the source and it’s all numerical, and wxMutex has to be safe or it’d be useless.

There’s an issue that if you exit and run it again right away, it can’t bind port 8333. The port frees up after about a minute. Unless I’m missing something, I am closing the socket before exit, so I don’t know what else I can do. Maybe this is just something about Linux that it takes a minute to free up a port you had bound. Possibly a security feature so some trojan doesn’t kill the web server and quickly jump into its place and pick up all the client retries.

Still gotta figure out how to do the xpm version of the icon correctly.

I wonder if the database dat files are interchangeable with Windows.

Source: Published by Martti Malmi on GitHub in February 2024 as part of his testimony in the COPA v. Wright trial. The full correspondence archive is available at mmalmi.github.io/satoshi/.