Skip to content

Instantly share code, notes, and snippets.

@konchunas
Created February 10, 2019 23:58
Show Gist options
  • Save konchunas/364f6f89be292ab1b9207ee7adfbf051 to your computer and use it in GitHub Desktop.
Save konchunas/364f6f89be292ab1b9207ee7adfbf051 to your computer and use it in GitHub Desktop.
struct Genesis {
timestamp: ST0,
prev_hashes: ST1,
}
impl Genesis {
fn __init__<T0>(&self, creation_time: T0) {
self.timestamp = creation_time;
self.prev_hashes = vec![];
}
fn get_hash<RT>(&self) -> RT {
return self.precalculated_genesis_hash;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment