Skip to content

Commit 4fbae77

Browse files
committed
Improved efficiency in COutPoint constructors
1 parent 4c92401 commit 4fbae77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/primitives/transaction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class COutPoint
2222
uint256 hash;
2323
uint32_t n;
2424

25-
COutPoint() { SetNull(); }
26-
COutPoint(uint256 hashIn, uint32_t nIn) { hash = hashIn; n = nIn; }
25+
COutPoint(): n((uint32_t) -1) { }
26+
COutPoint(const uint256& hashIn, uint32_t nIn): hash(hashIn), n(nIn) { }
2727

2828
ADD_SERIALIZE_METHODS;
2929

0 commit comments

Comments
 (0)