forked from apezord/ord-dogecoin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubsidy.rs
56 lines (51 loc) Β· 1019 Bytes
/
subsidy.rs
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
use {super::*, ord::subcommand::subsidy::Output};
#[test]
fn genesis() {
assert_eq!(
CommandBuilder::new("subsidy 0").output::<Output>(),
Output {
first: 0,
subsidy: 100000000000000,
}
);
}
#[test]
fn second_block() {
assert_eq!(
CommandBuilder::new("subsidy 1").output::<Output>(),
Output {
first: 100000000000000,
subsidy: 100000000000000,
}
);
}
#[test]
#[ignore]
fn second_to_last_block_with_subsidy() {
assert_eq!(
CommandBuilder::new("subsidy 6929998").output::<Output>(),
Output {
first: 2099999997689998,
subsidy: 1,
}
);
}
#[test]
#[ignore]
fn last_block_with_subsidy() {
assert_eq!(
CommandBuilder::new("subsidy 6929999").output::<Output>(),
Output {
first: 2099999997689999,
subsidy: 1,
}
);
}
#[test]
#[ignore]
fn first_block_without_subsidy() {
CommandBuilder::new("subsidy 6930000")
.expected_stderr("error: block 6930000 has no subsidy\n")
.expected_exit_code(1)
.run();
}