Commit b05ba36
authored
* Add a new function `injectIntoTestState` to `EraTransition`, which
allows to inject transition configuration data in the given
`NewEpochState`.
This change allows the Ledger to define this logic in this component
without needing to do it in the Consensus layer. In this way, we
improve the separation of concerns.
* Do no register the initial funds in `createInitialState`.
This allows the `ThreadNet` tests in Consensus to use
`injectIntoTestState` after creating the initial state.
Add a comment on `createInitialState` stating that no funds
or delegates are registered by this function.
* Remove registration functions used by Consensus.
Functions `registerInitialFunds`, `registerInitialStaking`,
`registerInitialDReps`, and `registerDelegs` were used by the
Consensus code, which now relies on `injectIntoTestState`.
* Update the changelogs.
1 parent 1ea568e commit b05ba36
File tree
10 files changed
+52
-15
lines changed- eras
- allegra/impl/src/Cardano/Ledger/Allegra
- alonzo/impl/src/Cardano/Ledger/Alonzo
- babbage/impl/src/Cardano/Ledger/Babbage
- conway/impl
- src/Cardano/Ledger/Conway
- mary/impl/src/Cardano/Ledger/Mary
- shelley/impl
- src/Cardano/Ledger/Shelley
- libs/cardano-ledger-api
- src/Cardano/Ledger/Api
10 files changed
+52
-15
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
| |||
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| |||
130 | 138 | | |
131 | 139 | | |
132 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
133 | 151 | | |
134 | 152 | | |
135 | 153 | | |
| |||
139 | 157 | | |
140 | 158 | | |
141 | 159 | | |
| 160 | + | |
| 161 | + | |
142 | 162 | | |
143 | 163 | | |
144 | 164 | | |
| |||
228 | 248 | | |
229 | 249 | | |
230 | 250 | | |
| 251 | + | |
| 252 | + | |
231 | 253 | | |
232 | 254 | | |
233 | 255 | | |
| |||
278 | 300 | | |
279 | 301 | | |
280 | 302 | | |
281 | | - | |
| 303 | + | |
282 | 304 | | |
283 | 305 | | |
284 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 24 | + | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 30 | | |
38 | 31 | | |
39 | 32 | | |
40 | 33 | | |
41 | 34 | | |
42 | 35 | | |
43 | 36 | | |
44 | | - | |
45 | | - | |
46 | 37 | | |
47 | 38 | | |
48 | 39 | | |
| |||
0 commit comments