aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-05-01 16:34:45 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-05-01 16:40:43 -0700
commite4bbd3d230f22401ba0a0a72c8ed41ee1bd098a0 (patch)
treec9138507924c58797325fe5535f8978df7d43bc6
parentc45da32047cac54afc99cf9b8a539389c577ded1 (diff)
parent4fbae77929e6344bc49ab60af10a9c5ff21d2cdf (diff)
downloadbitcoin-e4bbd3d230f22401ba0a0a72c8ed41ee1bd098a0.tar.xz
Merge #10292: Improved efficiency in COutPoint constructors
4fbae77 Improved efficiency in COutPoint constructors (Marcos Mayorga) Tree-SHA512: 1e402d5021a47724b6159af90955f1a5932c383f48e3e704f1c9a52daa18d2dce5d8e1fcd02fae6977eab04ab83fa22872110b821d4c6593d940d9642abc9bcd
-rw-r--r--src/primitives/transaction.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index d413e8b087..5059030309 100644
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -22,8 +22,8 @@ public:
uint256 hash;
uint32_t n;
- COutPoint() { SetNull(); }
- COutPoint(uint256 hashIn, uint32_t nIn) { hash = hashIn; n = nIn; }
+ COutPoint(): n((uint32_t) -1) { }
+ COutPoint(const uint256& hashIn, uint32_t nIn): hash(hashIn), n(nIn) { }
ADD_SERIALIZE_METHODS;