Skip to content

Commit f7548ff

Browse files
author
SyntheticBird45
committed
f
1 parent f9b847b commit f7548ff

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

Cargo.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ members = [
55
"binaries/cuprated",
66
"constants",
77
"consensus",
8+
"consensus/context",
89
"consensus/fast-sync",
910
"consensus/rules",
1011
"cryptonight",
@@ -322,4 +323,4 @@ non_camel_case_types = "deny"
322323
# unused_results = "deny"
323324
# non_exhaustive_omitted_patterns = "deny"
324325
# missing_docs = "deny"
325-
# missing_copy_implementations = "deny"
326+
# missing_copy_implementations = "deny"

consensus/context/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "cuprate-consensus-context"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]

consensus/context/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub fn add(left: u64, right: u64) -> u64 {
2+
left + right
3+
}
4+
5+
#[cfg(test)]
6+
mod tests {
7+
use super::*;
8+
9+
#[test]
10+
fn it_works() {
11+
let result = add(2, 2);
12+
assert_eq!(result, 4);
13+
}
14+
}

0 commit comments

Comments
 (0)