1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use serde::{Deserialize, Serialize};

/*
*** HeightHash Scheme ***
{
		"height": 0,
		"hash": "string"
}
*/

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct HeightHash {
	height: u64,
	hash: String,
}

impl HeightHash {
	#[must_use]
	pub const fn new(height: u64, hash: String) -> Self {
		Self { height, hash }
	}

	#[must_use]
	pub const fn get_height(&self) -> u64 {
		self.height
	}

	#[must_use]
	pub fn get_hash(&self) -> &str {
		&self.hash
	}
}