-
Notifications
You must be signed in to change notification settings - Fork 37.7k
CWallet class #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
CWallet class #288
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebased. |
This introduces two new source files, keystore.cpp and wallet.cpp with corresponding headers. Code is moved from main and db, in a preparation for a follow-up commit which introduces the classes CWallet and CKeyStore.
* A new class CKeyStore manages private keys, and script.cpp depends on access to CKeyStore. * A new class CWallet extends CKeyStore, and contains all former wallet-specific globals; CWallet depends on script.cpp, not the other way around. * Wallet-specific functions in CTransaction/CTxIn/CTxOut (GetDebit, GetCredit, GetChange, IsMine, IsFromMe), are moved to CWallet, taking their former 'this' argument as an explicit parameter * CWalletTx objects know which CWallet they belong to, for convenience, so they have their own direct (and caching) GetDebit/... functions. * Some code was moved from CWalletDB to CWallet, such as handling of reserve keys. * Main.cpp keeps a set of all 'registered' wallets, which should be informed about updates to the block chain, and does not have any notion about any 'main' wallet. Function in main.cpp that require a wallet (such as GenerateCoins), take an explicit CWallet* argument. * The actual CWallet instance used by the application is defined in init.cpp as "CWallet* pwalletMain". rpc.cpp and ui.cpp use this variable. * Functions in main.cpp and db.cpp that are not used by other modules are marked static. * The code for handling the 'submitorder' message is removed, as it not really compatible with the idea that a node is independent from the wallet(s) connected to it, and obsolete anyway.
dexX7
added a commit
to dexX7/bitcoin
that referenced
this pull request
Nov 28, 2015
a3007eb Remove extra character in help message (zathras-crypto) 49d36db Expose payload over RPC and add payload size (zathras-crypto)
jamoes
referenced
this pull request
in jamoes/bitcoinclassic
Feb 8, 2017
….0.0-typos-release-branch Fix a few more typos and URLs
classesjack
pushed a commit
to classesjack/bitcoin
that referenced
this pull request
Jan 2, 2018
Allow successive OP_SPEND inputs
lateminer
pushed a commit
to lateminer/bitcoin
that referenced
this pull request
Oct 16, 2019
softlink include and lib
cryptapus
pushed a commit
to cryptapus/bitcoin
that referenced
this pull request
May 3, 2021
09ac45c Get rid of CBaseMerkleTx. (Daniel Kraft) a33a190 Decouple CAuxPow from CBaseMerkleTx. (Daniel Kraft) 4d606ae Zero CAuxPow's hashBlock field. (Daniel Kraft) Pull request description: This change refactors the auxpow code so that the `hashBlock` field of a serialised `CAuxPow` is always set to zero. Since that field is never actually used or checked in code (also not in the existing network without this change), that is a safe change to make. It increases compressibility of the data, which can help SPV clients (see bitcoin#288 for discussion about that). In addition, this also changes the code to ignore the `nIndex` field when deserialising a `CAuxPow`. This value is not necessary either, as it has to be always zero (for a coinbase tx as in an auxpow). This change affects consensus: Nodes with this patch applied will accept auxpows with a non-zero `nIndex`, while nodes without will reject those auxpows. But since the auxpow is only there to provide PoW for a block and does not affect the consensus state itself, this change is safe. All that an attacker could do is make old nodes reject blocks that new nodes accept, *due to invalid PoW*. Once relayed by a new node, the same blocks will be accepted by the old code as well. Thus, this "attack" is not different from an attacker simply trying to withhold blocks for certain peers, which they can do already if they want. ACKs for commit 09ac45: Tree-SHA512: b6c1c439949add20337874477366429f6d567bbb7e71d898f046bbcbcefc0c6ca8dbad73d5098ed27a403ff5090dd48eb51cb39d8834e95d66ec102b9cd9a87f
hebasto
added a commit
that referenced
this pull request
May 27, 2021
…lator comments 8b77133 qt: Replace disambiguation strings with translator comments (Hennadii Stepanov) Pull request description: Since #21694 is merged, translator comments is the right way to pass context to translators. This PR fixes changes were made: - in #220 before #21694 - in #21694 on testing purpose - in #125 Closes #288. ACKs for top commit: jarolrod: ACK 8b77133 Tree-SHA512: 466ade35f4969a41fbf3196780b1ae9fa810bab5d2f09077f8631604636cc63b24a901c719f6b5797366d2aa307993d0aa419ce35200c8d0a741a3d81cad3e6b
rajarshimaitra
pushed a commit
to rajarshimaitra/bitcoin
that referenced
this pull request
Aug 5, 2021
typo on Readme
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce a new class, CWallet, to manage wallets, and move all wallet-specific code there. All wallet-related globals are turned into fields of CWallet, and one single global, pwalletMain, is added instead.
It consists of two commits: the first one adds the new source files, and moves as much there as possible without actually changing any code. The second commit adds the class definitions, and all other changes.
Forum thread is here: http://forum.bitcoin.org/index.php?topic=9492.0