From 14dfb8d272b67abffc9614aa9899f6947db867a2 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 1 May 2017 16:34:45 -0700 Subject: [PATCH] Merge #10292: Improved efficiency in COutPoint constructors 4fbae77 Improved efficiency in COutPoint constructors (Marcos Mayorga) Tree-SHA512: 1e402d5021a47724b6159af90955f1a5932c383f48e3e704f1c9a52daa18d2dce5d8e1fcd02fae6977eab04ab83fa22872110b821d4c6593d940d9642abc9bcd --- 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 76cdc3463a57da..83239155694709 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -29,8 +29,8 @@ class COutPoint 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;