SIGN IN SIGN UP
FuelLabs / fuel-core UNCLAIMED

Rust full node implementation of the Fuel v2 protocol.

0 0 15 Rust

DataSource struct attribute public visibility (#3134)

## Description

This pull request makes a small change to the visibility of struct
fields in the `DataSource` struct.
The fields `data` and `stage` are now public, which allows them to be
accessed from outside the module.

Currently there is no way to override these attributes with custom
values externally.
This is required for https://github.com/FuelLabs/sway/pull/7478 - as we
override these attributes to enable contract state forking in the PR.

## Checklist
- [ ] Breaking changes are clearly marked as such in the PR description
and changelog
- [ ] New behavior is reflected in tests
- [ ] [The specification](https://github.com/FuelLabs/fuel-specs/)
matches the implemented behavior (link update PR if changes are needed)

### Before requesting review
- [x] I have reviewed the code myself
- [ ] I have created follow-up issues caused by this PR and linked them
here

### After merging, notify other teams

[Add or remove entries as needed]

- [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/)
- [x] [Sway compiler](https://github.com/FuelLabs/sway/)
- [ ] [Platform
documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+)
(for out-of-organization contributors, the person merging the PR will do
this)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Expose `DataSource` fields `data` and `stage` publicly and add
corresponding changelog entry.
> 
> - **State**:
> - `crates/fuel-core/src/state/data_source.rs`: Make `DataSource`
fields `data` and `stage` public.
> - **Changelog**:
> - `.changes/changed/3134.md`: Add entry noting public visibility of
`DataSource` fields.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ab6b0e3fc426fa3b83047f411eadb7d9456909f3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: z <zees-dev@users.noreply.github.com>
Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
Z
zees-dev committed
68a9216ea033783c166432693ccdaceacdb1843d
Parent: cbd82a2
Committed by GitHub <noreply@github.com> on 11/18/2025, 9:28:27 AM