-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix createrawtransaction bug
- Loading branch information
Showing
10 changed files
with
2,635 additions
and
2 deletions.
There are no files selected for viewing
1,852 changes: 1,852 additions & 0 deletions
1,852
.svn/pristine/60/6085b044de77362c42a0f7dafbf9653f880eaef8.svn-base
Large diffs are not rendered by default.
Oops, something went wrong.
106 changes: 106 additions & 0 deletions
106
.svn/pristine/8d/8d73c78ec30abc9766ebc835ab29313056a0d0db.svn-base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
// Copyright (c) 2012-2016 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#include "clientversion.h" | ||
|
||
#include "tinyformat.h" | ||
|
||
#include <string> | ||
|
||
/** | ||
* Name of client reported in the 'version' message. Report the same name | ||
* for both bitcoind and bitcoin-core, to make it harder for attackers to | ||
* target servers or GUI users specifically. | ||
*/ | ||
const std::string CLIENT_NAME("ipchain"); | ||
|
||
const std::string IPCHAIN_VERSION("V0.1.5.2"); | ||
|
||
/** | ||
* Client version number | ||
*/ | ||
#define CLIENT_VERSION_SUFFIX "" | ||
|
||
|
||
/** | ||
* The following part of the code determines the CLIENT_BUILD variable. | ||
* Several mechanisms are used for this: | ||
* * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is | ||
* generated by the build environment, possibly containing the output | ||
* of git-describe in a macro called BUILD_DESC | ||
* * secondly, if this is an exported version of the code, GIT_ARCHIVE will | ||
* be defined (automatically using the export-subst git attribute), and | ||
* GIT_COMMIT will contain the commit id. | ||
* * then, three options exist for determining CLIENT_BUILD: | ||
* * if BUILD_DESC is defined, use that literally (output of git-describe) | ||
* * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit] | ||
* * otherwise, use v[maj].[min].[rev].[build]-unk | ||
* finally CLIENT_VERSION_SUFFIX is added | ||
*/ | ||
|
||
//! First, include build.h if requested | ||
#ifdef HAVE_BUILD_INFO | ||
#include "build.h" | ||
#endif | ||
|
||
//! git will put "#define GIT_ARCHIVE 1" on the next line inside archives. | ||
#define GIT_ARCHIVE 1 | ||
#ifdef GIT_ARCHIVE | ||
#define GIT_COMMIT_ID "964a185cc83" | ||
#define GIT_COMMIT_DATE "Thu, 20 Apr 2017 11:28:25 +0200" | ||
#endif | ||
|
||
#define BUILD_DESC_WITH_SUFFIX(maj, min, rev, build, suffix) \ | ||
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-" DO_STRINGIZE(suffix) | ||
|
||
#define BUILD_DESC_FROM_COMMIT(maj, min, rev, build, commit) \ | ||
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-g" commit | ||
|
||
#define BUILD_DESC_FROM_UNKNOWN(maj, min, rev, build) \ | ||
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-unk" | ||
|
||
#ifndef BUILD_DESC | ||
#ifdef BUILD_SUFFIX | ||
#define BUILD_DESC BUILD_DESC_WITH_SUFFIX(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, BUILD_SUFFIX) | ||
#elif defined(GIT_COMMIT_ID) | ||
#define BUILD_DESC BUILD_DESC_FROM_COMMIT(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, GIT_COMMIT_ID) | ||
#else | ||
#define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD) | ||
#endif | ||
#endif | ||
|
||
const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX); | ||
|
||
static std::string FormatVersion(int nVersion) | ||
{ | ||
if (nVersion % 100 == 0) | ||
return strprintf("%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100); | ||
else | ||
return strprintf("%d.%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100, nVersion % 100); | ||
} | ||
|
||
std::string FormatFullVersion() | ||
{ | ||
return CLIENT_BUILD; | ||
} | ||
|
||
/** | ||
* Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) | ||
*/ | ||
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments) | ||
{ | ||
std::ostringstream ss; | ||
ss << "/"; | ||
ss << name << ":" << FormatVersion(nClientVersion); | ||
if (!comments.empty()) | ||
{ | ||
std::vector<std::string>::const_iterator it(comments.begin()); | ||
ss << "(" << *it; | ||
for(++it; it != comments.end(); ++it) | ||
ss << "; " << *it; | ||
ss << ")"; | ||
} | ||
ss << "/"; | ||
return ss.str(); | ||
} |
147 changes: 147 additions & 0 deletions
147
.svn/pristine/e3/e3a6bc48f3a4b8649661d9e32c1214fcde55f489.svn-base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
# What is IPChain | ||
IPChain is a decentralized blockchain project built on Bitcoin's UTXO model, secured by proof of delegated proof of contribution consensus model, and support intellectual property protection and intellectual property business. It achieves this through the revolutionary extended transation model, effective consensus mechanize and so on. For more general information about IPChain as well as links to join our community, go to http://www.ipcchain.org | ||
|
||
Welcome to the IPChain Main Network. This is the main network where the tokens hold value and should be guarded very carefully. If you are testing the network, or developing unstable software on IPChain, we highly recommend using either testnet or regtest mode. | ||
|
||
The major features of the IPChain network include: | ||
|
||
1. Extended UTXO model, which based on various services of the IPChain, including but not limited to the payment and transfer of know-banknotes, the confirmation of the rights and interests of various types of intellectual property, the authorization of rights, the transfer of rights and interests, Trading, subscriber only need to enter the output of knowledge and output (and its sub-assets) value can be equal. | ||
|
||
2. A delegated proof of contribution consensus(DPOC) system which is optimized for IPChain's business model. Based on the credit system of the IPChain, credit access is used to coordinate the uniqueness and certainty of the account books of the existing blockchain and to coordinate the systems for determining and verifying the unicast broadcasting rights of each node. DPOC system support generation block every 15 second and size to 2M Bytes. | ||
|
||
3. Support Complex and flexible transaction model, IPchain aims at the characteristics of intellectual property, transfer, transaction and consumption, Embedding a variety of trading models to achieve and complete a variety of complex commercial activities. Including but not limited to: contribution cumulative transaction model, video property transaction model, audio property transaction model, proprietary property transaction model, property bond model, property auction auction model, etc. | ||
|
||
4. The Decentralized Governance Protocol is completely implemented and functional, which allows certain network parameters to be modified without a fork or other network disruption. This currently controls parameters like block size, etc. | ||
|
||
Note: IPChain Core is considered beta software. We make no warranties or guarantees of its security or stability. | ||
# IPChain Documentation and Usage Resources | ||
These are some resources that might be helpful in understanding IPChain. | ||
|
||
Basic usage resources: | ||
|
||
* [IPChain Usage Guide](https://github.com/IPCChain/ipchain/wiki/IPChain-Usage-Guide) | ||
* [IPChain digging Manual](http://github.com/IPCChain/ipchain/wiki/IPChain-Digging-Manual) | ||
* [IPChain block exploer](http://exploer.ipchainglobal.com) | ||
|
||
Development resources: | ||
* [IPChain RPC API](https://github.com/IPCChain/ipchain/wiki/IPChain-RPC-API) | ||
|
||
# What is IPChain Core? | ||
IPChain Core is IPchain's primary mainnet wallet. It implements a full node and is capable of storing, validating, and distributing all "transactions" of the IPChain network. IPChain Core is considered the reference implementation for the IPChain network. | ||
|
||
IPChain Core currently implements the following: | ||
|
||
* Sending/Receiving IPCoin | ||
* Sending/Receiving customer's tokens on the IPChain network | ||
* Creating/Storing/Sending/Receiving intellectual propery identifies on the IPChain network | ||
* generating blocks for the IPChain network | ||
* Running a full node for distributing the blockchain to other users | ||
* "Prune" mode, which minimizes disk usage | ||
* Compatibility with the Bitcoin Core set of RPC commands and APIs | ||
|
||
# Building IPChain Core | ||
## Build on Ubuntu16.04 | ||
|
||
apt-get install make | ||
apt-get install gcc | ||
apt-get install g++ | ||
agt-get install zlib1g-dev | ||
apt-get install libssl-dev | ||
apt-get install build-essential | ||
apt-get install libminiupnpc-dev | ||
apt-get install autoconf | ||
|
||
sudo apt-get install libdb5.3++-dev | ||
sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-demos qt4-designer | ||
sudo apt-get install libboost-all-dev | ||
sudo apt-get gcc-multilib | ||
sudo apt-get install libprotobuf-dev | ||
sudo apt-get install libevent-dev | ||
sudo apt-get install protobuf-compiler | ||
|
||
Install the qr code kit and the png tools kit | ||
sudo apt-get install libpng-1.6.31 qrencode-3.4.4 | ||
|
||
git clone https://github.com/IPCChain/ipchain --recursive | ||
cd ipchain | ||
|
||
./configure | ||
make | ||
make install | ||
|
||
## Build on CentOS7.3 | ||
|
||
yum install make | ||
yum install gcc | ||
yum install gcc-c++ | ||
yum install zlib-devel | ||
yum install openssl-devel | ||
yum groupinstall "Development Tools" | ||
|
||
Download&Install miniupnpc library | ||
wget -O miniupnpc-1.6.20120509.tar.gz http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.6.20120509.tar.gz | ||
tar -zxvf miniupnpc-1.6.20120509.tar.gz | ||
cd miniupnpc-1.6.20120509 | ||
make install | ||
|
||
Download&Install Boost library | ||
wget https://jaist.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz | ||
tar zxvf boost_1_59_0.tar.gz | ||
cd boost_1_59_0 | ||
./bootstrap.sh | ||
./b2 | ||
./b2 install | ||
|
||
Add boost.conf file in the /etc/ld.so.conf.d/ directory | ||
cd /etc/ld.so.conf.d/ | ||
vi boost.conf | ||
|
||
Add following content in boost.conf | ||
/usr/local/lib/ | ||
|
||
ldconfig | ||
yum install libevent-devel | ||
yum install protobuf-devel | ||
yum install protobuf-compiler | ||
|
||
git clone https://github.com/IPCChain/ipchain.git | ||
cd ipchain | ||
./autogen.sh | ||
./configure --with-incompatible-bdb | ||
make | ||
|
||
## Build on OSX | ||
The commands in this guide should be executed in a Terminal application. The built-in one is located in `/Applications/Utilities/Terminal.app` | ||
### Preparation | ||
Install the OS X command line tools: | ||
|
||
xcode-select --install | ||
|
||
When the popup appears, click `Install` | ||
|
||
Then install [Homebrew](https://brew.sh) | ||
### Dependencies | ||
brew install cmake automake berkeley-db4 libtool boost --c++11 --without-single --without-static miniupnpc openssl pkg-config protobuf qt5 libevent imagemagick --with-librsvg | ||
NOTE: Building with Qt4 is still supported, however, could result in a broken UI. Building with Qt5 is recommended. | ||
### Build IPChain Core | ||
1. Clone the IPChain source code and cd into `ipchain`: | ||
|
||
git clone --recursive https://github.com/ipcchain/ipchain.git | ||
cd ipchain | ||
|
||
2. Build ipchain core: | ||
|
||
Configure and build the headless IPChain binaries as well as the GUI (if Qt is found). | ||
|
||
You can disable the GUI build by passing --without-gui to configure. | ||
|
||
./autogen.sh | ||
./configure | ||
make | ||
3. It is recommended to build and run the unit tests: | ||
|
||
make check | ||
## Run | ||
Then you can either run the command-line daemon using `src/ipchain` and `ipchain-cli`, or you can run the Qt GUI using `src/qt/ipchain-qt` | ||
# License | ||
IPChain is GPLv3 licensed. |
Binary file not shown.
Oops, something went wrong.