Browse Source

Merge pull request #6004

c6de7c3 trivial string change in wallet.cpp (the -> that) (Philip Kaufmann)
1e3473d Add operator names to DNS Seed list (Michael Ford)
a21df62 ensure consistent header comment naming conventions (Philip Kaufmann)
9e16cb1 Make 'Default: %u' spacing consistent in help message (Wladimir J. van der Laan)
6cb37a3 [Qt, Trivial] remove two unneeded includes of wallet/db.h (Philip Kaufmann)
68f795e [Qt, Trivial] fix header groupings + space, intdentation fixes (Philip Kaufmann)
985ec17 [Qt, Trivial] misc minor string changes (Philip Kaufmann)
c0555dc depends: latest config.guess and config.sub (Michael Ford)
89fc6b6 Remove leftover strlcpy.h copyright (Rob Van Mieghem)
468aa3b Re-wrote a passage of text that was difficult to understand. (Jason Lewicki)
71ad6bd [Trivial] format sync.h (Philip Kaufmann)
abcec30 Update REST URL to match reality (paveljanik)
447d37e  Use https link to bitcoin.org in Doxygen intro (Michael Ford)
c069234 Fix typo in init.cpp interpration/interpretation (Michael Ford)
52070c8 Removed '()' where used without contents inside (Nicolas Benoit)
30c1db1 Replaced current function names with __func__ in LogPrintf() calls. (Nicolas Benoit)
9bdd03f Point to the Debian 7.8 installer (Michael Ford)
0b2f930 Fix docs for 'complete' field in 'signrawtransaction' response (charlescharles)
c2f2161 Add x86_64* i686* mips* and arm* to depends .gitignore (Michael Ford)
fa535f9 Remove folder and images for bootstrap.md (sandakersmann)
60c1469 [Qt] header group cleanup (Philip Kaufmann)
0.13
Wladimir J. van der Laan 10 years ago
parent
commit
6a0bcb80e4
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 4
      contrib/debian/copyright
  2. 4
      depends/.gitignore
  3. 27
      depends/config.guess
  4. 13
      depends/config.sub
  5. 2
      doc/REST-interface.md
  6. 5
      doc/dnsseed-policy.md
  7. 4
      doc/gitian-building.md
  8. BIN
      doc/img/bootstrap1.png
  9. BIN
      doc/img/bootstrap2.png
  10. BIN
      doc/img/bootstrap4.png
  11. BIN
      doc/img/bootstrap5.png
  12. 2
      src/arith_uint256.h
  13. 2
      src/bitcoind.cpp
  14. 10
      src/chainparams.cpp
  15. 6
      src/consensus/params.h
  16. 6
      src/init.cpp
  17. 34
      src/main.cpp
  18. 1
      src/qt/bitcoin.cpp
  19. 2
      src/qt/coincontroldialog.cpp
  20. 8
      src/qt/forms/sendcoinsentry.ui
  21. 10
      src/qt/guiutil.cpp
  22. 3
      src/qt/recentrequeststablemodel.cpp
  23. 4
      src/qt/sendcoinsdialog.cpp
  24. 12
      src/qt/sendcoinsentry.cpp
  25. 5
      src/qt/splashscreen.cpp
  26. 1
      src/qt/transactiondesc.cpp
  27. 1
      src/qt/walletmodel.cpp
  28. 2
      src/rpcrawtransaction.cpp
  29. 6
      src/support/allocators/secure.h
  30. 6
      src/support/allocators/zeroafterfree.h
  31. 6
      src/support/pagelocker.h
  32. 23
      src/sync.h
  33. 6
      src/wallet/crypter.h
  34. 6
      src/wallet/db.h
  35. 2
      src/wallet/wallet.cpp
  36. 6
      src/wallet/wallet.h
  37. 6
      src/wallet/wallet_ismine.h
  38. 6
      src/wallet/walletdb.h

4
contrib/debian/copyright vendored

