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:
parent
4ecf287740
commit
cc671d2480
10 changed files with 15080 additions and 42 deletions
|
|
@ -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] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue