Browse Source

Backport some functions from recent BTC to get things compiling further

pull/132/head
Duke Leto 6 years ago
parent
commit
ecc9898963
  1. 2
      src/komodo_validation015.h
  2. 5
      src/primitives/transaction.h
  3. 4
      src/script/standard.cpp
  4. 2
      src/script/standard.h

2
src/komodo_validation015.h

@ -54,7 +54,7 @@
}*/
#include <wallet/wallet.h>
#include <key.h>
#include <key_io.h>
#include <base58.h>
#define SATOSHIDEN ((uint64_t)100000000L)

5
src/primitives/transaction.h

@ -13,6 +13,7 @@
#include "uint256.h"
#include "consensus/consensus.h"
#include <memory>
#include <boost/array.hpp>
#include "zcash/NoteEncryption.hpp"
@ -407,6 +408,10 @@ public:
std::string ToString() const;
};
typedef std::shared_ptr<const CTransaction> CTransactionRef;
static inline CTransactionRef MakeTransactionRef() { return std::make_shared<const CTransaction>(); }
template <typename Tx> static inline CTransactionRef MakeTransactionRef(Tx&& txIn) { return std::make_shared<const CTransaction>(std::forward<Tx>(txIn)); }
/** A mutable version of CTransaction. */
struct CMutableTransaction
{

4
src/script/standard.cpp

@ -316,3 +316,7 @@ CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys)
script << CScript::EncodeOP_N(keys.size()) << OP_CHECKMULTISIG;
return script;
}
bool IsValidDestination(const CTxDestination& dest) {
return dest.which() != 0;
}

2
src/script/standard.h

@ -84,6 +84,8 @@ typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
const char* GetTxnOutputType(txnouttype t);
bool IsValidDestination(const CTxDestination& dest);
bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);

Loading…
Cancel
Save