@ -15,10 +15,6 @@ Files: src/json/*
Copyright: 2007-2009, John W. Wilkinson Copyright: 2007-2009, John W. Wilkinson
License: Expat License: Expat
Files: src/strlcpy.h
Copyright: 1998, Todd C. Miller <Todd.Miller@courtesan.com>
License: ISC
Files: debian/* Files: debian/*
Copyright: 2010-2011, Jonas Smedegaard <dr@jones.dk> Copyright: 2010-2011, Jonas Smedegaard <dr@jones.dk>
2011, Matt Corallo <matt@bluematt.me> 2011, Matt Corallo <matt@bluematt.me>

4
depends/.gitignore vendored

@ -3,3 +3,7 @@ work/
built/ built/
sources/ sources/
config.site config.site
x86_64*
i686*
mips*
arm*

27
depends/config.guess vendored

@ -2,7 +2,7 @@
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright 1992-2015 Free Software Foundation, Inc. # Copyright 1992-2015 Free Software Foundation, Inc.
timestamp='2015-01-01' timestamp='2015-03-04'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -168,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor # Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown". # portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch" sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)` /sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || \
echo unknown)`
case "${UNAME_MACHINE_ARCH}" in case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;; armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;; arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;; sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;; sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;; sh5el) machine=sh5le-unknown ;;
earmv*)
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
machine=${arch}${endian}-unknown
;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac esac
# The Operating System including object format, if it has switched # The Operating System including object format, if it has switched
# to ELF recently, or will in the future. # to ELF recently, or will in the future.
case "${UNAME_MACHINE_ARCH}" in case "${UNAME_MACHINE_ARCH}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax) arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__ | grep -q __ELF__
@ -197,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
os=netbsd os=netbsd
;; ;;
esac esac
# Determine ABI tags.
case "${UNAME_MACHINE_ARCH}" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
;;
esac
# The OS release # The OS release
# Debian GNU/NetBSD machines have a different userland, and # Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need # thus, need a distinct triplet. However, they do not need
@ -213,7 +227,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form: # contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}" echo "${machine}-${os}${release}${abi}"
exit ;; exit ;;
*:Bitrig:*:*) *:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@ -933,6 +947,9 @@ EOF
crisv32:Linux:*:*) crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC} echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;; exit ;;
e2k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
frv:Linux:*:*) frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;; exit ;;

13
depends/config.sub vendored

@ -2,7 +2,7 @@
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright 1992-2015 Free Software Foundation, Inc. # Copyright 1992-2015 Free Software Foundation, Inc.
timestamp='2015-01-01' timestamp='2015-03-08'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -117,7 +117,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*) storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
@ -259,7 +259,7 @@ case $basic_machine in
| bfin \ | bfin \
| c4x | c8051 | clipper \ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| epiphany \ | e2k | epiphany \
| fido | fr30 | frv | ft32 \ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \ | hexagon \
@ -381,7 +381,7 @@ case $basic_machine in
| c[123]* | c30-* | [cjt]90-* | c4x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
@ -518,6 +518,9 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-aros os=-aros
;; ;;
asmjs)
basic_machine=asmjs-unknown
;;
aux) aux)
basic_machine=m68k-apple basic_machine=m68k-apple
os=-aux os=-aux
@ -1373,7 +1376,7 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \ | -aos* | -aros* | -cloudabi* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \

2
doc/REST-interface.md

@ -36,4 +36,4 @@ Only supports JSON as output format.
Risks Risks
------------- -------------
Running a webbrowser on the same node with a REST enabled bitcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:1234/tx/json/1234567890">` which might break the nodes privacy. Running a webbrowser on the same node with a REST enabled bitcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:8332/rest/tx/1234567890.json">` which might break the nodes privacy.

5
doc/dnsseed-policy.md

@ -7,9 +7,8 @@ As such, DNS seeds must be run by entities which have some minimum
level of trust within the Bitcoin community. level of trust within the Bitcoin community.
Other implementations of Bitcoin software may also use the same Other implementations of Bitcoin software may also use the same
seeds and may be more exposed. In light of this exposure this seeds and may be more exposed. In light of this exposure, this
document establishes some basic expectations for the expectations document establishes some basic expectations for operating dnsseeds.
for the operation of dnsseeds.
0. A DNS seed operating organization or person is expected 0. A DNS seed operating organization or person is expected
to follow good host security practices and maintain control of to follow good host security practices and maintain control of

4
doc/gitian-building.md

@ -74,11 +74,11 @@ In the VirtualBox GUI click "Create" and choose the following parameters in the
- Disk size: at least 40GB; as low as 20GB *may* be possible, but better to err on the safe side - Disk size: at least 40GB; as low as 20GB *may* be possible, but better to err on the safe side
- Push the `Create` button - Push the `Create` button
Get the [Debian 7.7 net installer](http://cdimage.debian.org/debian-cd/7.7.0/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso) (a more recent minor version should also work, see also [Debian Network installation](https://www.debian.org/CD/netinst/)). Get the [Debian 7.8 net installer](http://cdimage.debian.org/debian-cd/7.8.0/amd64/iso-cd/debian-7.8.0-amd64-netinst.iso) (a more recent minor version should also work, see also [Debian Network installation](https://www.debian.org/CD/netinst/)).
This DVD image can be validated using a SHA256 hashing tool, for example on This DVD image can be validated using a SHA256 hashing tool, for example on
Unixy OSes by entering the following in a terminal: Unixy OSes by entering the following in a terminal:
echo "d440e85b4121f94608748139f25dbce1ad36771348b002fe07d4d44b9d9e623f debian-7.7.0-amd64-netinst.iso" | sha256sum -c echo "e39c36d6adc0fd86c6edb0e03e22919086c883b37ca194d063b8e3e8f6ff6a3a debian-7.8.0-amd64-netinst.iso" | sha256sum -c
# (must return OK) # (must return OK)
After creating the VM, we need to configure it. After creating the VM, we need to configure it.

BIN
doc/img/bootstrap1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

BIN
doc/img/bootstrap2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

BIN
doc/img/bootstrap4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

BIN
doc/img/bootstrap5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

2
src/arith_uint256.h

@ -287,4 +287,4 @@ public:
uint256 ArithToUint256(const arith_uint256 &); uint256 ArithToUint256(const arith_uint256 &);
arith_uint256 UintToArith256(const uint256 &); arith_uint256 UintToArith256(const uint256 &);
#endif // BITCOIN_UINT256_H #endif // BITCOIN_ARITH_UINT256_H

2
src/bitcoind.cpp

@ -21,7 +21,7 @@
* *
* \section intro_sec Introduction * \section intro_sec Introduction
* *
* This is the developer documentation of the reference client for an experimental new digital currency called Bitcoin (http://www.bitcoin.org/), * This is the developer documentation of the reference client for an experimental new digital currency called Bitcoin (https://www.bitcoin.org/),
* which enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate * which enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate
* with no central authority: managing transactions and issuing money are carried out collectively by the network. * with no central authority: managing transactions and issuing money are carried out collectively by the network.
* *

10
src/chainparams.cpp

@ -151,11 +151,11 @@ public:
assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f")); assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b")); assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be")); vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be")); // Pieter Wuille
vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo
vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr
vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Addy Yeow
vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0); base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5); base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);

6
src/consensus/params.h

@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_CONSENSUS_CONSENSUS_PARAMS_H #ifndef BITCOIN_CONSENSUS_PARAMS_H
#define BITCOIN_CONSENSUS_CONSENSUS_PARAMS_H #define BITCOIN_CONSENSUS_PARAMS_H
#include "uint256.h" #include "uint256.h"
@ -28,4 +28,4 @@ struct Params {
}; };
} // namespace Consensus } // namespace Consensus
#endif // BITCOIN_CONSENSUS_CONSENSUS_PARAMS_H #endif // BITCOIN_CONSENSUS_PARAMS_H

6
src/init.cpp

@ -123,7 +123,7 @@ public:
LogPrintf("Error reading from database: %s\n", e.what()); LogPrintf("Error reading from database: %s\n", e.what());
// Starting the shutdown sequence and returning false to the caller would be // Starting the shutdown sequence and returning false to the caller would be
// interpreted as 'entry not found' (as opposed to unable to read data), and // interpreted as 'entry not found' (as opposed to unable to read data), and
// could lead to invalid interpration. Just exit immediately, as we can't // could lead to invalid interpretation. Just exit immediately, as we can't
// continue anyway, and all writes should be atomic. // continue anyway, and all writes should be atomic.
abort(); abort();
} }
@ -365,8 +365,8 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), 1)); strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), 1));
if (GetBoolArg("-help-debug", false)) if (GetBoolArg("-help-debug", false))
{ {
strUsage += HelpMessageOpt("-limitfreerelay=<n>", strprintf(_("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:%u)"), 15)); strUsage += HelpMessageOpt("-limitfreerelay=<n>", strprintf(_("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default: %u)"), 15));
strUsage += HelpMessageOpt("-relaypriority", strprintf(_("Require high priority for relaying free or low-fee transactions (default:%u)"), 1)); strUsage += HelpMessageOpt("-relaypriority", strprintf(_("Require high priority for relaying free or low-fee transactions (default: %u)"), 1));
strUsage += HelpMessageOpt("-maxsigcachesize=<n>", strprintf(_("Limit size of signature cache to <n> entries (default: %u)"), 50000)); strUsage += HelpMessageOpt("-maxsigcachesize=<n>", strprintf(_("Limit size of signature cache to <n> entries (default: %u)"), 50000));
} }
strUsage += HelpMessageOpt("-minrelaytxfee=<amt>", strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK()))); strUsage += HelpMessageOpt("-minrelaytxfee=<amt>", strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())));

34
src/main.cpp

@ -1233,14 +1233,14 @@ void CheckForkWarningConditions()
} }
if (pindexBestForkTip && pindexBestForkBase) if (pindexBestForkTip && pindexBestForkBase)
{ {
LogPrintf("CheckForkWarningConditions: Warning: Large valid fork found\n forking the chain at height %d (%s)\n lasting to height %d (%s).\nChain state database corruption likely.\n", LogPrintf("%s: Warning: Large valid fork found\n forking the chain at height %d (%s)\n lasting to height %d (%s).\nChain state database corruption likely.\n", __func__,
pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(), pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(),
pindexBestForkTip->nHeight, pindexBestForkTip->phashBlock->ToString()); pindexBestForkTip->nHeight, pindexBestForkTip->phashBlock->ToString());
fLargeWorkForkFound = true; fLargeWorkForkFound = true;
} }
else else
{ {
LogPrintf("CheckForkWarningConditions: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n"); LogPrintf("%s: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n", __func__);
fLargeWorkInvalidChainFound = true; fLargeWorkInvalidChainFound = true;
} }
} }
@ -1298,10 +1298,10 @@ void Misbehaving(NodeId pnode, int howmuch)
int banscore = GetArg("-banscore", 100); int banscore = GetArg("-banscore", 100);
if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore) if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore)
{ {
LogPrintf("Misbehaving: %s (%d -> %d) BAN THRESHOLD EXCEEDED\n", state->name, state->nMisbehavior-howmuch, state->nMisbehavior); LogPrintf("%s: %s (%d -> %d) BAN THRESHOLD EXCEEDED\n", __func__, state->name, state->nMisbehavior-howmuch, state->nMisbehavior);
state->fShouldBan = true; state->fShouldBan = true;
} else } else
LogPrintf("Misbehaving: %s (%d -> %d)\n", state->name, state->nMisbehavior-howmuch, state->nMisbehavior); LogPrintf("%s: %s (%d -> %d)\n", __func__, state->name, state->nMisbehavior-howmuch, state->nMisbehavior);
} }
void static InvalidChainFound(CBlockIndex* pindexNew) void static InvalidChainFound(CBlockIndex* pindexNew)
@ -1309,11 +1309,11 @@ void static InvalidChainFound(CBlockIndex* pindexNew)
if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork) if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
pindexBestInvalid = pindexNew; pindexBestInvalid = pindexNew;
LogPrintf("InvalidChainFound: invalid block=%s height=%d log2_work=%.8g date=%s\n", LogPrintf("%s: invalid block=%s height=%d log2_work=%.8g date=%s\n", __func__,
pindexNew->GetBlockHash().ToString(), pindexNew->nHeight, pindexNew->GetBlockHash().ToString(), pindexNew->nHeight,
log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S",
pindexNew->GetBlockTime())); pindexNew->GetBlockTime()));
LogPrintf("InvalidChainFound: current best=%s height=%d log2_work=%.8g date=%s\n", LogPrintf("%s: current best=%s height=%d log2_work=%.8g date=%s\n", __func__,
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0),
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime())); DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()));
CheckForkWarningConditions(); CheckForkWarningConditions();
@ -1921,7 +1921,7 @@ void static UpdateTip(CBlockIndex *pindexNew) {
nTimeBestReceived = GetTime(); nTimeBestReceived = GetTime();
mempool.AddTransactionsUpdated(1); mempool.AddTransactionsUpdated(1);
LogPrintf("UpdateTip: new best=%s height=%d log2_work=%.8g tx=%lu date=%s progress=%f cache=%u\n", LogPrintf("%s: new best=%s height=%d log2_work=%.8g tx=%lu date=%s progress=%f cache=%u\n", __func__,
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), (unsigned long)chainActive.Tip()->nChainTx, chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), (unsigned long)chainActive.Tip()->nChainTx,
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
Checkpoints::GuessVerificationProgress(chainActive.Tip()), (unsigned int)pcoinsTip->GetCacheSize()); Checkpoints::GuessVerificationProgress(chainActive.Tip()), (unsigned int)pcoinsTip->GetCacheSize());
@ -1941,7 +1941,7 @@ void static UpdateTip(CBlockIndex *pindexNew) {
pindex = pindex->pprev; pindex = pindex->pprev;
} }
if (nUpgraded > 0) if (nUpgraded > 0)
LogPrintf("SetBestChain: %d of last 100 blocks above version %d\n", nUpgraded, (int)CBlock::CURRENT_VERSION); LogPrintf("%s: %d of last 100 blocks above version %d\n", __func__, nUpgraded, (int)CBlock::CURRENT_VERSION);
if (nUpgraded > 100/2) if (nUpgraded > 100/2)
{ {
// strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user: // strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
@ -2936,7 +2936,7 @@ bool static LoadBlockIndexDB()
// Check whether we have a transaction index // Check whether we have a transaction index
pblocktree->ReadFlag("txindex", fTxIndex); pblocktree->ReadFlag("txindex", fTxIndex);
LogPrintf("LoadBlockIndexDB(): transaction index %s\n", fTxIndex ? "enabled" : "disabled"); LogPrintf("%s: transaction index %s\n", __func__, fTxIndex ? "enabled" : "disabled");
// Load pointer to end of best chain // Load pointer to end of best chain
BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock()); BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
@ -2946,7 +2946,7 @@ bool static LoadBlockIndexDB()
PruneBlockIndexCandidates(); PruneBlockIndexCandidates();
LogPrintf("LoadBlockIndexDB(): hashBestChain=%s height=%d date=%s progress=%f\n", LogPrintf("%s: hashBestChain=%s height=%d date=%s progress=%f\n", __func__,
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(),
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
Checkpoints::GuessVerificationProgress(chainActive.Tip())); Checkpoints::GuessVerificationProgress(chainActive.Tip()));
@ -3492,7 +3492,7 @@ void static ProcessGetData(CNode* pfrom)
send = mi->second->IsValid(BLOCK_VALID_SCRIPTS) && (pindexBestHeader != NULL) && send = mi->second->IsValid(BLOCK_VALID_SCRIPTS) && (pindexBestHeader != NULL) &&
(mi->second->GetBlockTime() > pindexBestHeader->GetBlockTime() - 30 * 24 * 60 * 60); (mi->second->GetBlockTime() > pindexBestHeader->GetBlockTime() - 30 * 24 * 60 * 60);
if (!send) { if (!send) {
LogPrintf("ProcessGetData(): ignoring request from peer=%i for old block that isn't in the main chain\n", pfrom->GetId()); LogPrintf("%s: ignoring request from peer=%i for old block that isn't in the main chain\n", __func__, pfrom->GetId());
} }
} }
} }
@ -4394,7 +4394,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
bool ProcessMessages(CNode* pfrom) bool ProcessMessages(CNode* pfrom)
{ {
//if (fDebug) //if (fDebug)
// LogPrintf("ProcessMessages(%u messages)\n", pfrom->vRecvMsg.size()); // LogPrintf("%s(%u messages)\n", __func__, pfrom->vRecvMsg.size());
// //
// Message format // Message format
@ -4422,7 +4422,7 @@ bool ProcessMessages(CNode* pfrom)
CNetMessage& msg = *it; CNetMessage& msg = *it;
//if (fDebug) //if (fDebug)
// LogPrintf("ProcessMessages(message %u msgsz, %u bytes, complete:%s)\n", // LogPrintf("%s(message %u msgsz, %u bytes, complete:%s)\n", __func__,
// msg.hdr.nMessageSize, msg.vRecv.size(), // msg.hdr.nMessageSize, msg.vRecv.size(),
// msg.complete() ? "Y" : "N"); // msg.complete() ? "Y" : "N");
@ -4458,7 +4458,7 @@ bool ProcessMessages(CNode* pfrom)
unsigned int nChecksum = ReadLE32((unsigned char*)&hash); unsigned int nChecksum = ReadLE32((unsigned char*)&hash);
if (nChecksum != hdr.nChecksum) if (nChecksum != hdr.nChecksum)
{ {
LogPrintf("ProcessMessages(%s, %u bytes): CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n", LogPrintf("%s(%s, %u bytes): CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n", __func__,
SanitizeString(strCommand), nMessageSize, nChecksum, hdr.nChecksum); SanitizeString(strCommand), nMessageSize, nChecksum, hdr.nChecksum);
continue; continue;
} }
@ -4476,12 +4476,12 @@ bool ProcessMessages(CNode* pfrom)
if (strstr(e.what(), "end of data")) if (strstr(e.what(), "end of data"))
{ {
// Allow exceptions from under-length message on vRecv // Allow exceptions from under-length message on vRecv
LogPrintf("ProcessMessages(%s, %u bytes): Exception '%s' caught, normally caused by a message being shorter than its stated length\n", SanitizeString(strCommand), nMessageSize, e.what()); LogPrintf("%s(%s, %u bytes): Exception '%s' caught, normally caused by a message being shorter than its stated length\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
} }
else if (strstr(e.what(), "size too large")) else if (strstr(e.what(), "size too large"))
{ {
// Allow exceptions from over-long size // Allow exceptions from over-long size
LogPrintf("ProcessMessages(%s, %u bytes): Exception '%s' caught\n", SanitizeString(strCommand), nMessageSize, e.what()); LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
} }
else else
{ {
@ -4498,7 +4498,7 @@ bool ProcessMessages(CNode* pfrom)
} }
if (!fRet) if (!fRet)
LogPrintf("ProcessMessage(%s, %u bytes) FAILED peer=%d\n", SanitizeString(strCommand), nMessageSize, pfrom->id); LogPrintf("%s(%s, %u bytes) FAILED peer=%d\n", __func__, SanitizeString(strCommand), nMessageSize, pfrom->id);
break; break;
} }

1
src/qt/bitcoin.cpp

@ -107,7 +107,6 @@ static QString GetLangTerritory()
/** Set up translations */ /** Set up translations */
static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTranslator, QTranslator &translatorBase, QTranslator &translator) static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTranslator, QTranslator &translatorBase, QTranslator &translator)
{ {
// Remove old translators // Remove old translators
QApplication::removeTranslator(&qtTranslatorBase); QApplication::removeTranslator(&qtTranslatorBase);
QApplication::removeTranslator(&qtTranslator); QApplication::removeTranslator(&qtTranslator);

2
src/qt/coincontroldialog.cpp

@ -8,12 +8,12 @@
#include "addresstablemodel.h" #include "addresstablemodel.h"
#include "bitcoinunits.h" #include "bitcoinunits.h"
#include "guiutil.h" #include "guiutil.h"
#include "init.h"
#include "optionsmodel.h" #include "optionsmodel.h"
#include "scicon.h" #include "scicon.h"
#include "walletmodel.h" #include "walletmodel.h"
#include "coincontrol.h" #include "coincontrol.h"
#include "init.h"
#include "main.h" #include "main.h"
#include "wallet/wallet.h" #include "wallet/wallet.h"

8
src/qt/forms/sendcoinsentry.ui

@ -195,7 +195,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QFrame" name="SendCoins_InsecurePaymentRequest"> <widget class="QFrame" name="SendCoins_UnauthenticatedPaymentRequest">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
@ -612,7 +612,7 @@
</palette> </palette>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>This is an unverified payment request.</string> <string>This is an unauthenticated payment request.</string>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>true</bool> <bool>true</bool>
@ -700,7 +700,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QFrame" name="SendCoins_SecurePaymentRequest"> <widget class="QFrame" name="SendCoins_AuthenticatedPaymentRequest">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
@ -1144,7 +1144,7 @@
</palette> </palette>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>This is a verified payment request.</string> <string>This is an authenticated payment request.</string>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>true</bool> <bool>true</bool>

10
src/qt/guiutil.cpp

@ -741,14 +741,14 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
CFURLRef currentItemURL = NULL; CFURLRef currentItemURL = NULL;
#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 10100 #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 10100
if(&LSSharedFileListItemCopyResolvedURL) if(&LSSharedFileListItemCopyResolvedURL)
currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, NULL); currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, NULL);
#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 10100 #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 10100
else else
LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL); LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL);
#endif #endif
#else #else
LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL); LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL);
#endif #endif
if(currentItemURL && CFEqual(currentItemURL, findUrl)) { if(currentItemURL && CFEqual(currentItemURL, findUrl)) {

3
src/qt/recentrequeststablemodel.cpp

@ -5,9 +5,10 @@
#include "recentrequeststablemodel.h" #include "recentrequeststablemodel.h"
#include "bitcoinunits.h" #include "bitcoinunits.h"
#include "clientversion.h"
#include "guiutil.h" #include "guiutil.h"
#include "optionsmodel.h" #include "optionsmodel.h"
#include "clientversion.h"
#include "streams.h" #include "streams.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>

4
src/qt/sendcoinsdialog.cpp

@ -274,11 +274,11 @@ void SendCoinsDialog::on_sendButton_clicked()
recipientElement = tr("%1 to %2").arg(amount, address); recipientElement = tr("%1 to %2").arg(amount, address);
} }
} }
else if(!rcp.authenticatedMerchant.isEmpty()) // secure payment request else if(!rcp.authenticatedMerchant.isEmpty()) // authenticated payment request
{ {
recipientElement = tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.authenticatedMerchant)); recipientElement = tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.authenticatedMerchant));
} }
else // insecure payment request else // unauthenticated payment request
{ {
recipientElement = tr("%1 to %2").arg(amount, address); recipientElement = tr("%1 to %2").arg(amount, address);
} }

