diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -283,11 +283,11 @@ } friend bool operator==(const CTransaction &a, const CTransaction &b) { - return a.hash == b.hash; + return a.GetHash() == b.GetHash(); } friend bool operator!=(const CTransaction &a, const CTransaction &b) { - return a.hash != b.hash; + return !(a == b); } std::string ToString() const; @@ -333,7 +333,7 @@ friend bool operator==(const CMutableTransaction &a, const CMutableTransaction &b) { - return a.GetId() == b.GetId(); + return a.GetHash() == b.GetHash(); } }; #if defined(__x86_64__) diff --git a/src/pubkey.h b/src/pubkey.h --- a/src/pubkey.h +++ b/src/pubkey.h @@ -95,6 +95,7 @@ //! Simple read-only vector-like interface to the pubkey data. unsigned int size() const { return GetLen(vch[0]); } + const uint8_t *data() const { return vch; } const uint8_t *begin() const { return vch; } const uint8_t *end() const { return vch + size(); } const uint8_t &operator[](unsigned int pos) const { return vch[pos]; } diff --git a/src/script/sign.h b/src/script/sign.h --- a/src/script/sign.h +++ b/src/script/sign.h @@ -6,8 +6,13 @@ #ifndef BITCOIN_SCRIPT_SIGN_H #define BITCOIN_SCRIPT_SIGN_H +#include +#include #include