Skip to content

Commit

Permalink
Merge pull request #162 from Syndica/ink/guarantee-layouts
Browse files Browse the repository at this point in the history
fix(core,accountsdb): Guarantee the layout of some struct types
  • Loading branch information
0xNineteen authored Jun 6, 2024
2 parents 6644936 + d34455a commit 888b052
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/accountsdb/accounts_file.zig
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ pub const AccountInFile = struct {
len: usize = 0,

/// info about the account stored
pub const StorageInfo = struct {
pub const StorageInfo = extern struct {
write_version_obsolete: u64,
data_len: u64,
pubkey: Pubkey,
};

/// on-chain account info about the account
pub const AccountInfo = struct {
pub const AccountInfo = extern struct {
lamports: u64,
rent_epoch: Epoch,
owner: Pubkey,
Expand Down
2 changes: 1 addition & 1 deletion src/core/pubkey.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Ed25519 = std.crypto.sign.Ed25519;
const encoder = base58.Encoder.init(.{});
const decoder = base58.Decoder.init(.{});

pub const Pubkey = struct {
pub const Pubkey = extern struct {
data: [32]u8,

const Self = @This();
Expand Down

0 comments on commit 888b052

Please sign in to comment.