public void AddValidatedStateRoot(StateRoot state_root) { if (state_root?.Witness is null) { throw new ArgumentException(nameof(state_root) + " missing witness in invalidated state root"); } snapshot.Put(Keys.StateRoot(state_root.Index), state_root.ToArray()); snapshot.Put(Keys.CurrentValidatedRootIndex, BitConverter.GetBytes(state_root.Index)); }
public void AddLocalStateRoot(StateRoot state_root) { snapshot.Put(Keys.StateRoot(state_root.Index), state_root.ToArray()); snapshot.Put(Keys.CurrentLocalRootIndex, BitConverter.GetBytes(state_root.Index)); }