12
src/qt/sendcoinsentry.cpp

@ -99,11 +99,11 @@ void SendCoinsEntry::clear()
ui->messageTextLabel->clear(); ui->messageTextLabel->clear();
ui->messageTextLabel->hide(); ui->messageTextLabel->hide();
ui->messageLabel->hide(); ui->messageLabel->hide();
// clear UI elements for insecure payment request // clear UI elements for unauthenticated payment request
ui->payTo_is->clear(); ui->payTo_is->clear();
ui->memoTextLabel_is->clear(); ui->memoTextLabel_is->clear();
ui->payAmount_is->clear(); ui->payAmount_is->clear();
// clear UI elements for secure payment request // clear UI elements for authenticated payment request
ui->payTo_s->clear(); ui->payTo_s->clear();
ui->memoTextLabel_s->clear(); ui->memoTextLabel_s->clear();
ui->payAmount_s->clear(); ui->payAmount_s->clear();
@ -190,21 +190,21 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
if (recipient.paymentRequest.IsInitialized()) // payment request if (recipient.paymentRequest.IsInitialized()) // payment request
{ {
if (recipient.authenticatedMerchant.isEmpty()) // insecure if (recipient.authenticatedMerchant.isEmpty()) // unauthenticated
{ {
ui->payTo_is->setText(recipient.address); ui->payTo_is->setText(recipient.address);
ui->memoTextLabel_is->setText(recipient.message); ui->memoTextLabel_is->setText(recipient.message);
ui->payAmount_is->setValue(recipient.amount); ui->payAmount_is->setValue(recipient.amount);
ui->payAmount_is->setReadOnly(true); ui->payAmount_is->setReadOnly(true);
setCurrentWidget(ui->SendCoins_InsecurePaymentRequest); setCurrentWidget(ui->SendCoins_UnauthenticatedPaymentRequest);
} }
else // secure else // authenticated
{ {
ui->payTo_s->setText(recipient.authenticatedMerchant); ui->payTo_s->setText(recipient.authenticatedMerchant);
ui->memoTextLabel_s->setText(recipient.message); ui->memoTextLabel_s->setText(recipient.message);
ui->payAmount_s->setValue(recipient.amount); ui->payAmount_s->setValue(recipient.amount);
ui->payAmount_s->setReadOnly(true); ui->payAmount_s->setReadOnly(true);
setCurrentWidget(ui->SendCoins_SecurePaymentRequest); setCurrentWidget(ui->SendCoins_AuthenticatedPaymentRequest);
} }
} }
else // normal payment else // normal payment

