Only actually needed due to Imported_Wallet.delete_address, but it takes some time to see this.
The verifier and the synchronizer both access unverified_tx but they are both run in the Network thread.
In any case, there does not seem to be a measurable performance hit when using the lock.
Eventually all network calls should go through the network module
without resorting to using raw protocol strings. This, then, makes
adding an other backend easier.
Please note that the behaviour slightly changed. Initially the caller
received an unmodified response from the ElectrumX server. In it the
scripthash is present. This change replaces that scripthash with the
original address.
The removed method didn't allude to the fact it was adding the generated
hash to a dictionary. This was problematic since the code base now
seemingly had two methods for converting an address to a scripthash. One
in the network module and one in the (logical) bitcoin module.
`electrum_plugins` is imported in the `electrum` script
without being used - I assume it's done to make PyInstaller
find that package. But this can be achieved by avoiding
the usage of `__import__()` when importing `electrum_plugins`
where it's effectively used.
As this project is currently structured, absolute
imports have the drawback that they'll load modules
from installed paths rather then from the local repo
when running unit tests. This somehow breaks the main
idea of unit tests which is being able to quickly test
newest development changes. Therefore, use a relative
import here.