Mostly-working Hush full node sans Verus!!!

Every line of Verus-specific code has been removed from the codebase.
This code compiles on Linux and can do a partial sync. A full sync
and other extensive tests need to be done before it's merged into
the duke branch.

BUGS:

One known bug is that the node starts to CPU mine by default, lol.
This commit is contained in:
Duke Leto
2019-11-05 09:39:11 -05:00
parent f80fc3c002
commit e87d029968
11 changed files with 13 additions and 368 deletions

View File

@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2019 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -2084,13 +2085,13 @@ bool CWallet::IsMine(const CTransaction& tx)
return false;
}
// special case handling for non-standard/Verus OP_RETURN script outputs, which need the transaction
// special case handling for non-standard OP_RETURN script outputs, which need the transaction
// to determine ownership
isminetype CWallet::IsMine(const CTransaction& tx, uint32_t voutNum)
{
vector<valtype> vSolutions;
txnouttype whichType;
const CScriptExt scriptPubKey = CScriptExt(tx.vout[voutNum].scriptPubKey);
const CScript scriptPubKey = CScript(tx.vout[voutNum].scriptPubKey);
if (!Solver(scriptPubKey, whichType, vSolutions)) {
if (this->HaveWatchOnly(scriptPubKey))
@@ -2100,7 +2101,7 @@ isminetype CWallet::IsMine(const CTransaction& tx, uint32_t voutNum)
CKeyID keyID;
CScriptID scriptID;
CScriptExt subscript;
CScript subscript;
int voutNext = voutNum + 1;
switch (whichType)
@@ -2134,6 +2135,7 @@ isminetype CWallet::IsMine(const CTransaction& tx, uint32_t voutNum)
case TX_SCRIPTHASH:
scriptID = CScriptID(uint160(vSolutions[0]));
//TODO: remove CLTV stuff not relevant to Hush
if (this->GetCScript(scriptID, subscript))
{
// if this is a CLTV, handle it differently