Create OutPoint from hash and n

This commit is contained in:
Aditya Kulkarni
2019-09-10 10:30:04 -07:00
parent f8d01215a0
commit 3ceefdf81c

View File

@@ -26,6 +26,10 @@ pub struct OutPoint {
}
impl OutPoint {
pub fn new(hash: [u8; 32], n: u32) -> Self {
OutPoint {hash, n}
}
pub fn read<R: Read>(mut reader: R) -> io::Result<Self> {
let mut hash = [0; 32];
reader.read_exact(&mut hash)?;