aboutsummaryrefslogtreecommitdiff
path: root/src/script/sign.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-07-01 19:31:53 +0200
committerMacroFake <falke.marco@gmail.com>2022-05-04 11:49:29 +0200
commitfac6cfc50f65c610f2df9af3ec2efff5eade6661 (patch)
treea2f3f0764589e47f8305ed1c1215400fa7e8e233 /src/script/sign.h
parentd17bbc3c484edae2552a28471d8879fca9664bcc (diff)
downloadbitcoin-fac6cfc50f65c610f2df9af3ec2efff5eade6661.tar.xz
refactor: Change * to & in MutableTransactionSignatureCreator
Diffstat (limited to 'src/script/sign.h')
-rw-r--r--src/script/sign.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/script/sign.h b/src/script/sign.h
index 7301826ba5..71203d08ec 100644
--- a/src/script/sign.h
+++ b/src/script/sign.h
@@ -6,6 +6,7 @@
#ifndef BITCOIN_SCRIPT_SIGN_H
#define BITCOIN_SCRIPT_SIGN_H
+#include <attributes.h>
#include <coins.h>
#include <hash.h>
#include <pubkey.h>
@@ -34,8 +35,9 @@ public:
};
/** A signature creator for transactions. */
-class MutableTransactionSignatureCreator : public BaseSignatureCreator {
- const CMutableTransaction* txTo;
+class MutableTransactionSignatureCreator : public BaseSignatureCreator
+{
+ const CMutableTransaction& m_txto;
unsigned int nIn;
int nHashType;
CAmount amount;
@@ -43,8 +45,8 @@ class MutableTransactionSignatureCreator : public BaseSignatureCreator {
const PrecomputedTransactionData* m_txdata;
public:
- MutableTransactionSignatureCreator(const CMutableTransaction* tx, unsigned int input_idx, const CAmount& amount, int hash_type);
- MutableTransactionSignatureCreator(const CMutableTransaction* tx, unsigned int input_idx, const CAmount& amount, const PrecomputedTransactionData* txdata, int hash_type);
+ MutableTransactionSignatureCreator(const CMutableTransaction& tx LIFETIMEBOUND, unsigned int input_idx, const CAmount& amount, int hash_type);
+ MutableTransactionSignatureCreator(const CMutableTransaction& tx LIFETIMEBOUND, unsigned int input_idx, const CAmount& amount, const PrecomputedTransactionData* txdata, int hash_type);
const BaseSignatureChecker& Checker() const override { return checker; }
bool CreateSig(const SigningProvider& provider, std::vector<unsigned char>& vchSig, const CKeyID& keyid, const CScript& scriptCode, SigVersion sigversion) const override;
bool CreateSchnorrSig(const SigningProvider& provider, std::vector<unsigned char>& sig, const XOnlyPubKey& pubkey, const uint256* leaf_hash, const uint256* merkle_root, SigVersion sigversion) const override;