feat: generate genesis utxos from genesis file (#59)

Co-authored-by: rvcas <x@rvcas.dev>
Co-authored-by: jmhrpr <harper.jme@gmail.com>
This commit is contained in:
Santiago Carmuega 2023-10-04 06:45:59 -03:00 committed by GitHub
parent 4ecf287740
commit cc671d2480
10 changed files with 15080 additions and 42 deletions

View file

@ -22,6 +22,14 @@ impl<const BYTES: usize> From<[u8; BYTES]> for Hash<BYTES> {
}
}
impl<const BYTES: usize> From<&[u8]> for Hash<BYTES> {
fn from(value: &[u8]) -> Self {
let mut hash = [0; BYTES];
hash.copy_from_slice(value);
Self::new(hash)
}
}
impl<const BYTES: usize> AsRef<[u8]> for Hash<BYTES> {
#[inline]
fn as_ref(&self) -> &[u8] {