From 3ceefdf81c416e761778f5ed3e2193843c23159d Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Tue, 10 Sep 2019 10:30:04 -0700 Subject: [PATCH] Create OutPoint from hash and n --- zcash_primitives/src/transaction/components.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zcash_primitives/src/transaction/components.rs b/zcash_primitives/src/transaction/components.rs index 6a872ce..df6d55b 100644 --- a/zcash_primitives/src/transaction/components.rs +++ b/zcash_primitives/src/transaction/components.rs @@ -26,6 +26,10 @@ pub struct OutPoint { } impl OutPoint { + pub fn new(hash: [u8; 32], n: u32) -> Self { + OutPoint {hash, n} + } + pub fn read(mut reader: R) -> io::Result { let mut hash = [0; 32]; reader.read_exact(&mut hash)?;