Redo account locking and RPC request processing.
This change removes the three separate mutexes which used to lock an account's wallet, tx store, and utxo store. Accounts no longer contain any locking mechanism and rely on go's other synchronization constructs (goroutines and channels) for correct access. All accounts are now managed as a collection through the new AccountManager, rather than the old AccountStore. AccountManager runs as its own goroutine to provide access to accounts. RPC requests are now queued for handling, being denied if the queue buffer is exhausted. Notifications are also queued (instead of being sent from their own goroutine after being received, in which order is undefined), however, notifications are never dropped and will potentially grow a queue of infinite size if unhandled.
This commit is contained in:
parent
20e8201125
commit
6a08c7de07
12 changed files with 1508 additions and 1433 deletions
1623
rpcserver.go
Normal file
1623
rpcserver.go
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue