aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/init/bitcoind.conf2
-rw-r--r--contrib/init/bitcoind.init2
-rw-r--r--contrib/init/bitcoind.openrcconf2
-rw-r--r--contrib/init/bitcoind.service1
-rwxr-xr-xcontrib/linearize/linearize-data.py7
5 files changed, 9 insertions, 5 deletions
diff --git a/contrib/init/bitcoind.conf b/contrib/init/bitcoind.conf
index de4ea0ed52..dde1bd0c4d 100644
--- a/contrib/init/bitcoind.conf
+++ b/contrib/init/bitcoind.conf
@@ -16,7 +16,7 @@ expect fork
respawn
respawn limit 5 120
-kill timeout 60
+kill timeout 600
pre-start script
# this will catch non-existent config files
diff --git a/contrib/init/bitcoind.init b/contrib/init/bitcoind.init
index 0c95baf3a1..19e1f76d09 100644
--- a/contrib/init/bitcoind.init
+++ b/contrib/init/bitcoind.init
@@ -39,7 +39,7 @@ start() {
stop() {
echo -n $"Stopping $prog: "
- killproc $prog
+ killproc $prog -t600
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile
diff --git a/contrib/init/bitcoind.openrcconf b/contrib/init/bitcoind.openrcconf
index f70e25cb5f..c8a22a08d9 100644
--- a/contrib/init/bitcoind.openrcconf
+++ b/contrib/init/bitcoind.openrcconf
@@ -30,4 +30,4 @@
# Note that this will be mapped as argument to start-stop-daemon's
# '--retry' option, which means you can specify a retry schedule
# here. For more information see man 8 start-stop-daemon.
-BITCOIND_SIGTERM_TIMEOUT=60
+BITCOIND_SIGTERM_TIMEOUT=600
diff --git a/contrib/init/bitcoind.service b/contrib/init/bitcoind.service
index 34c3e7b3ab..8b308644b1 100644
--- a/contrib/init/bitcoind.service
+++ b/contrib/init/bitcoind.service
@@ -29,6 +29,7 @@ ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin
Type=forking
PIDFile=/run/bitcoind/bitcoind.pid
Restart=on-failure
+TimeoutStopSec=600
# Directory creation and permissions
####################################
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index 95754ab937..863b22f6b1 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -213,8 +213,11 @@ class BlockDataCopier:
inMagic = inhdr[:4]
if (inMagic != self.settings['netmagic']):
- print("Invalid magic: " + inMagic.hex())
- return
+ # Seek backwards 7 bytes (skipping the first byte in the previous search)
+ # and continue searching from the new position if the magic bytes are not
+ # found.
+ self.inF.seek(-7, os.SEEK_CUR)
+ continue
inLenLE = inhdr[4:]
su = struct.unpack("<I", inLenLE)
inLen = su[0] - 80 # length without header