From 4fbae77929e6344bc49ab60af10a9c5ff21d2cdf Mon Sep 17 00:00:00 2001 From: Marcos Mayorga Date: Fri, 28 Apr 2017 09:03:51 +0100 Subject: [PATCH] Improved efficiency in COutPoint constructors --- src/primitives/transaction.h | 4 ++-- 1 file 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;