Any projects which want to use Hush code from now on will need to be licensed as GPLv3 or we will send the lawyers: https://www.softwarefreedom.org/ Notably, Komodo (KMD) is licensed as GPLv2 and is no longer compatible to receive code changes, without causing legal issues. MIT projects, such as Zcash, also cannot pull in changes from the Hush Full Node without permission from The Hush Developers, which may in some circumstances grant an MIT license on a case-by-case basis.
43 lines
1.5 KiB
C++
43 lines
1.5 KiB
C++
// Copyright (c) 2020 The Hush developers
|
|
// Copyright (c) 2019 CryptoForge
|
|
// Distributed under the GPLv3 software license, see the accompanying
|
|
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|
|
|
#include "amount.h"
|
|
#include "asyncrpcoperation.h"
|
|
#include "univalue.h"
|
|
#include "zcash/Address.hpp"
|
|
#include "zcash/zip32.h"
|
|
|
|
//Default fee used for consolidation transactions, in puposhis
|
|
static const CAmount DEFAULT_CONSOLIDATION_FEE = 10000;
|
|
extern CAmount fConsolidationTxFee;
|
|
extern bool fConsolidationMapUsed;
|
|
|
|
class AsyncRPCOperation_saplingconsolidation : public AsyncRPCOperation
|
|
{
|
|
public:
|
|
AsyncRPCOperation_saplingconsolidation(int targetHeight);
|
|
virtual ~AsyncRPCOperation_saplingconsolidation();
|
|
|
|
// We don't want to be copied or moved around
|
|
AsyncRPCOperation_saplingconsolidation(AsyncRPCOperation_saplingconsolidation const&) = delete; // Copy construct
|
|
AsyncRPCOperation_saplingconsolidation(AsyncRPCOperation_saplingconsolidation&&) = delete; // Move construct
|
|
AsyncRPCOperation_saplingconsolidation& operator=(AsyncRPCOperation_saplingconsolidation const&) = delete; // Copy assign
|
|
AsyncRPCOperation_saplingconsolidation& operator=(AsyncRPCOperation_saplingconsolidation&&) = delete; // Move assign
|
|
|
|
virtual void main();
|
|
|
|
virtual void cancel();
|
|
|
|
virtual UniValue getStatus() const;
|
|
|
|
private:
|
|
int targetHeight_;
|
|
|
|
bool main_impl();
|
|
|
|
void setConsolidationResult(int numTxCreated, const CAmount& amountConsolidated, const std::vector<std::string>& consolidationTxIds);
|
|
|
|
};
|