From owner-svn-ports-all@freebsd.org Tue Jan 23 17:16:00 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1445EB89BC; Tue, 23 Jan 2018 17:16:00 +0000 (UTC) (envelope-from vd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C64C1C9C; Tue, 23 Jan 2018 17:16:00 +0000 (UTC) (envelope-from vd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB9051175C; Tue, 23 Jan 2018 17:15:59 +0000 (UTC) (envelope-from vd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0NHFxPp063752; Tue, 23 Jan 2018 17:15:59 GMT (envelope-from vd@FreeBSD.org) Received: (from vd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0NHFx81063751; Tue, 23 Jan 2018 17:15:59 GMT (envelope-from vd@FreeBSD.org) Message-Id: <201801231715.w0NHFx81063751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vd set sender to vd@FreeBSD.org using -f From: Vasil Dimov Date: Tue, 23 Jan 2018 17:15:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r459788 - head/net-p2p/qtum/files X-SVN-Group: ports-head X-SVN-Commit-Author: vd X-SVN-Commit-Paths: head/net-p2p/qtum/files X-SVN-Commit-Revision: 459788 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 17:16:00 -0000 Author: vd Date: Tue Jan 23 17:15:59 2018 New Revision: 459788 URL: https://svnweb.freebsd.org/changeset/ports/459788 Log: net-p2p/qtum: Fix compilation on FreeBSD 10 (Clang 3.4) Added: head/net-p2p/qtum/files/patch-src_wallet_wallet.h (contents, props changed) Added: head/net-p2p/qtum/files/patch-src_wallet_wallet.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-p2p/qtum/files/patch-src_wallet_wallet.h Tue Jan 23 17:15:59 2018 (r459788) @@ -0,0 +1,270 @@ +--- src/wallet/wallet.h.orig 2018-01-23 18:15:09.538396000 +0200 ++++ src/wallet/wallet.h 2018-01-23 18:15:13.206365000 +0200 +@@ -90,8 +90,6 @@ + class CScript; + class CTxMemPool; + class CWalletTx; +-class CTokenTx; +-class CContractBookData; + + /** (client) version numbers for particular wallet features */ + enum WalletFeature +@@ -579,6 +577,129 @@ + std::vector _ssExtra; + }; + ++/** Contract book data */ ++class CContractBookData ++{ ++public: ++ std::string name; ++ std::string abi; ++ ++ CContractBookData() ++ {} ++}; ++ ++class CTokenTx ++{ ++public: ++ static const int CURRENT_VERSION=1; ++ int nVersion; ++ std::string strContractAddress; ++ std::string strSenderAddress; ++ std::string strReceiverAddress; ++ uint256 nValue; ++ uint256 transactionHash; ++ ++ // Wallet data for token transaction ++ int64_t nCreateTime; ++ uint256 blockHash; ++ int64_t blockNumber; ++ std::string strLabel; ++ ++ CTokenTx() ++ { ++ SetNull(); ++ } ++ ++ ADD_SERIALIZE_METHODS; ++ ++ template ++ inline void SerializationOp(Stream& s, Operation ser_action) { ++ if (!(s.GetType() & SER_GETHASH)) ++ { ++ READWRITE(nVersion); ++ READWRITE(nCreateTime); ++ READWRITE(blockHash); ++ READWRITE(blockNumber); ++ READWRITE(LIMITED_STRING(strLabel, 65536)); ++ } ++ READWRITE(strContractAddress); ++ READWRITE(strSenderAddress); ++ READWRITE(strReceiverAddress); ++ READWRITE(nValue); ++ READWRITE(transactionHash); ++ } ++ ++ void SetNull() ++ { ++ nVersion = CTokenTx::CURRENT_VERSION; ++ nCreateTime = 0; ++ strContractAddress = ""; ++ strSenderAddress = ""; ++ strReceiverAddress = ""; ++ nValue.SetNull(); ++ transactionHash.SetNull(); ++ blockHash.SetNull(); ++ blockNumber = -1; ++ strLabel = ""; ++ } ++ ++ uint256 GetHash() const; ++}; ++ ++class CTokenInfo ++{ ++public: ++ static const int CURRENT_VERSION=1; ++ int nVersion; ++ std::string strContractAddress; ++ std::string strTokenName; ++ std::string strTokenSymbol; ++ uint8_t nDecimals; ++ std::string strSenderAddress; ++ ++ // Wallet data for token transaction ++ int64_t nCreateTime; ++ uint256 blockHash; ++ int64_t blockNumber; ++ ++ CTokenInfo() ++ { ++ SetNull(); ++ } ++ ++ ADD_SERIALIZE_METHODS; ++ ++ template ++ inline void SerializationOp(Stream& s, Operation ser_action) { ++ if (!(s.GetType() & SER_GETHASH)) ++ { ++ READWRITE(nVersion); ++ READWRITE(nCreateTime); ++ READWRITE(strTokenName); ++ READWRITE(strTokenSymbol); ++ READWRITE(blockHash); ++ READWRITE(blockNumber); ++ } ++ READWRITE(nDecimals); ++ READWRITE(strContractAddress); ++ READWRITE(strSenderAddress); ++ } ++ ++ void SetNull() ++ { ++ nVersion = CTokenInfo::CURRENT_VERSION; ++ nCreateTime = 0; ++ strContractAddress = ""; ++ strTokenName = ""; ++ strTokenSymbol = ""; ++ nDecimals = 0; ++ strSenderAddress = ""; ++ blockHash.SetNull(); ++ blockNumber = -1; ++ } ++ ++ uint256 GetHash() const; ++}; + + /** + * A CWallet is an extension of a keystore, which also maintains a set of transactions and balances, +@@ -1156,128 +1277,4 @@ + return true; + } + +-class CTokenInfo +-{ +-public: +- static const int CURRENT_VERSION=1; +- int nVersion; +- std::string strContractAddress; +- std::string strTokenName; +- std::string strTokenSymbol; +- uint8_t nDecimals; +- std::string strSenderAddress; +- +- // Wallet data for token transaction +- int64_t nCreateTime; +- uint256 blockHash; +- int64_t blockNumber; +- +- CTokenInfo() +- { +- SetNull(); +- } +- +- ADD_SERIALIZE_METHODS; +- +- template +- inline void SerializationOp(Stream& s, Operation ser_action) { +- if (!(s.GetType() & SER_GETHASH)) +- { +- READWRITE(nVersion); +- READWRITE(nCreateTime); +- READWRITE(strTokenName); +- READWRITE(strTokenSymbol); +- READWRITE(blockHash); +- READWRITE(blockNumber); +- } +- READWRITE(nDecimals); +- READWRITE(strContractAddress); +- READWRITE(strSenderAddress); +- } +- +- void SetNull() +- { +- nVersion = CTokenInfo::CURRENT_VERSION; +- nCreateTime = 0; +- strContractAddress = ""; +- strTokenName = ""; +- strTokenSymbol = ""; +- nDecimals = 0; +- strSenderAddress = ""; +- blockHash.SetNull(); +- blockNumber = -1; +- } +- +- uint256 GetHash() const; +-}; +- +-class CTokenTx +-{ +-public: +- static const int CURRENT_VERSION=1; +- int nVersion; +- std::string strContractAddress; +- std::string strSenderAddress; +- std::string strReceiverAddress; +- uint256 nValue; +- uint256 transactionHash; +- +- // Wallet data for token transaction +- int64_t nCreateTime; +- uint256 blockHash; +- int64_t blockNumber; +- std::string strLabel; +- +- CTokenTx() +- { +- SetNull(); +- } +- +- ADD_SERIALIZE_METHODS; +- +- template +- inline void SerializationOp(Stream& s, Operation ser_action) { +- if (!(s.GetType() & SER_GETHASH)) +- { +- READWRITE(nVersion); +- READWRITE(nCreateTime); +- READWRITE(blockHash); +- READWRITE(blockNumber); +- READWRITE(LIMITED_STRING(strLabel, 65536)); +- } +- READWRITE(strContractAddress); +- READWRITE(strSenderAddress); +- READWRITE(strReceiverAddress); +- READWRITE(nValue); +- READWRITE(transactionHash); +- } +- +- void SetNull() +- { +- nVersion = CTokenTx::CURRENT_VERSION; +- nCreateTime = 0; +- strContractAddress = ""; +- strSenderAddress = ""; +- strReceiverAddress = ""; +- nValue.SetNull(); +- transactionHash.SetNull(); +- blockHash.SetNull(); +- blockNumber = -1; +- strLabel = ""; +- } +- +- uint256 GetHash() const; +-}; +- +-/** Contract book data */ +-class CContractBookData +-{ +-public: +- std::string name; +- std::string abi; +- +- CContractBookData() +- {} +-}; +- + #endif // BITCOIN_WALLET_WALLET_H