Fix c wallet interface access modifier #4214

pull StephenLReed wants to merge 97 commits into bitcoin:master from StephenLReed:FixCWalletInterfaceAccessModifier changing 196 files +23181 −66573
  1. StephenLReed commented at 4:16 PM on May 22, 2014: none

    class CWalletInterface has access modifier protected, which should prevent the RegisterWallet() and other related functions in main.cpp from referencing the CWalletInterface member functions. Before this patch, main.cpp compiles fine, but shows an access error in my NetBeans code editor on Ubuntu.

    I changed the access modifier to public in CWalletInterface and the build is OK and the unit tests execute OK.

  2. devtools: add script to check symbols from Linux gitian executables
    Add a script to check that the (Linux) executables produced by gitian
    only contain allowed gcc, glibc and libstdc++ version symbols.  This
    makes sure they are still compatible with the minimum supported Linux
    distribution versions.
    a99e80ee94
  3. [Qt] catch Windows shutdown events while client is running
    - prevents unsafe shutdowns on Windows, which is known to be
      able to cause problems with wallet.dat
    - if a users ends a Windows session, this will initiate a client shutdown
      and show a Windows dialog, that tells the user what is going on (for
      Windows Vista and higher it will even show a reason for blocking the
      Windows session end)
    68dd3bcbc9
  4. qt: Periodic translations update
    Update English translation from source code, and pull other translations
    from Transifex.
    4c21c18a9a
  5. use standard __func__ instead of __PRETTY_FUNCTION__ 08bf0677e0
  6. Correct indentation a6e4106cf7
  7. [Qt] Optionally add third party links to transaction context menu 60fbd12faa
  8. Add CLIENT_VERSION_REVISION to mac osx info plist 79e01eadac
  9. Bugfix: configure: Look in libx32 subdirectory for boost libraries 20b106b78e
  10. Remove build-time no-IPv6 setting
    The year is 2014. All supported operating systems have IPv6 support,
    most certainly at build time (this doesn't mean that IPv6 is configured,
    of course).
    
    If noone is exercising the functionality to disable it, that means it
    doesn't get tested, and IMO it's better to get rid of it.
    
    (it's also not used consistently in RPC/boost and Net code...)
    589f2f820f
  11. Wording
    Cleaned up wording and spacing for readability.
    b9a53ebfe1
  12. gitian: build against Qt 4.6
    Should make it possible to run the resulting GUI executable on
    Linux distributions that use Qt 4.6, such as Debian Wheezy and Tails.
    
    Builds a mini-SDK for building against Qt 4.6. This includes the headers
    as well as host utilities such as `lrelease`, `qrc` and `moc`.
    
    This speeds up the gitian build a bit - libqt4-dev pulled in a lot of packages,
    and is no longer needed as this provides a replacement of our own.
    
    Note: This does not replace the Qt build with at static library. After this
    commit we still build dynamically against the system Qt library. The only
    difference is that compatibility with an older version is maintained. This
    loses minor GUI functionality (such as setPlaceholderText) but still
    allows integration into the window management of the host OS, unlike
    when statically linking.
    05acf009b5
  13. gitian: don't export any symbols from executable
    This avoids conflicts between the libraries statically linked into bitcoin and any
    libraries we may link dynamically (such as Qt and OpenSSL, see issue #4094).
    It also avoids start-up overhead to not export any unnecessary symbols.
    To do this, build a linker script that marks all symbols as local.
    744efbd17b
  14. devtools: have symbol check script check for exported symbols
    After last commit, our executables should export no symbols anymore.  To
    make sure that this stays the case, verify this in the symbol checker
    script.
    2a174e3bc4
  15. qt: add transifex configuration file
    This is a project-wide configuration file and should be the same for
    everyone.
    Also remove mention of creating it yourself from the translation process.
    461c8fdb4f
  16. devtools: add a script to fetch and postprocess translations
    Run this script from the root of the repository to update all translations from transifex.
    It will do the following automatically:
    
    - create a transifex configuration file
    - fetch all translations
    - post-process them into valid and committable format
    bf7df3e30a
  17. Full translation update
    Last update (48be9ce) missed quite a lot, for some reason.
    
    This is also the first update done with the new script
    `contrib/devtools/update-translations.py`
    9354c81ba0
  18. gitian: use right qt tools in linux build
    If the `libqt4-dev` package is installed it picks the moc executable
    from the system instead of our custom-built one. This results in
    compatibility errors.
    
    This commit convinces configure to pick the right one.
    1de40d454f
  19. better std::exception logging for CAddrDb
    - also small logging text changes
    70d8682835
  20. Log BerkeleyDB version at startup
    Prints the actual version of BerkeleyDB that is linked against, if
    wallet support is enabled.
    
    Useful for troubleshooting.
    
    For example:
    
        2014-05-01 07:44:02 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
    
        2014-05-01 07:54:25 Using BerkeleyDB version Berkeley DB 5.1.29: (October 25, 20 11)
    6c3f86e658
  21. Update build instructions for Berkeley DB
    - People were having problems with the .so when installing in
      alternative locations.
      Like gitian, build a static library with -fPIC that can
      be embedded into the executables.
    
    - Add some missing steps
    
    - Add reminder that BerkeleyDB is only needed when wallet support is
      enabled
    33044e0286
  22. stop bitcoind/bitcoin-cli processes that might have been left running d43b059719
  23. Removed LevelDB changes
    Syntax Highlighting
    ab7673d175
  24. reorder includes to compile on OpenBSD
    From getifaddr(3) manual:
    "If both <net/if.h> and <ifaddrs.h> are being
    included, <net/if.h> must be included before <ifaddrs.h>"
    
    http://www.openbsd.org/cgi-bin/man.cgi?query=getifaddrs&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
    1ef8647a17
  25. doc: remove specific mention of boost 1.55
    There is no need to use any specific version of boost on Linux/Unix.
    Even 1.37 should still work.
    
    Also the mention of boost-dev doesn't belong after adding oldstable.
    Remove it. libboost-all-dev is already mentioned earlier.
    6af0393a2a
  26. don't use sed's -i option to stay posix compliant
    POSIX does not define sed's -i option. To stay as portable
    as possible we should not relay on it.
    d58919b9bb
  27. qt: periodic translations update 0216a7f288
  28. rpc: add `getblockchaininfo` and `getnetworkinfo`
    Adds two new info query commands that take over information from
    hodge-podge `getinfo`.
    
    Also some new information is added:
    - `getblockchaininfo`
      - `chain`: (string) current chain (main, testnet3, regtest)
      - `verificationprogress: (numeric) estimated verification progress
      - `chainwork`
    - `getnetworkinfo`
      - `localaddresses`: (array) local addresses, from mapLocalHost (fixes #1734)
    fd8139d89c
  29. build: fix make clean on OSX
    Rebased-From: 74df0f5
    Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
    30cd725214
  30. Add missing cs_main lock to VerifyDB
    Fixes issue #4139.
    35ab9760fb
  31. [Qt] fix ugly typo in bitcoin.cpp
    Closes #4145.
    
    Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
    Rebased-From: 1e4b083
    e5fdf800a3
  32. ui: Check for !pixmap() before trying to export QR code
    Adds null pointer checks as well as prevents the Save/Copy context
    menu from appearing at all if no image is shown.
    
    Fixes issue #4140
    94f7ac1799
  33. add DEFAULT_TRANSACTION_FEE constant in wallet
    - as this is a shared Core/GUI setting, this makes it easier to keep them
      in sync (also no new includes are needed)
    a485ba361e
  34. Typo Fix In decoderawtransaction Help: s/txid/hex/
    Help text appears to have been copy/pasted from getrawtransaction,
    so it erroneously asked for a txid where rawtransaction hex should appear.
    
    Remove lines which were copy/pasted from getrawtransaction but which
    aren't displayed by decoderawtransaction.
    
    Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
    Rebased-From: 5cc0133 80c521e
    Github-Pull: #4106
    12f18fcc34
  35. qt: fix compile issue in Qt GUI
    This was introduced in 3e1cf9b. Needs a cast to qint64.
    42d3076f42
  36. [Qt] fix Qt slot problem in receivecoinsdialog
    - fixes error from debug.log:
      QMetaObject::connectSlotsByName: No matching signal for
      on_recentRequestsView_selectionChanged(QItemSelection,QItemSelection)
    - small style fixes (e.g. alphabetical ordering if includes etc.)
    - fixes #3992
    f8a7add8be
  37. build: fix: remove error output
    while git not found in path, error is output to console.
    21d1a44f64
  38. Fix script test handling of empty scripts
    Previously an empty script would evaluate to OP_0
    7c8e8f4e48
  39. Test CHECKMULTISIG with m == 0 and n == 0 58c77c6e06
  40. Split up CheckBlock in a block and header version 739ae5f1ab
  41. Split AcceptBlockHeader from AcceptBlock.
    Also modify some connection logic to deal with non-full blocks in the index.
    6bf2f1abf1
  42. script: add CScriptNum class
    This class holds an int64_t and replaces the use of CBigInt for script
    integrals.
    a2e0cdd907
  43. script: switch to CScriptNum usage for scripts 40611e8617
  44. script: switch outside users to CScriptNum 75bb3167df
  45. script: remove bignum dependency e887948da0
  46. script: add additional script tests 2ba5949457
  47. script: Add test for CScriptNum
    Because this class replaces some usages of CBigNum, tests have been added to
    verify that they function the same way. The only difference in their usage is
    the handling of out-of-range numbers.
    
    While operands are constrained to [-0x7FFFFFFF,0x7FFFFFFF], the results may
    overflow. The overflowing result is technically unbounded, but in practice
    it can be no bigger than the result of an operation on two operands. This
    implementation limits them to the size of an int64.
    
    CBigNum was unaware of this constraint, so it allowed for unbounded results,
    which were then checked before use. CScriptNum asserts if an arithmetic
    operation will overflow an int64_t, since scripts are not able to reach those
    numbers anyway. Additionally, CScriptNum will throw an exception when
    constructed from a vector containing more than 4 bytes This mimics the previous
    CastToBigNum behavior.
    40c2e68286
  48. Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants 6af15fec60
  49. Let tx (in)valid tests use any SCRIPT_VERIFY flag
    Previously only P2SH could be set.
    d694d9f2a4
  50. Add rejection of non-null CHECKMULTISIG dummy values
    This is a source of transaction mutability as the dummy value was
    previously not checked and could be modified to something other than the
    usual OP_0 value.
    d58ee0b078
  51. Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails f310050197
  52. Increase IsStandard() scriptSig length
    Removes the limits on number of pubkeys for P2SH CHECKMULTISIG outputs.
    Previously with the 500 byte scriptSig limit there were odd restrictions
    where even a 1-of-12 P2SH could be spent in a standard transaction(1),
    yet multisig scriptPubKey's requiring more signatures quickly ran out of
    scriptSig space.
    
    From a "stuff-data-in-the-blockchain" point of view not much has changed
    as with the prior commit now only allowing the dummy value to be null
    the newly allowed scriptSig space can only be used for signatures. In
    any case, just using more outputs is trivial and doesn't cost much.
    
    1) See 779b519480d8c5346de6e635119c7ee772e97ec872240c45e558f582a37b4b73
       Mined by BTC Guild.
    d2483a5d73
  53. Check redeemScript size does not exceed 520 byte limit
    redeemScripts >520bytes can't be spent due to the
    MAX_SCRIPT_ELEMENT_SIZE limit; previously the addmultisigaddress and
    createmultisig RPC calls would let you violate that limit unknowingly.
    
    Also made the wallet code itself check the redeemScript prior to adding
    it to the wallet, which in the (rare) instance that a user has added an
    invalid oversized redeemScript to their wallet causes an error on
    startup. The affected key isn't added to the wallet; other keys are
    unaffected.
    8f1cdc585d
  54. Also switch the (unused) verification code to low-s instead of even-s.
    a81cd968 introduced a malleability breaker for signatures
    (using an even value for S). In e0e14e43 this was changed to
    the lower of two potential values, rather than the even one.
    Only the signing code was changed though, the (for now unused)
    verification code wasn't adapted.
    72c2842b42
  55. Fix transaction tests
    Conflict between low-s (6fd7ef2) and test updates in d3a33fc.
    19398c5093
  56. Remove NumBlocksOfPeers
    Generally useless information. Only updates on connect time, not after
    that. Peers can easily lie and the median filter is not effective in
    preventing that.
    
    In the past it was used for progress display in the GUI but
    `CheckPoints::guessVerificationProgress` provides a better way that is now used.
    It was too easy to mislead it. Peers do lie about it in practice, see issue #4065.
    
    From the RPC, `getpeerinfo` gives the peer raw values, which are more
    useful.
    f691b13796
  57. Deduplicate shared code between uint160 and uint256 f255f1789a
  58. Exception instead of assigning 0 in case of wrong vector length 656aaba762
  59. Add multiplication and division to uint160/uint256 e89ccdcf28
  60. Move {Get,Set}Compact from bignum to uint256 c481467e50
  61. Deduplicate uint* comparison operator logic 2d320246c5
  62. util: add parseint32 function with strict error reporting
    None of the current integer parsing functions in util
    check whether the result is valid and fits in the range
    of the type. This is required for less sloppy error reporting.
    6276a64081
  63. Use new function parseint32 in SplitHostPort
    Use the new function parseint32 in SplitHostPort instead of calling
    strtol directly.
    ec50ff9de7
  64. net: Add CSubNet class for subnet matching e80f03f71f
  65. rpc: Use netmasks instead of wildcards for IP address matching
    `-rpcallowip` currently has a wacky wildcard-based format. After this
    commit it will accept the more standard format, for example:
    
    - Ranges with netmask 127.0.0.0/255.255.255.0, ::/0
    - Ranges with cidr 12.3.4.5/24, 12:34:56:78:9a:bc:de:00/112
    - Loose IPs ::1, 127.0.0.1
    
    Trying to use the old *?-based format will result in an error message at
    launch.
    5a4eee8a18
  66. Remove unused function WildcardMatch
    No longer necessary after implementing netmask-based matching.
    Also remove a longer-unused function `skipspaces`.
    7793849525
  67. Add tests for BoostAsioToCNetAddr f1d4a51b8b
  68. fixes #4163 944051e153
  69. Reduce bignum.h now it is only needed for scriptnum_tests 3fe1ee002f
  70. Move bignum.h to test/ 2a5d06c9d0
  71. Switch stdout to line buffering
    Use line buffering (instead of block buffering) so that messages arrive
    immediately in systemd-journald, tail -f debug.log, and the like.
    b40c1f968d
  72. Squashed 'src/leveldb/' changes from 9094c7f..7924331
    42dcc7e Merge upstream LevelDB 1.17.
    e353fbc Release LevelDB 1.17
    269fc6c Release LevelDB 1.16
    REVERT: 9094c7f Temporarily revert to writing .sst files instead of .ldb
    
    git-subtree-dir: src/leveldb
    git-subtree-split: 79243314e40ac31d79c68e5658a1d6a64800d50b
    256e20a161
  73. Move base58.h implementation code to base58.cpp 6423856994
  74. Remove dummy PRIszX macros for formatting
    Size specifiers are no longer needed now that we use typesafe tinyformat
    for string formatting, instead of the system's sprintf.
    
    No functional changes.
    
    This continues the work in #3735.
    6e84b25537
  75. rpc: pass errors from async_accept
    According to the [boost::asio documentation](http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept/overload2.html),
    the function signature of the handler must be:
    
        void handler(
          const boost::system::error_code& error // Result of operation.
        );
    
    We were binding *all* the arguments, instead of all but the error,
    resulting in nullary function that never got the error. Fix this
    by adding an input argument substitution.
    85ebd68b08
  76. rpc: Make sure conn object is always cleaned up
    Make sure conn object always gets cleaned up by using a
    `boost::shared_ptr`.
    
    This makes valgrind happy - before this commit, one connection object
    always leaked at shutdown, as well as can avoid other leaks, when
    for example an exception happens.
    
    Also add an explicit Close() to the !ClientAllowed path to make it similar
    to the normal path (I'm not sure whether it is needed, but it
    can't hurt).
    6a5c1c6e71
  77. doc: remove mention of `-rpctimeout` from man page
    That option hasn't existed for a long time.
    a393d81451
  78. rpc: keep track of acceptors, and cancel them in StopRPCThreads
    Fixes #4156.
    
    The problem is that the boost::asio::io_service destructor
    waits for the acceptors to finish (on windows, and boost 1.55).
    
    Fix this by keeping track of the acceptors and cancelling them before
    stopping the event loops.
    9b70146147
  79. qt: periodic language update
    Pull updated translations from Transifex.
    
    Add mn (Mongolian) language.
    
    Do not update English translation for now as we want to keep
    compatibility with 0.9.
    7359f7a482
  80. Fix build in OS X 10.9 3dfdb6575f
  81. Add -rpcbind option to allow binding RPC port on a specific interface
    Add -rpcbind command option to specify binding RPC service on one
    or multiple specific interfaces.
    
    Functionality if -rpcbind is not specified remains the same as before:
    
    - If no -rpcallowip specified, bind on localhost
    - If no -rpcbind specified, bind on any interface
    
    Implements part of #3111.
    0a93770f81
  82. Support IPv6 lookup in bitcoin-cli even when IPv6 only bound on localhost
    First query in the current way (intelligently determining which network
    has a non-localhost interface). If this does not succeed, try plain
    lookup.
    
    Needed for testing.
    
    Fixes #1827 by always allowing IPv6 to be used.
    60cc608bf9
  83. Add Python test for -rpcbind and -rpcallowip
    Add a new test, `rpcbind_test.py`, that extensively tests the new
    `-rpcbind` functionality.
    2b69e1b0f4
  84. switch from boost int types to <stdint.h> 5eda2f1623
  85. json_spirit: #include <stdint.h> 94c7e2bd61
  86. removed a few unnecessary casts 5dac1e2acf
  87. remove ParseString(...) which is never used 7aab87702f
  88. SetupEnvironment() - clean commit 2e8b636a4f
  89. ProcessGetData(): abort if a block file is missing from disk c6194ba8fd
  90. LoadBlockIndexDB(): Require block db reindex if any blk*.dat files are missing. 07a0606945
  91. Remove extraneous c_str 0d5f81a39b
  92. Fix NameError in macdeploy script b1a47feced
  93. Remove fDaemon flag checking on return from main(), which is useless and looks really strange. b9fb1a955f
  94. gitian: Add OSX build descriptors
    Github-Pull: #4185
    Rebased-By: Wladimir J. van der Laan
    Rebased-From: bb5da27, 2288206, 7fe8fe6, f76db78, ebcf375, fa1ed7c, 397e9b8
    45322721b3
  95. qt: Periodic language update a240be8747
  96. Add missing LOCK(cs_main) 694999d01f
  97. Remove forward declaration for non-existent class CCoinsDB
    Found by stephenreed on #bitcoin.dev.
    641e0f308f
  98. Changed access modifier of CWalletInterface from protected to public, thus fixing errors detected in RegisterWallet() by the NetBeans IDE on Ubuntu. e30d2a5815
  99. StephenLReed closed this on May 22, 2014

  100. StephenLReed deleted the branch on May 22, 2014
  101. bitcoin locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC