Skip to content

Commit

Permalink
Made expicit constructor CTransaction(const CMutableTransaction &tx).
Browse files Browse the repository at this point in the history
This makes the above constructor explicit. The rationale is that this conversion has very significant performance effects. Making it explicit makes it easier to reason about these performance trade-offs, and helps identify possible functions that need a CMutableTransaction version.
  • Loading branch information
lucash-dev committed Dec 18, 2018
1 parent faf29dd commit b301950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/primitives/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class CTransaction
CTransaction();

/** Convert a CMutableTransaction into a CTransaction. */
CTransaction(const CMutableTransaction &tx);
explicit CTransaction(const CMutableTransaction &tx);
CTransaction(CMutableTransaction &&tx);

template <typename Stream>
Expand Down

0 comments on commit b301950

Please sign in to comment.