1. Global Logger Mutation
The Problem: Calling Unlock() in base_client.go explicitly sets the global logrus level to DebugLevel or ErrorLevel.
The Impact: The SDK forcefully overwrites the logging configuration of any parent application importing it. Libraries should not mutate global state.
2. Race Conditions in Examples
The Problem: Example scripts (like alice_to_bob.go) do not wait for the background wallet sync to finish after calling Unlock().
The Impact: The scripts race ahead and try to spend funds before the internal database is populated.
How to Reproduce:
For this to work, #105 should have been merged to solve the panic bug. Once that is done, you can proceed with:
- Run
example/alice_to_bob/alice_to_bob.go
- Logs after the
Unlock() for alice won't show
- It exits with error "wallet is still syncing"