5
src/qt/splashscreen.cpp

@ -4,11 +4,12 @@
#include "splashscreen.h" #include "splashscreen.h"
#include "networkstyle.h"
#include "clientversion.h" #include "clientversion.h"
#include "init.h" #include "init.h"
#include "networkstyle.h"
#include "ui_interface.h"
#include "util.h" #include "util.h"
#include "ui_interface.h"
#include "version.h" #include "version.h"
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET

1
src/qt/transactiondesc.cpp

@ -10,7 +10,6 @@
#include "transactionrecord.h" #include "transactionrecord.h"
#include "base58.h" #include "base58.h"
#include "wallet/db.h"
#include "main.h" #include "main.h"
#include "script/script.h" #include "script/script.h"
#include "timedata.h" #include "timedata.h"

1
src/qt/walletmodel.cpp

@ -12,7 +12,6 @@
#include "transactiontablemodel.h" #include "transactiontablemodel.h"
#include "base58.h" #include "base58.h"
#include "wallet/db.h"
#include "keystore.h" #include "keystore.h"
#include "main.h" #include "main.h"
#include "sync.h" #include "sync.h"

2
src/rpcrawtransaction.cpp

@ -419,7 +419,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
"\nResult:\n" "\nResult:\n"
"{\n" "{\n"
" \"hex\": \"value\", (string) The raw transaction with signature(s) (hex-encoded string)\n" " \"hex\": \"value\", (string) The raw transaction with signature(s) (hex-encoded string)\n"
" \"complete\": n (numeric) if transaction has a complete set of signature (0 if not)\n" " \"complete\": true|false (boolean) if transaction has a complete set of signature\n"
"}\n" "}\n"
"\nExamples:\n" "\nExamples:\n"

6
src/support/allocators/secure.h

@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_ALLOCATORS_SECURE_H #ifndef BITCOIN_SUPPORT_ALLOCATORS_SECURE_H
#define BITCOIN_ALLOCATORS_SECURE_H #define BITCOIN_SUPPORT_ALLOCATORS_SECURE_H
#include "support/pagelocker.h" #include "support/pagelocker.h"
@ -59,4 +59,4 @@ struct secure_allocator : public std::allocator<T> {
// This is exactly like std::string, but with a custom allocator. // This is exactly like std::string, but with a custom allocator.
typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString; typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString;
#endif // BITCOIN_ALLOCATORS_SECURE_H #endif // BITCOIN_SUPPORT_ALLOCATORS_SECURE_H

6
src/support/allocators/zeroafterfree.h

@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_ALLOCATORS_ZEROAFTERFREE_H #ifndef BITCOIN_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
#define BITCOIN_ALLOCATORS_ZEROAFTERFREE_H #define BITCOIN_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
#include "support/cleanse.h" #include "support/cleanse.h"
@ -45,4 +45,4 @@ struct zero_after_free_allocator : public std::allocator<T> {
// Byte-vector that clears its contents before deletion. // Byte-vector that clears its contents before deletion.
typedef std::vector<char, zero_after_free_allocator<char> > CSerializeData; typedef std::vector<char, zero_after_free_allocator<char> > CSerializeData;
#endif // BITCOIN_ALLOCATORS_ZEROAFTERFREE_H #endif // BITCOIN_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H

6
src/support/pagelocker.h

@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_ALLOCATORS_PAGELOCKER_H #ifndef BITCOIN_SUPPORT_PAGELOCKER_H
#define BITCOIN_ALLOCATORS_PAGELOCKER_H #define BITCOIN_SUPPORT_PAGELOCKER_H
#include "support/cleanse.h" #include "support/cleanse.h"
@ -175,4 +175,4 @@ void UnlockObject(const T& t)
LockedPageManager::Instance().UnlockRange((void*)(&t), sizeof(T)); LockedPageManager::Instance().UnlockRange((void*)(&t), sizeof(T));
} }
#endif // BITCOIN_ALLOCATORS_PAGELOCKER_H #endif // BITCOIN_SUPPORT_PAGELOCKER_H

23
src/sync.h

@ -21,9 +21,6 @@
//////////////////////////////////////////////// ////////////////////////////////////////////////
/* /*
CCriticalSection mutex; CCriticalSection mutex;
boost::recursive_mutex mutex; boost::recursive_mutex mutex;
@ -42,20 +39,18 @@ ENTER_CRITICAL_SECTION(mutex); // no RAII
LEAVE_CRITICAL_SECTION(mutex); // no RAII LEAVE_CRITICAL_SECTION(mutex); // no RAII
mutex.unlock(); mutex.unlock();
*/ */
/////////////////////////////// ///////////////////////////////
// // // //
// THE ACTUAL IMPLEMENTATION // // THE ACTUAL IMPLEMENTATION //
// // // //
/////////////////////////////// ///////////////////////////////
// Template mixin that adds -Wthread-safety locking annotations to a /**
// subset of the mutex API. * Template mixin that adds -Wthread-safety locking
* annotations to a subset of the mutex API.
*/
template <typename PARENT> template <typename PARENT>
class LOCKABLE AnnotatedMixin : public PARENT class LOCKABLE AnnotatedMixin : public PARENT
{ {
@ -76,8 +71,10 @@ public:
} }
}; };
/** Wrapped boost mutex: supports recursive locking, but no waiting */ /**
// TODO: We should move away from using the recursive lock by default. * Wrapped boost mutex: supports recursive locking, but no waiting
* TODO: We should move away from using the recursive lock by default.
*/
typedef AnnotatedMixin<boost::recursive_mutex> CCriticalSection; typedef AnnotatedMixin<boost::recursive_mutex> CCriticalSection;
/** Wrapped boost mutex: supports waiting but not recursive locking */ /** Wrapped boost mutex: supports waiting but not recursive locking */
@ -92,9 +89,7 @@ void LeaveCritical();
std::string LocksHeld(); std::string LocksHeld();
void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs); void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs);
#else #else
void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {}
{
}
void static inline LeaveCritical() {} void static inline LeaveCritical() {}
void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) {} void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) {}
#endif #endif

6
src/wallet/crypter.h

@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_CRYPTER_H #ifndef BITCOIN_WALLET_CRYPTER_H
#define BITCOIN_CRYPTER_H #define BITCOIN_WALLET_CRYPTER_H
#include "keystore.h" #include "keystore.h"
#include "serialize.h" #include "serialize.h"
@ -193,4 +193,4 @@ public:
boost::signals2::signal<void (CCryptoKeyStore* wallet)> NotifyStatusChanged; boost::signals2::signal<void (CCryptoKeyStore* wallet)> NotifyStatusChanged;
}; };
#endif // BITCOIN_CRYPTER_H #endif // BITCOIN_WALLET_CRYPTER_H

6
src/wallet/db.h

@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_DB_H #ifndef BITCOIN_WALLET_DB_H
#define BITCOIN_DB_H #define BITCOIN_WALLET_DB_H
#include "clientversion.h" #include "clientversion.h"
#include "serialize.h" #include "serialize.h"
@ -307,4 +307,4 @@ public:
bool static Rewrite(const std::string& strFile, const char* pszSkip = NULL); bool static Rewrite(const std::string& strFile, const char* pszSkip = NULL);
}; };
#endif // BITCOIN_DB_H #endif // BITCOIN_WALLET_DB_H

2
src/wallet/wallet.cpp

@ -2038,7 +2038,7 @@ DBErrors CWallet::LoadWallet(bool& fFirstRunRet)
setKeyPool.clear(); setKeyPool.clear();
// Note: can't top-up keypool here, because wallet is locked. // Note: can't top-up keypool here, because wallet is locked.
// User will be prompted to unlock wallet the next operation // User will be prompted to unlock wallet the next operation
// the requires a new key. // that requires a new key.
} }
} }

6
src/wallet/wallet.h

@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_WALLET_H #ifndef BITCOIN_WALLET_WALLET_H
#define BITCOIN_WALLET_H #define BITCOIN_WALLET_WALLET_H
#include "amount.h" #include "amount.h"
#include "key.h" #include "key.h"
@ -869,4 +869,4 @@ private:
std::vector<char> _ssExtra; std::vector<char> _ssExtra;
}; };
#endif // BITCOIN_WALLET_H #endif // BITCOIN_WALLET_WALLET_H

6
src/wallet/wallet_ismine.h

@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_WALLET_ISMINE_H #ifndef BITCOIN_WALLET_WALLET_ISMINE_H
#define BITCOIN_WALLET_ISMINE_H #define BITCOIN_WALLET_WALLET_ISMINE_H
#include "key.h" #include "key.h"
#include "script/standard.h" #include "script/standard.h"
@ -26,4 +26,4 @@ typedef uint8_t isminefilter;
isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey); isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest); isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
#endif // BITCOIN_WALLET_ISMINE_H #endif // BITCOIN_WALLET_WALLET_ISMINE_H

6
src/wallet/walletdb.h

@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_WALLETDB_H #ifndef BITCOIN_WALLET_WALLETDB_H
#define BITCOIN_WALLETDB_H #define BITCOIN_WALLET_WALLETDB_H
#include "amount.h" #include "amount.h"
#include "wallet/db.h" #include "wallet/db.h"
@ -140,4 +140,4 @@ private:
bool BackupWallet(const CWallet& wallet, const std::string& strDest); bool BackupWallet(const CWallet& wallet, const std::string& strDest);
void ThreadFlushWalletDB(const std::string& strFile); void ThreadFlushWalletDB(const std::string& strFile);
#endif // BITCOIN_WALLETDB_H #endif // BITCOIN_WALLET_WALLETDB_H

Loading…
Cancel
Save