aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/tidy_datadir.sh59
-rw-r--r--doc/release-notes.txt10
-rw-r--r--src/qt/notificator.cpp2
3 files changed, 68 insertions, 3 deletions
diff --git a/contrib/tidy_datadir.sh b/contrib/tidy_datadir.sh
new file mode 100755
index 0000000000..5d6d826444
--- /dev/null
+++ b/contrib/tidy_datadir.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+if [ -d "$1" ]; then
+ cd "$1"
+else
+ echo "Usage: $0 <datadir>" >&2
+ echo "Removes obsolete Bitcoin database files" >&2
+ exit 1
+fi
+
+LEVEL=0
+if [ -f wallet.dat -a -f addr.dat -a -f blkindex.dat -a -f blk0001.dat ]; then LEVEL=1; fi
+if [ -f wallet.dat -a -f peers.dat -a -f blkindex.dat -a -f blk0001.dat ]; then LEVEL=2; fi
+if [ -f wallet.dat -a -f peers.dat -a -f coins/CURRENT -a -f blktree/CURRENT -a -f blocks/blk00000.dat ]; then LEVEL=3; fi
+if [ -f wallet.dat -a -f peers.dat -a -f chainstate/CURRENT -a -f blocks/index/CURRENT -a -f blocks/blk00000.dat ]; then LEVEL=4; fi
+
+case $LEVEL in
+ 0)
+ echo "Error: no Bitcoin datadir detected."
+ exit 1
+ ;;
+ 1)
+ echo "Detected old Bitcoin datadir (before 0.7)."
+ echo "Nothing to do."
+ exit 0
+ ;;
+ 2)
+ echo "Detected Bitcoin 0.7 datadir."
+ ;;
+ 3)
+ echo "Detected Bitcoin pre-0.8 datadir."
+ ;;
+ 4)
+ echo "Detected Bitcoin 0.8 datadir."
+ ;;
+esac
+
+FILES=""
+DIRS=""
+
+if [ $LEVEL -ge 3 ]; then FILES=$(echo $FILES blk????.dat blkindex.dat); fi
+if [ $LEVEL -ge 2 ]; then FILES=$(echo $FILES addr.dat); fi
+if [ $LEVEL -ge 4 ]; then DIRS=$(echo $DIRS coins blktree); fi
+
+for FILE in $FILES; do
+ if [ -f $FILE ]; then
+ echo "Deleting: $FILE"
+ rm -f $FILE
+ fi
+done
+
+for DIR in $DIRS; do
+ if [ -d $DIR ]; then
+ echo "Deleting: $DIR/"
+ rm -rf $DIR
+ fi
+done
+
+echo "Done."
diff --git a/doc/release-notes.txt b/doc/release-notes.txt
index a25f25569e..414d5d68c9 100644
--- a/doc/release-notes.txt
+++ b/doc/release-notes.txt
@@ -11,7 +11,7 @@ Incompatible Changes
This release no longer maintains a full index of historical transaction ids
by default, so looking up an arbitrary transaction using the getrawtransaction
RPC call will not work. If you need that functionality, you must run once
-with -txindex=1 -reindex=1 to rebuild block-chain indices (see below for more
+with -txindex -reindex to rebuild block-chain indices (see below for more
details).
Improvements
@@ -57,7 +57,8 @@ par : controls how many threads to use to validate transactions. Defaults to the
of CPUs on your machine, use -par=1 to limit to a single CPU.
txindex : maintains an extra index of old, spent transaction ids so they will be found
-by the getrawtransaction JSON-RPC method.
+by the getrawtransaction JSON-RPC method. Can only be set when the database is
+initialized.
reindex : rebuild block and transaction indices from the downloaded block data.
@@ -72,6 +73,11 @@ addnode / getaddednodeinfo methods, to connect to specific peers without restart
importprivkey now takes an optional boolean parameter (default true) to control whether
or not to rescan the blockchain for transactions after importing a new private key.
+gettxout retrieves a single transaction output from the current set of unspent outputs.
+Optionally, the mempool transactions are taken into account.
+
+gettxoutsetinfo calculates statistics about the current set of unspent outputs.
+
Important Bug Fixes
-------------------
diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp
index 8028190b82..628dca1591 100644
--- a/src/qt/notificator.cpp
+++ b/src/qt/notificator.cpp
@@ -113,7 +113,7 @@ FreedesktopImage::FreedesktopImage(const QImage &img):
{
// Convert 00xAARRGGBB to RGBA bytewise (endian-independent) format
QImage tmp = img.convertToFormat(QImage::Format_ARGB32);
- const uint32_t *data = reinterpret_cast<const uint32_t*>(tmp.constBits());
+ const uint32_t *data = reinterpret_cast<const uint32_t*>(tmp.bits());
unsigned int num_pixels = width * height;
image.resize(num_pixels * BYTES_PER_PIXEL);