You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/chain-libs/chain-impl-mockchain/src/accounting/account/spending.rs
+44-31Lines changed: 44 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,16 @@ pub enum Error {
6
6
expected:SpendingCounter,
7
7
actual:SpendingCounter,
8
8
},
9
+
#[error("Invalid lane value during the SpendingCountersIncreasingInitialization, expected: {0}, got: {1}")]
10
+
InvalidLaneValue(usize,usize),
9
11
#[error("Invalid lane: {0} or counter: {1}, expected lane < (1 << LANES_BITS), counter < (1 << UNLANES_BITS)")]
10
12
InvalidLaneOrCounter(usize,u32),
11
13
}
12
14
13
15
/// Simple strategy to spend from multiple increasing counters
14
16
#[derive(Debug,Clone,PartialEq,Eq)]
15
17
pubstructSpendingCounterIncreasing{
16
-
nexts:Vec<SpendingCounter>,
18
+
nexts:[SpendingCounter;Self::LANES],
17
19
}
18
20
19
21
// SpendingCounterIncreasing has extra invariants (e.g. nexts has 8 elements, each belongs to a different lane), so a derived implementation is not suitable
0 commit comments