Skip to content

Conversation

@CodeShark
Copy link
Contributor

Right now in the current master these hooks aren't really being used - a single wallet is registered at startup in init.cpp and is unregistered at shutdown, also in init.cpp. But in order to support dynamic loading and unloading of transaction listeners, it is necessary to lock these functions. It is also convenient to have an UnregisterAllWallets() function and to call that upon shutdown instead of just calling it on the single main wallet that master currently has.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is cs_setpwalletRegistered allready defined somewhere? Just a quick question ^^.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in fact this already existed in master HEAD...but only RegisterWallet() and UnregisterWallet() were using the lock.

@BitcoinPullTester
Copy link

@BitcoinPullTester
Copy link

@jgarzik
Copy link
Contributor

jgarzik commented Jun 19, 2013

ACK

@sipa
Copy link
Member

sipa commented Jun 22, 2013

Please rebase.

@sipa
Copy link
Member

sipa commented Jun 25, 2013

ACK

sipa added a commit that referenced this pull request Jun 25, 2013
Wallet registration locks in main.cpp + UnregisterAllWallet() function
@sipa sipa merged commit 4ad73c6 into bitcoin:master Jun 25, 2013
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants