Skip to content

Commit

Permalink
Merge pull request #266 from syscoin/dev-3.x
Browse files Browse the repository at this point in the history
Dev 3.x

Former-commit-id: 79c3a0a
  • Loading branch information
willyko committed Aug 23, 2018
2 parents d0af552 + 9f757c7 commit 106e4c3
Show file tree
Hide file tree
Showing 606 changed files with 5,298 additions and 2,861 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ syscoin-cli
syscoind
syscoin-qt
make
contrib/devtools/split-debug.sh
4 changes: 2 additions & 2 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
The MIT License (MIT)

Copyright (c) 2009-2016 The syscoin Core developers
Copyright (c) 2009-2017 The Bitcoin Core developers
Copyright (c) 2014-2017 The Dash Core developers
Copyright (c) 2014-2017 The Syscoin Core developers
Copyright (c) 2014-2018 The Syscoin Core developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Copyright (c) 2014-2017 The Syscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
3 changes: 2 additions & 1 deletion build-aux/m4/syscoin_find_bdb48.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dnl Copyright (c) 2013-2015 The Syscoin Core developers
dnl Copyright (c) 2013-2015 The Bitcoin Core developers
dnl Copyright (c) 2014-2017 The Syscoin Core developers
dnl Distributed under the MIT software license, see the accompanying
dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
4 changes: 2 additions & 2 deletions build-aux/m4/syscoin_qt.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dnl Copyright (c) 2013-2016 The Syscoin Core developers
dnl Copyright (c) 2013-2016 The Bitcoin Core developers
dnl Copyright (c) 2014-2017 The Syscoin Core developers
dnl Distributed under the MIT software license, see the accompanying
dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -536,4 +537,3 @@ AC_DEFUN([_SYSCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
CXXFLAGS="$TEMP_CXXFLAGS"
LIBS="$TEMP_LIBS"
])
3 changes: 2 additions & 1 deletion build-aux/m4/syscoin_subdir_to_include.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dnl Copyright (c) 2013-2014 The Syscoin Core developers
dnl Copyright (c) 2013-2014 The Bitcoin Core developers
dnl Copyright (c) 2014-2017 The Syscoin Core developers
dnl Distributed under the MIT software license, see the accompanying
dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 6)
define(_CLIENT_VERSION_BUILD, 2)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_DASH_VERSION_MAJOR, 0)
define(_DASH_VERSION_MINOR, 12)
Expand Down
7 changes: 7 additions & 0 deletions contrib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ tests each pull and when master is tested using jenkins.

### [Verify SF Binaries](/contrib/verifysfbinaries) ###
This script attempts to download and verify the signature file SHA256SUMS.asc from SourceForge.

Command Line Tools
---------------------

### [Bash Completion](/contrib/bash-completion.md) ###
Bash completion scripts for `syscoind` and `syscoin-cli`.

18 changes: 18 additions & 0 deletions contrib/_osx.bash-completion
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This function checks whether we have a given program on the system.
# https://stackoverflow.com/a/12874971/1427161
#
_have()
{
# Completions for system administrator commands are installed as well in
# case completion is attempted via `sudo command ...'.
PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin type $1 &>/dev/null
}

# Backwards compatibility for compat completions that use have().
# @deprecated should no longer be used; generally not needed with dynamically
# loaded completions, and _have is suitable for runtime use.
have()
{
unset -v have
_have $1 && have=yes
}
33 changes: 33 additions & 0 deletions contrib/bash-completion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Bash Completion
---------------------

The following script provide bash completion functionality for `sycoind` and `syscoin-cli`.

* `contrib/syscoind.bash-completion`
* `contrib/syscoin-cli.bash-completion`
* `contrib/_osx.bash-completion`

### OSX ###
Use `brew` to install `bash-completion` then update `~/.bashrc` to include the completion scripts and helper functions to provide `have()` and `_have()` on OSX.

The example assumes Syscoin was compiled in `~/syscoin` and the scripts will be availabe in `~/syscoin/contrib`, however they can be moved to a different location.

```
brew install bash bash-completion
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
chsh -s /usr/local/bin/bash
BASHRC=$(cat <<EOF
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
. ~/syscoin/contrib/_osx.bash-completion
. ~/syscoin/contrib/syscoind.bash-completion
. ~/syscoin/contrib/syscoin-cli.bash-completion
EOF
)
grep -q "/etc/bash_completion" ~/.bashrc || echo "$BASHRC" >> ~/.bashrc
. ~/.bashrc
```
1 change: 1 addition & 0 deletions contrib/debian/syscoind.bash-completion
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
contrib/syscoind.bash-completion syscoind
contrib/syscoin-cli.bash-completion syscoin-cli
1 change: 1 addition & 0 deletions contrib/devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ For example a file changed in 2015 (with 2015 being the current year):
would be changed to:

```// Copyright (c) 2009-2015 The Syscoin Core developers```
```// Copyright (c) 2014-2018 The Syscoin Core developers
git-subtree-check.sh
====================
Expand Down
1 change: 1 addition & 0 deletions contrib/devtools/check-doc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Copyright (c) 2015-2018 The Syscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
1 change: 1 addition & 0 deletions contrib/devtools/clang-format-diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# Open Source License
#
# Copyright (c) 2007-2015 University of Illinois at Urbana-Champaign.
# Copyright (c) 2014-2018 The Syscoin Core developers
# All rights reserved.
#
# Developed by:
Expand Down
2 changes: 1 addition & 1 deletion contrib/devtools/fix-copyright-headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
it will change it to
// Copyright (c) 2009-2015 The Syscoin Core developers
// Copyright (c) 2014-2017 The Syscoin Core developers
'''
import os
import time
Expand Down
2 changes: 1 addition & 1 deletion contrib/devtools/github-merge.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# Copyright (c) 2016-2017 Bitcoin Core Developers
# Copyright (c) 2016-2018 The Syscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -328,4 +329,3 @@ def main():

if __name__ == '__main__':
main()

2 changes: 1 addition & 1 deletion contrib/linearize/linearize-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Copyright (c) 2014-2018 The Syscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
Expand Down Expand Up @@ -302,4 +303,3 @@ def run(self):
print("Genesis block not found in hashlist")
else:
BlockDataCopier(settings, blkindex, blkmap).run()

2 changes: 1 addition & 1 deletion contrib/linearize/linearize-hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Copyright (c) 2014-2018 The Syscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
Expand Down Expand Up @@ -110,4 +111,3 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
settings['max_height'] = int(settings['max_height'])

get_block_hashes(settings)

1 change: 1 addition & 0 deletions contrib/macdeploy/custom_dsstore.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Copyright (c) 2014-2018 The Syscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import biplist
Expand Down
191 changes: 191 additions & 0 deletions contrib/syscoin-cli.bash-completion
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# bash programmable completion for syscoin-cli(1)
# Copyright (c) 2012-2016 The Bitcoin Core developers
# Copyright (c) 2014-2018 The Syscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

# call $syscoin-cli for RPC
_syscoin_rpc() {
# determine already specified args necessary for RPC
local rpcargs=()
for i in ${COMP_LINE}; do
case "$i" in
-conf=*|-datadir=*|-regtest|-rpc*|-testnet)
rpcargs=( "${rpcargs[@]}" "$i" )
;;
esac
done
$syscoin_cli "${rpcargs[@]}" "$@"
}

# Add wallet accounts to COMPREPLY
_syscoin_accounts() {
local accounts
accounts=$(_syscoin_rpc listaccounts | awk -F '"' '{ print $2 }')
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
}

_syscoin_cli() {
local cur prev words=() cword
local syscoin_cli

# save and use original argument to invoke syscoin-cli for -help, help and RPC
# as syscoin-cli might not be in $PATH
syscoin_cli="$1"

COMPREPLY=()
_get_comp_words_by_ref -n = cur prev words cword

if ((cword > 5)); then
case ${words[cword-5]} in
sendtoaddress)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
esac
fi

if ((cword > 4)); then
case ${words[cword-4]} in
importaddress|listtransactions|setban)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
signrawtransaction)
COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
return 0
;;
esac
fi

if ((cword > 3)); then
case ${words[cword-3]} in
addmultisigaddress)
_syscoin_accounts
return 0
;;
getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
esac
fi

if ((cword > 2)); then
case ${words[cword-2]} in
addnode)
COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
return 0
;;
setban)
COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) )
return 0
;;
fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
move|setaccount)
_syscoin_accounts
return 0
;;
esac
fi

if ((cword > 1)); then
case ${words[cword-1]} in
gobject)
COMPREPLY=( $( compgen -W "check prepare submit deserialize count get getvotes getcurrentvotes list diff vote-name vote-conf vote-many" -- "$cur" ) )
return 0
;;
masternode)
COMPREPLY=( $( compgen -W "count current genkey outputs initialize start-all start-missing start-disabled status list list-conf winner winners" -- "$cur" ) )
return 0
;;
masternodelist)
COMPREPLY=( $( compgen -W "activeseconds addr daemon full info json lastpaidblock lastpaidtime lastseen payee protocol pubkey rank sentinel status" -- "$cur" ) )
return 0
;;
masternodebroadcast)
COMPREPLY=( $( compgen -W "create-name create-all decode relay" -- "$cur" ) )
return 0
;;
mnsync)
COMPREPLY=( $( compgen -W "status next reset" -- "$cur" ) )
return 0
;;
privatesend)
COMPREPLY=( $( compgen -W "start stop reset" -- "$cur" ) )
return 0
;;
*)
printf "\n\n"
"$syscoin_cli" help ${words[1]}
printf ">"
printf " %s" "${words[@]}"
return 0
;;
esac
fi

case "$prev" in
backupwallet|dumpwallet|importwallet)
_filedir
return 0
;;
getaddednodeinfo|getrawmempool|lockunspent|setgenerate)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
_syscoin_accounts
return 0
;;
esac

case "$cur" in
-conf=*)
cur="${cur#*=}"
_filedir
return 0
;;
-datadir=*)
cur="${cur#*=}"
_filedir -d
return 0
;;
-*=*) # prevent nonsense completions
return 0
;;
*)
local helpopts commands

# only parse -help if senseful
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
helpopts=$($syscoin_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
fi

# only parse help if senseful
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
commands=$(_syscoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
fi

COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )

# Prevent space if an argument is desired
if [[ $COMPREPLY == *= ]]; then
compopt -o nospace
fi
return 0
;;
esac
} &&
complete -F _syscoin_cli syscoin-cli

# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh
Loading

0 comments on commit 106e4c3

Please sign in to comment.