Make BeaconState.balances a tree list!

This commit is contained in:
Michael Sproul
2021-12-01 14:14:47 +11:00
parent 4b808d3c72
commit fca92c37ad
11 changed files with 76 additions and 31 deletions

View File

@@ -352,12 +352,15 @@ where
let store = &mut self.fc_store;
// FIXME(sproul): plumb VList through fork choice
let justified_balances = store.justified_balances().to_vec();
self.proto_array
.find_head(
store.justified_checkpoint().epoch,
store.justified_checkpoint().root,
store.finalized_checkpoint().epoch,
store.justified_balances(),
&justified_balances,
)
.map_err(Into::into)
}